Skip to content

Add Video scroll-into-view autoplay and video compression tooling#126

Merged
AdamGohs merged 2 commits into
mainfrom
enhancement/video-component-and-ffmpeg
Jun 25, 2026
Merged

Add Video scroll-into-view autoplay and video compression tooling#126
AdamGohs merged 2 commits into
mainfrom
enhancement/video-component-and-ffmpeg

Conversation

@AdamGohs

Copy link
Copy Markdown
Collaborator

Summary

  • Video component: autoplay now starts when the video scrolls into view and pauses when it scrolls away (IntersectionObserver), with a prefers-reduced-motion guard so it never autoplays for reduced-motion users. Playback is driven from JS rather than the native autoplay attribute for cross-browser consistency and WCAG 2.2.2 compliance. Preserves main's useBaseUrl asset-path resolution.
  • Compression tooling: new npm run compress-video script (H.264/CRF via the bundled ffmpeg-static, no system install required). It re-encodes videos in place and preserves the untouched original as a gitignored *-raw.* backup. Supports --audio and --crf flags plus batch/glob/folder inputs.
  • Documentation guide: documented the new Video autoplay behavior, GIF-replacement pattern, and WCAG controls guidance (ch. 07); added a "compress before committing" workflow note (ch. 06); and added a compress-video.js manual-utility note (ch. 17).

AdamGohs added 2 commits June 25, 2026 14:09
- Video: IntersectionObserver autoplay + prefers-reduced-motion guard (WCAG 2.2.2), preserving main's useBaseUrl asset resolution

- Add compress-video npm script (H.264/CRF via ffmpeg-static); ignore *-raw.* originals
@AdamGohs AdamGohs requested a review from a team as a code owner June 25, 2026 18:54
@github-actions

Copy link
Copy Markdown

📋 Assigned reviewers for this PR

  • Peer reviewer(s): not assigned
  • Lead Civil reviewer(s): not assigned
  • Technical editor(s): not assigned
  • Director reviewer(s): not assigned

The first approval from any assigned reviewer at the current stage advances the PR. Approvals from non-assigned reviewers are logged but do not advance the stage.

@github-actions

Copy link
Copy Markdown

📋 Lane: Dev Doc

No formal review required.

@usace-rmc/docs-admin please review, merge, and approve the deploy.

@github-actions github-actions Bot added lane:dev Dev docs (docs/dev/**) — admin self-merge, no review required stage:ready-to-merge All reviews complete, ready for final merge labels Jun 25, 2026
@github-actions

Copy link
Copy Markdown

📄 Preview deployed for commit 153129d

https://usace-rmc.github.io/RMC-Software-Documentation-Previews/pr-126/

This preview updates automatically when new commits are pushed. Deleted when the PR closes.

@AdamGohs AdamGohs merged commit 3824fa7 into main Jun 25, 2026
5 checks passed
@AdamGohs AdamGohs deleted the enhancement/video-component-and-ffmpeg branch June 25, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:dev Dev docs (docs/dev/**) — admin self-merge, no review required stage:ready-to-merge All reviews complete, ready for final merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant