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

Unified Diff: media/base/android/media_source_player.cc

Issue 643353002: Listen to the audio focus event for MSE/EME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: media/base/android/media_source_player.cc
diff --git a/media/base/android/media_source_player.cc b/media/base/android/media_source_player.cc
index 4e744fb8d14a8de3a2e77973fa685ceb9880704d..35ab8454fb5d08e80b203e00b1a66985f42e357f 100644
--- a/media/base/android/media_source_player.cc
+++ b/media/base/android/media_source_player.cc
@@ -194,6 +194,7 @@ void MediaSourcePlayer::Release() {
playing_ = false;
decoder_starvation_callback_.Cancel();
+ DetachListener();
}
void MediaSourcePlayer::SetVolume(double volume) {
@@ -230,6 +231,7 @@ void MediaSourcePlayer::StartInternal() {
// be clear (not encrypted) or encrypted with different keys. So
// |is_waiting_for_key_| condition may not be true anymore.
is_waiting_for_key_ = false;
+ AttachListener(NULL);
SetPendingEvent(PREFETCH_REQUEST_EVENT_PENDING);
ProcessPendingEvents();
« media/base/android/media_player_listener.cc ('K') | « media/base/android/media_player_listener.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698