Skip to content

Commit bf3d5a2

Browse files
krishs0404claude
andcommitted
docs(core): shorten the hidden-tab transport comments to hold the comment share
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent e089d8e commit bf3d5a2

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

‎packages/core/src/runtime/init.ts‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)