Video format testing#15923
Draft
abeddow91 wants to merge 4 commits into
Draft
Conversation
fe14682 to
e0f7e7a
Compare
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.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
A branch to test the performance of video types across browsers.
Not for production
Why?
Screenshots