Index: content/browser/media/android/browser_media_player_manager.cc |
diff --git a/content/browser/media/android/browser_media_player_manager.cc b/content/browser/media/android/browser_media_player_manager.cc |
index acaab47b2b617c4576bd141b758ad4702e3de293..e93c51921b23274d5dbffff0aba7e7636e17e5b7 100644 |
--- a/content/browser/media/android/browser_media_player_manager.cc |
+++ b/content/browser/media/android/browser_media_player_manager.cc |
@@ -285,6 +285,7 @@ void BrowserMediaPlayerManager::OnMediaMetadataChanged( |
void BrowserMediaPlayerManager::OnPlaybackComplete(int player_id) { |
Send(new MediaPlayerMsg_MediaPlaybackCompleted(RoutingID(), player_id)); |
+ |
MediaSession::Get(web_contents())->RemovePlayer(this, player_id); |
if (fullscreen_player_id_ == player_id) |
@@ -581,7 +582,8 @@ void BrowserMediaPlayerManager::OnPause( |
if (player) |
player->Pause(is_media_related_action); |
- MediaSession::Get(web_contents())->RemovePlayer(this, player_id); |
+ if (is_media_related_action) |
+ MediaSession::Get(web_contents())->RemovePlayer(this, player_id); |
} |
void BrowserMediaPlayerManager::OnSetVolume(int player_id, double volume) { |