Skip to content

Video format testing#15923

Draft
abeddow91 wants to merge 4 commits into
mainfrom
ab/video-format-testing
Draft

Video format testing#15923
abeddow91 wants to merge 4 commits into
mainfrom
ab/video-format-testing

Conversation

@abeddow91
Copy link
Copy Markdown
Contributor

What does this change?

A branch to test the performance of video types across browsers.

Not for production

Why?

Screenshots

Before After
before after

@abeddow91 abeddow91 added Do not merge ⚠️ maintenance Departmental tracking: maintenance work, not a fix or a feature labels May 19, 2026
@abeddow91 abeddow91 force-pushed the ab/video-format-testing branch from fe14682 to e0f7e7a Compare May 19, 2026 16:14
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

The overlay mounts after the <video> element, so on iOS Safari the loadstart event has typically already fired by the time useEffect runs. loadStartRef.current stayed null, so the playing handler's guard loadStartRef.current !== null was false and STARTUP was never computed. iOS Safari's playing event is also less reliable than timeupdate.
Changes in SelfHostedVideoDebugOverlay.tsx:
seedLoadStartFromResourceTiming() — if loadstart was missed, derive a load-start timestamp from the matching PerformanceResourceTiming entry's startTime (most accurate), falling back to performance.now().
computeStartup() — central helper that seeds the load-start time if needed before computing, so STARTUP can no longer be silently skipped.
timeupdate listener — first timeupdate with currentTime > 0 is now treated as a "started playing" signal, since playing is flaky on iOS Safari.
Mount-time back-fill — if the video already has currentSrc/readyState > 0 (or is already playing) when the effect attaches, we seed load-start and, if applicable, compute startup immediately.
Cleanup updated to remove the new timeupdate listener.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Do not merge ⚠️ maintenance Departmental tracking: maintenance work, not a fix or a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant