| Summary: | [macOS] Muted video is sometimes paused when entering fullscreen | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Eric Carlson <eric.carlson> | ||||||||
| Component: | Media | Assignee: | Eric Carlson <eric.carlson> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | calvaris, cdumez, changseok, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, jer.noble, kondapallykalyan, pdr, philipj, sergio, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=238472 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Eric Carlson
2022-03-28 11:26:23 PDT
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]. |