You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Video: after metadata, seek every video to 0, played or not #74
What
When freezing video, wait for metadata on every <video>, then set currentTime = 0 on all of them and await seeked, whether or not they played.
Why
A page's IntersectionObserver called currentTime(0) sometimes before metadata and sometimes after. Only a seek after metadata switches the box from the poster's aspect ratio to the video's. So the player's height was bistable: 366.2 vs 380.5 px.
Waiting for loadedmetadata alone didn't fix it.
freezeVideo only rewinds videos that have played.
Wait-then-seek-all gave 10 of 10 loads at 380.5.
This refines the "video loadedmetadata" point in #59.
Activity