Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b848143a2ad57c80405dc5b30e61c750f5896d72
https://github.com/WebKit/WebKit/commit/b848143a2ad57c80405dc5b30e61c750f5896d72
Author: Youenn Fablet <[email protected]>
Date: 2024-03-01 (Fri, 01 Mar 2024)
Changed paths:
A LayoutTests/media/now-playing-webaudio-expected.txt
A LayoutTests/media/now-playing-webaudio.html
M LayoutTests/media/webaudio-background-playback-expected.txt
M LayoutTests/media/webaudio-background-playback.html
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/mac/TestExpectations
M Source/WebCore/Modules/mediasession/NavigatorMediaSession.cpp
M Source/WebCore/Modules/mediasession/NavigatorMediaSession.h
M Source/WebCore/Modules/webaudio/AudioContext.cpp
M Source/WebCore/Modules/webaudio/AudioContext.h
M Source/WebCore/Modules/webaudio/BaseAudioContext.cpp
M Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp
Log Message:
-----------
[iOS] AudioContext is getting suspended when page goes in the background even
if navigator.audioSession.type is set to playback
https://bugs.webkit.org/show_bug.cgi?id=261554
rdar://115485355
Reviewed by Eric Carlson.
Implement isNowPlayingEligible, nowPlayingInfo and selectBestMediaSession to
enable NowPlayingInfo handling.
Only activated by JS AudioContext(s) are NowPlayingInfo-able if DOM
AudioSession type is playback or plabyack and record.
Implement canReceiveRemoteControlCommands and didReceiveRemoteControlCommand to
be able to play/pause according commands.
Update AudioContext::mayResumePlayback to only resume for activated by JS
AudioContext(s).
Update AudioContext::shouldOverrideBackgroundPlaybackRestriction to be able to
continue in the background in case of
playback or plabyack and record DOM AudioSession(s).
Update bug in PlatformMediaSessionManager::bestEligibleSessionForRemoteControls
late time optimization to only add web audio sessions to its list
when there is no media element eligible session. If there is an eligible media
element session, we do not want to add web audio session to the media session
list.
* LayoutTests/media/now-playing-webaudio-expected.txt: Added.
* LayoutTests/media/now-playing-webaudio.html: Added.
* LayoutTests/media/webaudio-background-playback-expected.txt:
* LayoutTests/media/webaudio-background-playback.html:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/Modules/mediasession/NavigatorMediaSession.cpp:
(WebCore::NavigatorMediaSession::mediaSessionIfExists):
* Source/WebCore/Modules/mediasession/NavigatorMediaSession.h:
* Source/WebCore/Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
(WebCore::AudioContext::mayResumePlayback):
(WebCore::AudioContext::canReceiveRemoteControlCommands const):
(WebCore::AudioContext::didReceiveRemoteControlCommand):
(WebCore::hasPlayBackAudioSession):
(WebCore::AudioContext::isNowPlayingEligible const):
(WebCore::AudioContext::nowPlayingInfo const):
(WebCore::AudioContext::selectBestMediaSession):
(WebCore::AudioContext::shouldOverrideBackgroundPlaybackRestriction const):
(WebCore::AudioContext::defaultDestinationWillBecomeConnected):
* Source/WebCore/Modules/webaudio/AudioContext.h:
* Source/WebCore/Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::setState):
* Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::bestEligibleSessionForRemoteControls):
Canonical link: https://commits.webkit.org/275558@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes