Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 88776c3efc3ff69c43417ac0aefce86864d3fe56
https://github.com/WebKit/WebKit/commit/88776c3efc3ff69c43417ac0aefce86864d3fe56
Author: Eric Carlson <[email protected]>
Date: 2025-05-01 (Thu, 01 May 2025)
Changed paths:
M Source/WebCore/html/HTMLMediaElement.cpp
M Source/WebCore/html/HTMLMediaElement.h
M Source/WebCore/html/MediaElementSession.cpp
M Source/WebCore/page/Quirks.cpp
M Source/WebCore/page/QuirksData.h
Log Message:
-----------
Two clicks required to resume playback at premierleague.com after returning
from back-forward cache
https://bugs.webkit.org/show_bug.cgi?id=292349
rdar://68938833
Reviewed by Jean Yves Avenard.
When a premierleague.com page with a video resumes from the back-forward cache,
two
click are required to resume playback because the page's media controls state
machine
believes it is already playing. Fix this by using the adding premierleague.com
to
the existing `needsAutoplayPlayPauseEvents` quirk.
Additionally, video elements on the site have `preload="metadata"` so when the
MediaPlayer
is recreated we block media loading even if the video was playing when the page
went into
the BF cache. Fix this by ignoring the `preload` attribute if an element has
already
prepared to play.
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::attributeChanged):
(WebCore::HTMLMediaElement::maybeUpdatePlayerPreload const):
(WebCore::HTMLMediaElement::effectivePreloadValue const):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::mediaLoadingFailed):
(WebCore::HTMLMediaElement::prepareToPlay):
(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):
* Source/WebCore/html/HTMLMediaElement.h:
* Source/WebCore/html/MediaElementSession.cpp:
(WebCore::MediaElementSession::effectivePreloadForElement const):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::needsAutoplayPlayPauseEvents const):
(WebCore::handlePremierLeagueQuirks):
* Source/WebCore/page/QuirksData.h:
Canonical link: https://commits.webkit.org/294392@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