-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bbc.co.uk: Video goes black with only audio playing when exiting PiP mode #14737
Conversation
EWS run on previous version of this PR (hash 5ed1fd9) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with this change is it means the fullscreenchange
event won't fire until after the transition into fullscreen has started. For sites that use that event to re-layout into a fullscreen mode, it will mean that transition will have flashes of the original layout visible to the user.
Perhaps we can limit this change to only the BBC with a quirk?
EWS run on previous version of this PR (hash d1ebf7e) |
EWS run on current version of this PR (hash 93cdf18) |
β¦mode https://bugs.webkit.org/show_bug.cgi?id=257711 rdar://108304377 Reviewed by Jer Noble. Only fire the fullscreen change event once we did enter fullscreen. This gives time for the UI process to complete exiting PiP in the UI process. The process for exiting PiP and go back into fullscreen is a complicated (and unnecessary) dance between the content and the UI process. didStopPictureInPicture (UI) -> requestRestoreFullScreen (CP) -> EnterFullScreen (UI) -> WillEnterFullscreen (CP) -> beganEnterFullScreen (UI) -> didEnterFullScreen (UI) -> didEnterFullScreen (CP) Previously, the events `fullscreenchange` was fired in WillEnterFullscreen. if a JS event listener was set, and attempted to exit PiP then (as BBC website is doing) it would have left VideoFullscreenInterfaceAVKit in a broken state once it received `beganEnterFullScreen` as it's not an handled chained of event. By letting the UI process complete the exit of PiP back to fullscreen, we can avoid the problem from occurring alltogether, and this is simply done by firing the events and resolving the promise in didEnterFullScreen. We limit this behaviour to BBC.com This entire code is in serious need of a rewrite. Manually tested under all possible interface scenarios: - Entering PiP, Exiting PiP using BBC main player control. - Entering PiP, Exiting PiP using PiP controller button. - Entering fullscreen via BBC control, entering PiP using PiP button, exiting PiP using BBC main player control - As above but using PiP controller button as last step. - Going into Auto-Pip by swiping home and exiting PiP. - Entering PiP, quitting PiP (X button) * Source/WebCore/dom/FullscreenManager.cpp: (WebCore::FullscreenManager::willEnterFullscreen): (WebCore::FullscreenManager::didEnterFullscreen): * Source/WebCore/page/Quirks.cpp: (WebCore::Quirks::shouldDelayFullscreenEventWhenExitingPictureInPictureQuirk const): * Source/WebCore/page/Quirks.h: Canonical link: https://commits.webkit.org/264974@main
93cdf18
to
ba39716
Compare
Committed 264974@main (ba39716): https://commits.webkit.org/264974@main Reviewed commits have been landed. Closing PR #14737 and removing active labels. |
ba39716
93cdf18
π§ͺ api-macπ§ͺ mac-AS-debug-wk2