[iOS] Muted media playback can interrupt out-of-process audio
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Mar 2018 22:54:20 +0000 (22:54 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Mar 2018 22:54:20 +0000 (22:54 +0000)
commitf637bc6e2392a6edb6c024ee9ae71eb538f45ff4
tree4e2b30566d62ed0f8833cc8bc2df9dec96ea4147
parent1dd71262c42d8432380f0ed05eae7acaf7009788
[iOS] Muted media playback can interrupt out-of-process audio
https://bugs.webkit.org/show_bug.cgi?id=183606
<rdar://problem/37466253>

Reviewed by Eric Carlson.

Source/WebCore:

Test: Updated TestWebKitAPI test to verify the correct AVAudioSession category is set.

A non-playing, non-muted media element will cause the AVAudioSession category to be set to
"playing" when a muted media element begins playback. Ignore these non-playing elements for
the purposes of determining the AVAudioSession category.

* platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
(PlatformMediaSessionManager::updateSessionState):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitLegacy/ios/video-with-paused-audio-and-playing-muted.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm
Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/video-with-paused-audio-and-playing-muted.html [new file with mode: 0644]