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

Unified Diff: content/renderer/media/webmediaplayer_ms.cc

Issue 2475473002: Implement one-shot audio focus inside MediaSession (Closed)
Patch Set: fixed a case where removing the last one-shot player Created 4 years, 1 month 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
« no previous file with comments | « content/common/media/media_player_delegate_messages.h ('k') | media/base/media_content_type.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webmediaplayer_ms.cc
diff --git a/content/renderer/media/webmediaplayer_ms.cc b/content/renderer/media/webmediaplayer_ms.cc
index e832e2cd8ac46e5c86fac9b69ed766c64d71b2e6..7d8f77ecc76a90d2fe46b022377d59f59a0dfd8c 100644
--- a/content/renderer/media/webmediaplayer_ms.cc
+++ b/content/renderer/media/webmediaplayer_ms.cc
@@ -181,11 +181,11 @@ void WebMediaPlayerMS::play() {
audio_renderer_->Play();
if (delegate_) {
- // TODO(perkj, magjed): We use Uncontrollable type here to avoid creating an
- // interactive media session on Android. See http://crbug.com/596516 for
- // more details.
+ // TODO(perkj, magjed): We use OneShot focus type here so that it takes
+ // audio focus once it starts, and then will not respond to further audio
+ // focus changes. See http://crbug.com/596516 for more details.
delegate_->DidPlay(delegate_id_, hasVideo(), hasAudio(), false,
- media::MediaContentType::Persistent);
+ media::MediaContentType::OneShot);
}
paused_ = false;
« no previous file with comments | « content/common/media/media_player_delegate_messages.h ('k') | media/base/media_content_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698