diff options
author | qinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-23 01:06:41 +0000 |
---|---|---|
committer | qinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-23 01:06:41 +0000 |
commit | 6c4d79e639300f75fce778fd5120f844a46e5551 (patch) | |
tree | a06b1d2205f5f0dce4fd0fb6dbd85b10809eabd7 /content/renderer/media | |
parent | dde904c253c2dabfa7492cb99e3d1de670ff8464 (diff) | |
download | chromium_src-6c4d79e639300f75fce778fd5120f844a46e5551.zip chromium_src-6c4d79e639300f75fce778fd5120f844a46e5551.tar.gz chromium_src-6c4d79e639300f75fce778fd5120f844a46e5551.tar.bz2 |
Fix an issue that fullscreen video will not resume after being interrupted by other apps
When video is interrupted, Release() is called on the MediaPlayerBridge.
In the old fullscreen mode, BrowserMediaPlayerManager::FullscreenPlayerPlay() should re-attach the surface to the new mediaplayer.
However, with the new fullscreen mode, FullscreenPlayerPlay() is not going to be called since there is no android media control.
Instead, hitting the play button will call BrowserMediaPlayerManager::OnStart().
As a result, we should copy the logic that re-attaching the surface into OnStart(). And we should not attach the embedded surface to the media player when video is in fullscreen.
BUG=365310
Review URL: https://codereview.chromium.org/243483006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265457 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/media')
-rw-r--r-- | content/renderer/media/android/webmediaplayer_android.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc index 34f47ed..58eb622 100644 --- a/content/renderer/media/android/webmediaplayer_android.cc +++ b/content/renderer/media/android/webmediaplayer_android.cc @@ -262,7 +262,9 @@ void WebMediaPlayerAndroid::play() { #endif // defined(VIDEO_HOLE) TryCreateStreamTextureProxyIfNeeded(); - if (hasVideo() && needs_establish_peer_) + // There is no need to establish the surface texture peer for fullscreen + // video. + if (hasVideo() && needs_establish_peer_ && !manager_->IsInFullscreen(frame_)) EstablishSurfaceTexturePeer(); if (paused()) |