Muted elements do not have their Now Playing status updated when unmuted.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Aug 2018 19:39:37 +0000 (19:39 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Aug 2018 19:39:37 +0000 (19:39 +0000)
commita6606c7125c575309389e13a65b862dfa9061fd3
tree1ee68ae0c0911193cdf492255d7ae591f8dd602e
parent04537bc6f94f93ffb9c79e7f5d0c331bbdd8174f
Muted elements do not have their Now Playing status updated when unmuted.
https://bugs.webkit.org/show_bug.cgi?id=189069

Reviewed by Eric Carlson.

Source/WebCore:

Schedule an updateNowPlayingInfo() when an element becomes unmuted.

* platform/audio/PlatformMediaSessionManager.h:
* platform/audio/mac/MediaSessionManagerMac.h:
* platform/audio/mac/MediaSessionManagerMac.mm:
(WebCore::MediaSessionManagerMac::sessionCanProduceAudioChanged):

Source/WebCore/PAL:

* pal/spi/mac/MediaRemoteSPI.h:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm: Added.
(userInfoHasNowPlayingApplicationPID):
(getNowPlayingClient):
(getNowPlayingClientPid):
(NowPlayingTest::webView):
(NowPlayingTest::configuration):
(NowPlayingTest::webViewPid):
(NowPlayingTest::loadPage):
(NowPlayingTest::runScriptWithUserGesture):
(NowPlayingTest::runScriptWithoutUserGesture):
(NowPlayingTest::executeAndWaitForPlaying):
(NowPlayingTest::executeAndWaitForWebViewToBecomeNowPlaying):
(NowPlayingTest::observers):
(NowPlayingTest::addObserver):
(NowPlayingTest::removeObserver):
(NowPlayingTest::notificationCallback):
(NowPlayingTest::receivedNotification):
(NowPlayingTest::performAfterReceivingNotification):
(TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/now-playing.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/mac/MediaRemoteSPI.h
Source/WebCore/platform/audio/PlatformMediaSessionManager.h
Source/WebCore/platform/audio/mac/MediaSessionManagerMac.h
Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebKitCocoa/now-playing.html [new file with mode: 0644]