File tree Expand file tree Collapse file tree
packages/core/src/runtime Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4784,11 +4784,8 @@ export function initSandboxRuntimeModular(): void {
47844784 armParkTimer ( ) ;
47854785 } ;
47864786
4787- // A hidden document runs no animation frames, but its media keeps playing, so the
4788- // transport that ends a clip's window and starts the next one has to tick on a
4789- // timer while hidden. Chromium does not throttle the timers of a page playing audio;
4790- // a page playing only muted or silent media is clamped to about one timer a second,
4791- // so a clip there can end up to a second late.
4787+ // Hidden documents run no animation frames but their media plays on, so tick on a timer.
4788+ // Chromium clamps it to ~1 s unless audio is audible: a clip may end up to 1 s late.
47924789 let transportTickTimerId : number | null = null ;
47934790 const transportTickPending = ( ) => state . transportRafId != null || transportTickTimerId != null ;
47944791 const requestTransportTick = ( ) => {
@@ -4811,8 +4808,7 @@ export function initSandboxRuntimeModular(): void {
48114808 transportTickTimerId = null ;
48124809 }
48134810 } ;
4814- // A frame requested just before the tab hid never fires; a timer set just before it
4815- // showed again ticks at timer rate for no reason. Move a pending tick across.
4811+ // A frame requested just before the tab hid never fires: move a pending tick across.
48164812 const onTransportVisibilityChange = ( ) => {
48174813 if ( state . tornDown || ! transportTickPending ( ) ) return ;
48184814 cancelTransportTick ( ) ;
You can’t perform that action at this time.
0 commit comments