Repository navigation
Freeze video by default; --mask-media masks iframes only - #33
Merged
Merged
Conversation
Every video, open shadow roots included, is paused before the scroll and again after the network settles, with play() stubbed; one that has played is rewound to frame 0 and awaited on `seeked`, one that hasn't keeps its poster. video.js text tracks and control bars are hidden. Opt out with --no-freeze-video or config freezeVideo: false. Closes #29 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…escendants An init script stubs play() and turns autoplay off at loadstart, so no video starts and each keeps its poster however fast it loads. Adds a video fixture whose clip loads later on the right. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Closes #29
src/capture.ts):prepare()adds an init script that stubsHTMLMediaElement.prototype.playand setsautoplay = falseon every media element'sloadstart, so from the page's first script on no video plays and each shows its poster, however fast its media loads. As a fallback, before the lazy-load scroll and again afternetworkIdle, everyvideo(open shadow roots included) is paused; one that played anyway is rewound to 0 and awaited onseeked(2s cap)..vjs-text-track-display,.vjs-control-barand the control bar's descendants are hidden viavisibilityin the injected CSS, so the player's own box and styles are still compared.--no-freeze-video/ configfreezeVideo: false(validated as boolean, CLI wins). Added to the--cache-rightkey; the report's "Pinned" line reflects it.--mask-medianarrowed toiframe; README, how-it-works, config example, skill and reference docs updated.videoguard rail (autoplay, script-played and late-inserted videos with posters; the fixture server delays the right side's clip by 400ms) must come out clean. Before the init script it scored 88.13% on 3 of 3 runs; after, clean on 3 of 3.mediafixture: video identical on both sides; bare → diff (iframe),--mask-media→ 0 (caption hidden),--mask-media --no-freeze-video→ diff.Behavior changes
--mask-media/maskMedia: trueno longer masksvideo. Video boxes are now compared (frozen), so accepted entries and--rerun-failedstate from earlier runs may not match.--no-freeze-videoalso drops main's pause/reset during the lazy-load scroll: videos play throughout, so expect unstable pixels ordid not settle. With--mask-mediaas well, video is neither masked nor frozen.Not covered: videos inside iframes are only covered by the init script (it runs in every frame), not by the pause/seek fallback;
--mask-mediastill masks them.🤖 Generated with Claude Code