-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1912543 - Fix requestVideoFrameCallback with suspended/invisible …
…videos. r=media-playback-reviewers,padenot When a tab is backgrounded, or on some platforms, when the window is fully covered, full decoding of a video for playback is disabled. The video timeline still advances, but there are no valid frames for presentation. Similarly, if an HTMLVideoElement is in the DOM tree but marked as invisible (e.g. 'display: none;' is set), we also cease full decoding of a video. This is the VideoDecodeMode::Suspend mode. Chrome and Safari both continue to honour requestVideoFrameCallback when the video element is invisible in a foreground tab. Conversely, when we are in a backgrounded tab, Chrome suspends rVFC callbacks, while Safari continues. Given that we suspend requestAnimationFrame callbacks similar to Chrome for backgrounded tabs, this patch matches our behaviour with Chrome. The standard does not discuss the implications of visibility and background/foreground on rVFC. We have filed an issue requesting for clarification, and that can tracked at: WICG/video-rvfc#92 Differential Revision: https://phabricator.services.mozilla.com/D220274
- Loading branch information
Showing
6 changed files
with
72 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters