Index: content/browser/android/media_player_manager_android.cc |
diff --git a/content/browser/android/media_player_manager_android.cc b/content/browser/android/media_player_manager_android.cc |
index 2716079527d87d29b038f0b989d201ddebb68a88..98a51e2e572d760dfa7040241a58911f035e1f36 100644 |
--- a/content/browser/android/media_player_manager_android.cc |
+++ b/content/browser/android/media_player_manager_android.cc |
@@ -123,6 +123,8 @@ void MediaPlayerManagerAndroid::OnInitialize( |
base::Bind(&MediaPlayerManagerAndroid::OnSeekComplete, |
base::Unretained(this)), |
base::Bind(&MediaPlayerManagerAndroid::OnTimeUpdate, |
+ base::Unretained(this)), |
+ base::Bind(&MediaPlayerManagerAndroid::OnMediaInterrupted, |
base::Unretained(this)))); |
// Send a MediaPrepared message to webkit so that Load() can finish. |
@@ -220,6 +222,12 @@ void MediaPlayerManagerAndroid::OnPlaybackComplete(int player_id) { |
video_view_.OnPlaybackComplete(); |
} |
+void MediaPlayerManagerAndroid::OnMediaInterrupted(int player_id) { |
+ // Tell WebKit that the audio should be paused, then release all resources |
+ Send(new MediaPlayerMsg_DidMediaPlayerPause(routing_id(), player_id)); |
Yaron
2012/11/27 05:58:00
Have you tested fullscreen? FullscreenPlayerPause
Miguel Garcia
2012/11/27 17:24:06
Yes, played something in full screen mode and call
|
+ OnReleaseResources(player_id); |
+} |
+ |
void MediaPlayerManagerAndroid::OnBufferingUpdate( |
int player_id, int percentage) { |
Send(new MediaPlayerMsg_MediaBufferingUpdate( |