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.
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
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
Moving this nonessential bug to the next milestone. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
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
Issue 639277 has been merged into this issue.
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
OK, the failure is: https://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%281%29/builds/27045 https://build.chromium.org/p/chromium.linux/builders/Cast%20Linux/builds/32208 I'll see what happened
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
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)?
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
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d4999814c3f26506f60d77d27003f9b3dcf50afb commit d4999814c3f26506f60d77d27003f9b3dcf50afb Author: zqzhang <zqzhang@chromium.org> Date: Wed Oct 19 16:28:58 2016 Add a flag to chrome://flags for experimenting with MediaSession on desktop This CL adds a flag for experimenting with MediaSession on desktop to chrome://flags. kFlashJoinsMediaSession is merged into kEnableDefaultMediaSession to make chrome://flags simpler. BUG= 619084 Review-Url: https://chromiumcodereview.appspot.com/2428873002 Cr-Commit-Position: refs/heads/master@{#426219} [modify] https://crrev.com/d4999814c3f26506f60d77d27003f9b3dcf50afb/chrome/app/generated_resources.grd [modify] https://crrev.com/d4999814c3f26506f60d77d27003f9b3dcf50afb/chrome/browser/about_flags.cc [modify] https://crrev.com/d4999814c3f26506f60d77d27003f9b3dcf50afb/content/browser/media/session/pepper_playback_observer.cc [modify] https://crrev.com/d4999814c3f26506f60d77d27003f9b3dcf50afb/content/browser/media/session/pepper_playback_observer.h [modify] https://crrev.com/d4999814c3f26506f60d77d27003f9b3dcf50afb/media/base/media_switches.cc [modify] https://crrev.com/d4999814c3f26506f60d77d27003f9b3dcf50afb/media/base/media_switches.h [modify] https://crrev.com/d4999814c3f26506f60d77d27003f9b3dcf50afb/tools/metrics/histograms/histograms.xml
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
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
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?
Comment 1 by bugdroid1@chromium.org
, Jun 23 2016