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

Unified Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 1808463002: Don't mark a WebMediaPlayer as idle until it has size and first frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 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 | content/renderer/media/renderer_webmediaplayer_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/android/webmediaplayer_android.cc
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index e1a8e204cd1158a35da69ebd8f3d6721282fa024..3770ac52bd696115e3beea6d708dc27e631bbac5 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -958,6 +958,12 @@ void WebMediaPlayerAndroid::OnVideoSizeChanged(int width, int height) {
cc::VideoLayer::Create(cc_blink::WebLayerImpl::LayerSettings(), this,
media::VIDEO_ROTATION_0)));
client_->setWebLayer(video_weblayer_.get());
+
+ // If we're paused after we receive metadata for the first time, tell the
+ // delegate we can now be safely suspended due to inactivity if a subsequent
+ // play event does not occur.
+ if (paused() && delegate_)
+ delegate_->DidPause(delegate_id_, false);
}
}
« no previous file with comments | « no previous file | content/renderer/media/renderer_webmediaplayer_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698