Chromium Code Reviews| Index: webkit/media/android/webmediaplayer_impl_android.cc |
| diff --git a/webkit/media/android/webmediaplayer_impl_android.cc b/webkit/media/android/webmediaplayer_impl_android.cc |
| index c43605f8d818c6c5e28804d3bb4d09f1cfd2b2c0..c654ce3a9d135037f8cb86662ca34f89d3938292 100644 |
| --- a/webkit/media/android/webmediaplayer_impl_android.cc |
| +++ b/webkit/media/android/webmediaplayer_impl_android.cc |
| @@ -124,6 +124,20 @@ void WebMediaPlayerImplAndroid::OnMediaPlayerPause() { |
| client()->playbackStateChanged(); |
| } |
| +void WebMediaPlayerImplAndroid::OnDidEnterVideoView() { |
| + SetIsInVideoView(true); |
| + SetNeedsEstablishPeer(false); |
| +} |
| + |
| +void WebMediaPlayerImplAndroid::OnDidExitVideoView() { |
| + SetIsInVideoView(false); |
| + SetNeedsEstablishPeer(true); |
| + // We had the video view surface connected to Android MediaPlayer, |
|
qinmin
2012/12/17 19:34:06
so if i have 2 videos on the page, one is playing,
wonsik2
2013/02/14 14:56:38
I thought we only allow one MediaPlayer instance t
|
| + // so reconnect our surface texture for embedded playback. |
| + if (!paused()) |
| + EstablishSurfaceTexturePeer(); |
| +} |
| + |
| void WebMediaPlayerImplAndroid::Destroy() { |
| proxy_->DestroyPlayer(player_id()); |
| proxy_ = NULL; |