[webkit-changes] [WebKit/WebKit] 44f660: InvisibleAutoplay interruption should be lifted wh...
youennf
noreply at github.com
Thu Feb 2 00:58:39 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 44f6600b01812adc0f704e20da01abbfb8c0530b
https://github.com/WebKit/WebKit/commit/44f6600b01812adc0f704e20da01abbfb8c0530b
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-02-02 (Thu, 02 Feb 2023)
Changed paths:
A LayoutTests/http/tests/webrtc/muted-video-mediastream-invisible-autoplay-expected.txt
A LayoutTests/http/tests/webrtc/muted-video-mediastream-invisible-autoplay.html
M Source/WebCore/html/HTMLMediaElement.cpp
Log Message:
-----------
InvisibleAutoplay interruption should be lifted when unmuting a video element that was muted then made invisible
https://bugs.webkit.org/show_bug.cgi?id=251488
rdar://101682623
Reviewed by Eric Carlson.
A muted media element will be suspended for InvisibleAutoplay if it ever made hidden.
While playback will resume if the media element is made visible, it should also resum if the media element stays hidden but is unmuted.
To do this, we call scheduleUpdateShouldAutoplay whenever the media element muted state changes.
This also has the effect that a hidden media element that gets muted will also be paused, until it either gets unmuted or made visible again.
Covered by LayoutTests/http/tests/webrtc/muted-video-mediastream-invisible-autoplay.html.
* LayoutTests/http/tests/webrtc/muted-video-mediastream-invisible-autoplay-expected.txt: Added.
* LayoutTests/http/tests/webrtc/muted-video-mediastream-invisible-autoplay.html: Added.
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted):
Canonical link: https://commits.webkit.org/259744@main
More information about the webkit-changes
mailing list