Skip to content
Permalink
Browse files
Trigger element fullscreen video extraction after the seeked event
https://bugs.webkit.org/show_bug.cgi?id=241053

Reviewed by Devin Rousso.

* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::handleEvent):
(WebKit::WebFullScreenManager::setMainVideoElement):

Canonical link: https://commits.webkit.org/251090@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
whsieh committed May 28, 2022
1 parent 25cefe2 commit dae5e4db14d8486c14b2cf58fe11fb7d7bc77abb
Showing 1 changed file with 3 additions and 1 deletion.
@@ -387,7 +387,8 @@ void WebFullScreenManager::handleEvent(WebCore::ScriptExecutionContext& context,
}

if (targetElement == m_mainVideoElement.get()) {
if (m_mainVideoElement && m_mainVideoElement->paused())
auto& targetVideoElement = downcast<HTMLVideoElement>(*targetElement);
if (targetVideoElement.paused() && !targetVideoElement.seeking())
scheduleMainVideoElementExtraction();
else
endMainVideoElementExtractionIfNeeded();
@@ -439,6 +440,7 @@ void WebFullScreenManager::setMainVideoElement(RefPtr<WebCore::HTMLVideoElement>

static NeverDestroyed eventsToObserve = std::array {
WebCore::eventNames().seekingEvent,
WebCore::eventNames().seekedEvent,
WebCore::eventNames().playingEvent,
WebCore::eventNames().pauseEvent,
};

0 comments on commit dae5e4d

Please sign in to comment.