Muted video is sometimes paused when entering fullscreen
rdar://89104216
Created attachment 455933 [details] Patch
Created attachment 455937 [details] Patch
Comment on attachment 455937 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455937&action=review > Source/WebCore/html/HTMLMediaElement.cpp:6058 > +#if ENABLE(FULLSCREEN_API) > + auto& fullscreenManager = document().fullscreenManager(); > + if (isVideo() && fullscreenManager.isFullscreen() && fullscreenManager.currentFullscreenElement()) > + return false; > +#endif > + > + if (m_videoFullscreenMode != VideoFullscreenModeNone) > + return false; > + > + return document().hidden(); I think this is incorrect long-term, insofar as element fullscreen on a background space (on macOS) shouldn't always be "visible", but we should file a bug to follow up later. > Source/WebCore/html/HTMLMediaElement.cpp:8344 > + queueTaskKeepingObjectAlive(*this, TaskSource::MediaElement, [this] { > + if (isContextStopped()) > + return; > + mediaSession().isVisibleInViewportChanged(); > + updateShouldAutoplay(); > + schedulePlaybackControlsManagerUpdate(); > + }); Is this necessary?
Comment on attachment 455937 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455937&action=review >> Source/WebCore/html/HTMLMediaElement.cpp:6058 >> + return document().hidden(); > > I think this is incorrect long-term, insofar as element fullscreen on a background space (on macOS) shouldn't always be "visible", but we should file a bug to follow up later. I filed bug 238472 >> Source/WebCore/html/HTMLMediaElement.cpp:8344 >> + }); > > Is this necessary? Oops!
Created attachment 455964 [details] Patch for landing
Comment on attachment 455964 [details] Patch for landing The failing tests don't seem to be related.
Committed r292049 (248986@main): <https://commits.webkit.org/248986@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 455964 [details].