New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 619084 link

Starred by 3 users

Issue metadata

Status: Closed
Owner: ----
Closed: Nov 19
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug

Blocked on:
issue 609503
issue 642361
issue 670273

Blocking:
issue 609141



Sign in to add a comment

Experiment with Flash in media session on desktop

Project Member Reported by zqzh...@chromium.org, Jun 10 2016

Issue description

Let Flash join media sessions on desktop.
Implement behind a flag.

The current behavior will be duck Flash when other tab starts playing, and unduck it when the other tab paused/stopped.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c885f6ba83d8687b840c0fa684a941d45f9162be

commit c885f6ba83d8687b840c0fa684a941d45f9162be
Author: zqzhang <zqzhang@chromium.org>
Date: Thu Jun 23 19:44:46 2016

Expose flash playback status and volume control to content renderer

This CL plumbs flash playback status and volume control to the
content renderer. It basically lets the renderer know when flash
starts/stops to play sound, and let it be able to control it's
volume.

The plumbing is to be continued to WebContents, and then we are
able to let flash be controlled by MediaSession, which prevents
multiple tabs from playing sound at the same time (which usually
annoys the user).

Follow-up CL:
https://codereview.chromium.org/2060933002/

BUG= 619084 

Review-Url: https://codereview.chromium.org/2065513004
Cr-Commit-Position: refs/heads/master@{#401687}

[modify] https://crrev.com/c885f6ba83d8687b840c0fa684a941d45f9162be/content/common/frame_messages.h
[modify] https://crrev.com/c885f6ba83d8687b840c0fa684a941d45f9162be/content/content_renderer.gypi
[add] https://crrev.com/c885f6ba83d8687b840c0fa684a941d45f9162be/content/renderer/pepper/pepper_audio_controller.cc
[add] https://crrev.com/c885f6ba83d8687b840c0fa684a941d45f9162be/content/renderer/pepper/pepper_audio_controller.h
[modify] https://crrev.com/c885f6ba83d8687b840c0fa684a941d45f9162be/content/renderer/pepper/pepper_platform_audio_output.cc
[modify] https://crrev.com/c885f6ba83d8687b840c0fa684a941d45f9162be/content/renderer/pepper/pepper_platform_audio_output.h
[modify] https://crrev.com/c885f6ba83d8687b840c0fa684a941d45f9162be/content/renderer/pepper/pepper_plugin_instance_impl.cc
[modify] https://crrev.com/c885f6ba83d8687b840c0fa684a941d45f9162be/content/renderer/pepper/pepper_plugin_instance_impl.h
[modify] https://crrev.com/c885f6ba83d8687b840c0fa684a941d45f9162be/content/renderer/pepper/ppb_audio_impl.cc
[modify] https://crrev.com/c885f6ba83d8687b840c0fa684a941d45f9162be/content/renderer/pepper/ppb_audio_impl.h
[modify] https://crrev.com/c885f6ba83d8687b840c0fa684a941d45f9162be/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/c885f6ba83d8687b840c0fa684a941d45f9162be/content/renderer/render_frame_impl.h

Project Member

Comment 2 by bugdroid1@chromium.org, Jul 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/181047e6d762633e8ff503c96952ce5d8892ab41

commit 181047e6d762633e8ff503c96952ce5d8892ab41
Author: zqzhang <zqzhang@chromium.org>
Date: Fri Jul 01 13:37:17 2016

Let Flash join and be controlled by media session

This CL lets Flash join and be controlled by media session. This feature
is only valid when default media session (on desktop) is enabled. If
Flash starts playing, it will join the media session, and suspend all
existing media players. However if other player starts playing after
this, Flash will always duck until all other media players are paused.

BUG= 619084 

Review-Url: https://codereview.chromium.org/2060933002
Cr-Commit-Position: refs/heads/master@{#403447}

[add] https://crrev.com/181047e6d762633e8ff503c96952ce5d8892ab41/content/browser/media/session/pepper_playback_observer.cc
[add] https://crrev.com/181047e6d762633e8ff503c96952ce5d8892ab41/content/browser/media/session/pepper_playback_observer.h
[add] https://crrev.com/181047e6d762633e8ff503c96952ce5d8892ab41/content/browser/media/session/pepper_player_delegate.cc
[add] https://crrev.com/181047e6d762633e8ff503c96952ce5d8892ab41/content/browser/media/session/pepper_player_delegate.h
[modify] https://crrev.com/181047e6d762633e8ff503c96952ce5d8892ab41/content/browser/web_contents/web_contents_impl.cc
[modify] https://crrev.com/181047e6d762633e8ff503c96952ce5d8892ab41/content/browser/web_contents/web_contents_impl.h
[modify] https://crrev.com/181047e6d762633e8ff503c96952ce5d8892ab41/content/common/frame_messages.h
[modify] https://crrev.com/181047e6d762633e8ff503c96952ce5d8892ab41/content/content_browser.gypi
[modify] https://crrev.com/181047e6d762633e8ff503c96952ce5d8892ab41/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/181047e6d762633e8ff503c96952ce5d8892ab41/media/base/media_switches.cc
[modify] https://crrev.com/181047e6d762633e8ff503c96952ce5d8892ab41/media/base/media_switches.h

Project Member

Comment 3 by sheriffbot@chromium.org, Jul 6 2016

Labels: -M-53 M-54 MovedFrom-53
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -M-54 M-55
Blockedon: 642361
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bc67624f3ea12ffabfb129c269c7bd82c9a1127d

commit bc67624f3ea12ffabfb129c269c7bd82c9a1127d
Author: zqzhang <zqzhang@chromium.org>
Date: Fri Sep 30 12:27:13 2016

Letting Flash join MediaSession (stack implementaion)

This CL lets Flash join and be managed by MediaSession.
Flash will take "Gain" audio focus, and sessions with Flash will duck instead of being suspended.

Test flags:
--enable-default-media-session
--ppapi-flash-path=/opt/google/chrome/PepperFlash/libpepflashplayer.so
--enable-features=flash-join-media-session

Test URL (can open multiple tabs and try):
http://xxyzzzq.github.io/sandbox/media-session/flash-test.html

BUG= 619084 

Review-Url: https://codereview.chromium.org/2274873003
Cr-Commit-Position: refs/heads/master@{#422087}

[modify] https://crrev.com/bc67624f3ea12ffabfb129c269c7bd82c9a1127d/content/browser/BUILD.gn
[modify] https://crrev.com/bc67624f3ea12ffabfb129c269c7bd82c9a1127d/content/browser/media/session/audio_focus_manager.cc
[modify] https://crrev.com/bc67624f3ea12ffabfb129c269c7bd82c9a1127d/content/browser/media/session/audio_focus_manager.h
[modify] https://crrev.com/bc67624f3ea12ffabfb129c269c7bd82c9a1127d/content/browser/media/session/audio_focus_manager_unittest.cc
[modify] https://crrev.com/bc67624f3ea12ffabfb129c269c7bd82c9a1127d/content/browser/media/session/media_session.cc
[modify] https://crrev.com/bc67624f3ea12ffabfb129c269c7bd82c9a1127d/content/browser/media/session/media_session.h
[modify] https://crrev.com/bc67624f3ea12ffabfb129c269c7bd82c9a1127d/content/browser/media/session/media_session_browsertest.cc
[modify] https://crrev.com/bc67624f3ea12ffabfb129c269c7bd82c9a1127d/content/test/BUILD.gn
[add] https://crrev.com/bc67624f3ea12ffabfb129c269c7bd82c9a1127d/docs/audio_focus.md

Cc: zqzh...@chromium.org
 Issue 639277  has been merged into this issue.
Project Member

Comment 8 by bugdroid1@chromium.org, Sep 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/50cc6c67785970247fe6af026b82c199a37c631e

commit 50cc6c67785970247fe6af026b82c199a37c631e
Author: wjmaclean <wjmaclean@chromium.org>
Date: Fri Sep 30 13:29:44 2016

Revert of Letting Flash join MediaSession (stack implementaion) (patchset #12 id:260001 of https://codereview.chromium.org/2274873003/ )

Reason for revert:
This appears to be causing failures of:

AudioFocusManagerTest.PepperRequestsGainFocus
AudioFocusManagerTest.AbandoningGainFocusRevokesTopMostPepperSession
AudioFocusManagerTest.GainDucksPepper

on

Linux ChromiumOS Tests (1)
Cast Linux

Original issue's description:
> Letting Flash join MediaSession (stack implementaion)
>
> This CL lets Flash join and be managed by MediaSession.
> Flash will take "Gain" audio focus, and sessions with Flash will duck instead of being suspended.
>
> Test flags:
> --enable-default-media-session
> --ppapi-flash-path=/opt/google/chrome/PepperFlash/libpepflashplayer.so
> --enable-features=flash-join-media-session
>
> Test URL (can open multiple tabs and try):
> http://xxyzzzq.github.io/sandbox/media-session/flash-test.html
>
> BUG= 619084 
>
> Committed: https://crrev.com/bc67624f3ea12ffabfb129c269c7bd82c9a1127d
> Cr-Commit-Position: refs/heads/master@{#422087}

TBR=jochen@chromium.org,avayvod@chromium.org,mlamouri@chromium.org,zqzhang@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 619084 

Review-Url: https://codereview.chromium.org/2382723006
Cr-Commit-Position: refs/heads/master@{#422098}

[modify] https://crrev.com/50cc6c67785970247fe6af026b82c199a37c631e/content/browser/BUILD.gn
[modify] https://crrev.com/50cc6c67785970247fe6af026b82c199a37c631e/content/browser/media/session/audio_focus_manager.cc
[modify] https://crrev.com/50cc6c67785970247fe6af026b82c199a37c631e/content/browser/media/session/audio_focus_manager.h
[modify] https://crrev.com/50cc6c67785970247fe6af026b82c199a37c631e/content/browser/media/session/audio_focus_manager_unittest.cc
[modify] https://crrev.com/50cc6c67785970247fe6af026b82c199a37c631e/content/browser/media/session/media_session.cc
[modify] https://crrev.com/50cc6c67785970247fe6af026b82c199a37c631e/content/browser/media/session/media_session.h
[modify] https://crrev.com/50cc6c67785970247fe6af026b82c199a37c631e/content/browser/media/session/media_session_browsertest.cc
[modify] https://crrev.com/50cc6c67785970247fe6af026b82c199a37c631e/content/test/BUILD.gn
[delete] https://crrev.com/d0ae42805c98eba419a331f037c6c71c817f7465/docs/audio_focus.md

Project Member

Comment 10 by bugdroid1@chromium.org, Sep 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d36b5ce262564de9bf0fee7697a16e5a655472b4

commit d36b5ce262564de9bf0fee7697a16e5a655472b4
Author: zqzhang <zqzhang@chromium.org>
Date: Fri Sep 30 17:29:34 2016

Reland "Letting Flash join MediaSession (stack implementaion)"

This CL lets Flash join and be managed by MediaSession.
Flash will take "Gain" audio focus, and sessions with Flash will duck instead of being suspended.

Test flags:
--enable-default-media-session
--ppapi-flash-path=/opt/google/chrome/PepperFlash/libpepflashplayer.so
--enable-features=flash-join-media-session

Test URL (can open multiple tabs and try):
http://xxyzzzq.github.io/sandbox/media-session/flash-test.html

BUG= 619084 
TBR=avayvod@chromium.org,jochen@chromium.org,mlamouri@chromium.org

Review-Url: https://codereview.chromium.org/2381963004
Cr-Commit-Position: refs/heads/master@{#422142}

[modify] https://crrev.com/d36b5ce262564de9bf0fee7697a16e5a655472b4/content/browser/BUILD.gn
[modify] https://crrev.com/d36b5ce262564de9bf0fee7697a16e5a655472b4/content/browser/media/session/audio_focus_manager.cc
[modify] https://crrev.com/d36b5ce262564de9bf0fee7697a16e5a655472b4/content/browser/media/session/audio_focus_manager.h
[modify] https://crrev.com/d36b5ce262564de9bf0fee7697a16e5a655472b4/content/browser/media/session/audio_focus_manager_unittest.cc
[modify] https://crrev.com/d36b5ce262564de9bf0fee7697a16e5a655472b4/content/browser/media/session/media_session.cc
[modify] https://crrev.com/d36b5ce262564de9bf0fee7697a16e5a655472b4/content/browser/media/session/media_session.h
[modify] https://crrev.com/d36b5ce262564de9bf0fee7697a16e5a655472b4/content/browser/media/session/media_session_browsertest.cc
[modify] https://crrev.com/d36b5ce262564de9bf0fee7697a16e5a655472b4/content/test/BUILD.gn
[add] https://crrev.com/d36b5ce262564de9bf0fee7697a16e5a655472b4/docs/audio_focus.md

Project Member

Comment 11 by bugdroid1@chromium.org, Oct 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cac47f309a84b18246251fa11512871bba625dc0

commit cac47f309a84b18246251fa11512871bba625dc0
Author: zqzhang <zqzhang@chromium.org>
Date: Tue Oct 04 10:42:35 2016

Rename media switch "flash-join-media-session" to "FlashJoinsMediaSession"

It is uncommon to use command-line-switch-style for base::Feature
names. This CL fixes the feature name for kFlashJoinsMediaSession.

BUG= 619084 

Review-Url: https://codereview.chromium.org/2390633002
Cr-Commit-Position: refs/heads/master@{#422743}

[modify] https://crrev.com/cac47f309a84b18246251fa11512871bba625dc0/media/base/media_switches.cc

Do we need to add switches into chrome://flags (for both kEnableDefaultMediaSession and kFlashJoinsMediaSession)?
Project Member

Comment 13 by bugdroid1@chromium.org, Oct 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/20756e0ed6432c0e51d08ed902b22546314d2b14

commit 20756e0ed6432c0e51d08ed902b22546314d2b14
Author: zqzhang <zqzhang@chromium.org>
Date: Wed Oct 19 15:12:02 2016

Hotfix for MediaSession::OnPlayerPaused

There is an issue with removing a player from MediaSession when the
player is paused with the existence of pepper players. This CL fixes the
issue.

BUG= 619084 

Review-Url: https://chromiumcodereview.appspot.com/2429823002
Cr-Commit-Position: refs/heads/master@{#426194}

[modify] https://crrev.com/20756e0ed6432c0e51d08ed902b22546314d2b14/content/browser/media/session/media_session.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Oct 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f9730d243f7a1f85ae6008cc4d6ceff367a16e66

commit f9730d243f7a1f85ae6008cc4d6ceff367a16e66
Author: zqzhang <zqzhang@chromium.org>
Date: Fri Oct 21 11:38:24 2016

Let Flash take one-shot focus in default MediaSession

Previously, the interaction between Flash and MediaSession is:

* When default MediaSession is enabled, Flash does not interact with
  MediaSession at all.
* When default MediaSession is enabled with Flash, Flash will join
  MediaSession. It takes audio focus and ducks when losing audio focus.

After this CL, the first behavior will be changed to:

* When default MediaSession is enabled, Flash takes audio focus once,
  but will not respond to audio focus changes.

BUG= 619084 

Review-Url: https://chromiumcodereview.appspot.com/2437623005
Cr-Commit-Position: refs/heads/master@{#426770}

[modify] https://crrev.com/f9730d243f7a1f85ae6008cc4d6ceff367a16e66/chrome/app/generated_resources.grd
[modify] https://crrev.com/f9730d243f7a1f85ae6008cc4d6ceff367a16e66/chrome/browser/about_flags.cc
[modify] https://crrev.com/f9730d243f7a1f85ae6008cc4d6ceff367a16e66/content/browser/media/session/pepper_playback_observer.cc
[modify] https://crrev.com/f9730d243f7a1f85ae6008cc4d6ceff367a16e66/content/browser/media/session/pepper_player_delegate.cc
[modify] https://crrev.com/f9730d243f7a1f85ae6008cc4d6ceff367a16e66/media/base/media_switches.cc
[modify] https://crrev.com/f9730d243f7a1f85ae6008cc4d6ceff367a16e66/media/base/media_switches.h

Labels: -M-55 M-58
Project Member

Comment 17 by bugdroid1@chromium.org, Nov 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/89ec74b2c84ed550a4eb1de5b338e18252ecd291

commit 89ec74b2c84ed550a4eb1de5b338e18252ecd291
Author: zqzhang <zqzhang@chromium.org>
Date: Thu Nov 10 15:11:02 2016

Implement one-shot audio focus inside MediaSession

This CL implements one-shot audio focus type inside MediaSession,
instead of letting players joining MediaSession using Persisitent
type, while ignoring audio focus changes.

In this CL, when a one-shot player joins MediaSession,
MediaSession will takes audio focus and becomes active. However
when a MediaSession has one-shot players, it will become
uncontrollable.

BUG= 596516 , 619084 

Review-Url: https://codereview.chromium.org/2475473002
Cr-Commit-Position: refs/heads/master@{#431260}

[modify] https://crrev.com/89ec74b2c84ed550a4eb1de5b338e18252ecd291/content/browser/media/session/media_session_impl.cc
[modify] https://crrev.com/89ec74b2c84ed550a4eb1de5b338e18252ecd291/content/browser/media/session/media_session_impl.h
[modify] https://crrev.com/89ec74b2c84ed550a4eb1de5b338e18252ecd291/content/browser/media/session/media_session_impl_browsertest.cc
[modify] https://crrev.com/89ec74b2c84ed550a4eb1de5b338e18252ecd291/content/browser/media/session/pepper_playback_observer.cc
[modify] https://crrev.com/89ec74b2c84ed550a4eb1de5b338e18252ecd291/content/common/media/media_player_delegate_messages.h
[modify] https://crrev.com/89ec74b2c84ed550a4eb1de5b338e18252ecd291/content/renderer/media/webmediaplayer_ms.cc
[modify] https://crrev.com/89ec74b2c84ed550a4eb1de5b338e18252ecd291/media/base/media_content_type.h

Blockedon: 670273
Labels: -M-58 M-60
Owner: mlamouri@chromium.org
Labels: -M-60
Owner: ----
There are no longer any bugs blocking this. What work is left to call this bug complete? 
This is part of desktop media session: it's implemented behind a flag but hasn't quite launched.
Any progress or plans to work on this?
Labels: -Pri-1 Pri-3
Status: Closed (was: Assigned)

Sign in to add a comment