[webkit-changes] [WebKit/WebKit] 616d47: Safari local video element pauses after bluetooth ...
youennf
noreply at github.com
Fri Jan 27 04:40:28 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 616d47c0514e41b134e35129fb76408323974594
https://github.com/WebKit/WebKit/commit/616d47c0514e41b134e35129fb76408323974594
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-01-27 (Fri, 27 Jan 2023)
Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/html/MediaElementSession.cpp
M Source/WebCore/platform/mac/WebPlaybackControlsManager.mm
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm
A Tools/TestWebKitAPI/Tests/WebKitCocoa/webrtc-remote.html
Log Message:
-----------
Safari local video element pauses after bluetooth audioinput is disconnected
https://bugs.webkit.org/show_bug.cgi?id=231787
rdar://problem/84529041
Reviewed by Eric Carlson.
We receive a remote pause command when BT is disconnected.
We also get remote commands from keyboard and the current heuristic does not work well with video conference websites
that have multiple media elements playing at the same time.
We introduce a new heuristic in that case, where instead of pausing/playing media elements, we mute/unmute capture and audio rendering.
This allow users for instance to restart capture/audio using Safari UI.
We update WebPlaybackControlsManager setPlaying to always send an IPC message since calling playing may unmute WebProcess.
Covered by API test.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::updateIsPlayingMedia):
* Source/WebCore/dom/Document.h:
(WebCore::Document::activeMediaElementsWithMediaStreamCount const):
* Source/WebCore/html/MediaElementSession.cpp:
(WebCore::isDocumentPlayingSeveralMediaStreams):
(WebCore::processRemoteControlCommandIfPlayingMediaStreams):
(WebCore::MediaElementSession::didReceiveRemoteControlCommand):
(WebCore::MediaElementSession::nowPlayingInfo const):
* Source/WebCore/platform/mac/WebPlaybackControlsManager.mm:
(-[WebPlaybackControlsManager setPlaying:]):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/webrtc-remote.html: Added.
Canonical link: https://commits.webkit.org/259478@main
More information about the webkit-changes
mailing list