[webkit-changes] [WebKit/WebKit] e32bbc: Safari local video element pauses after bluetooth ...
youennf
noreply at github.com
Thu Jan 26 01:59:56 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e32bbc1197b12a1e464ba1cef4e1267fafca77e9
https://github.com/WebKit/WebKit/commit/e32bbc1197b12a1e464ba1cef4e1267fafca77e9
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-01-26 (Thu, 26 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/259415@main
More information about the webkit-changes
mailing list