Title: [294986] trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp
Revision
294986
Author
wenson_hs...@apple.com
Date
2022-05-27 22:24:00 -0700 (Fri, 27 May 2022)

Log Message

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

Modified Paths

Diff

Modified: trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp (294985 => 294986)


--- trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp	2022-05-28 04:30:41 UTC (rev 294985)
+++ trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp	2022-05-28 05:24:00 UTC (rev 294986)
@@ -387,7 +387,8 @@
     }
 
     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 @@
 
     static NeverDestroyed eventsToObserve = std::array {
         WebCore::eventNames().seekingEvent,
+        WebCore::eventNames().seekedEvent,
         WebCore::eventNames().playingEvent,
         WebCore::eventNames().pauseEvent,
     };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to