REGRESSION: Cannot listen to audio on Google Translate with side switch set to ...
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2018 23:30:57 +0000 (23:30 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2018 23:30:57 +0000 (23:30 +0000)
commit9b8c50d20ed380f5757625eb19453c4192462e40
tree874cd25c9f7267126c6b0492f06e8212b920e2d3
parentee31f7411a94779a9b9d4e855a0ae3b7fcf88441
REGRESSION:  Cannot listen to audio on Google Translate with side switch set to "vibrate"
https://bugs.webkit.org/show_bug.cgi?id=186415
<rdar://problem/40584651>

Reviewed by Eric Carlson.

Source/WebCore:

Test: platform/mac/media/audio-session-category-audio-autoplay.html

Make sure that the PlatformMediaSession's state has already been set when calling updateSessionStates().

* platform/audio/PlatformMediaSession.cpp:
(WebCore::PlatformMediaSession::setState):
* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
(WebCore::PlatformMediaSessionManager::sessionStateChanged):

LayoutTests:

* platform/mac/media/audio-session-category-audio-autoplay-expected.txt: Added.
* platform/mac/media/audio-session-category-audio-autoplay.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/media/audio-session-category-audio-autoplay-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/media/audio-session-category-audio-autoplay.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/audio/PlatformMediaSession.cpp
Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp
Source/WebCore/platform/audio/PlatformMediaSessionManager.h