Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1245)

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 2696423003: Don't pause suspended videos with no audio. (Closed)
Patch Set: Added WMPI tests Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index fa8a90108e049dc4b1464fe5885913816da312dd..a81ad7ce4d66ba735d6e7678ed1b0c1e03dc4c77 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -2105,9 +2105,11 @@ void WebMediaPlayerImpl::FinishMemoryUsageReport(int64_t demuxer_memory_usage) {
void WebMediaPlayerImpl::ScheduleIdlePauseTimer() {
// Only schedule the pause timer if we're not paused or paused but going to
- // resume when foregrounded, and are suspended.
- if ((paused_ && !paused_when_hidden_) || !pipeline_controller_.IsSuspended())
+ // resume when foregrounded, and are suspended and have audio.
+ if ((paused_ && !paused_when_hidden_) ||
+ !pipeline_controller_.IsSuspended() || !hasAudio()) {
return;
+ }
#if defined(OS_ANDROID)
// Remote players will be suspended and locally paused.
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698