Skip to content

DOC: Disable video autoplay - #3040

Merged
Roman Lutz (romanlutz) merged 3 commits into
microsoft:mainfrom
romanlutz:romanlutz-disable-video-autoplay
Oct 8, 2026
Merged

Roman Lutz (romanlutz) merged 3 commits into
microsoft:mainfrom
romanlutz:romanlutz-disable-video-autoplay

Conversation

@romanlutz

Copy link
Copy Markdown
Contributor

Description

Keep the Scanner and CoPyRIT walkthroughs embedded on the landing page, but require an explicit click on Play. The existing MP4 iframe URLs create browser-managed media documents that can autoplay both videos, including the video in the hidden tab.

  • Point the iframes at local HTML players with native controls, poster images, playsinline, and preload="none", without an autoplay attribute.
  • Pause hidden videos when switching tabs, and pause sibling players when another video starts. Restore tab observation after browser history navigation.
  • Publish the players, existing videos, and posters using MyST's static_files configuration. Preserve the direct-video links and static-export placeholders.
  • Keep the documentation version picker out of embedded player pages so it does not cover the video controls.

Related landing-page change: #2634. No PyRIT API or runtime behavior changes.

Tests and Documentation

Added regression tests for manual-playback defaults, published assets, sibling playback coordination, hidden-tab pausing, browser history restoration, and the version-picker opt-out. Updated the landing page and documented the static asset configuration and opt-out marker alongside their implementation.

Validation on the final code:

  • uv run --frozen --no-sync pytest -q tests\unit\build_scripts\test_landing_video_players.py tests\unit\build_scripts\test_inject_version_picker.py: passed, 18 tests.
  • uv run --frozen --no-sync ruff check build_scripts\inject_version_picker.py tests\unit\build_scripts\test_landing_video_players.py tests\unit\build_scripts\test_inject_version_picker.py: passed.
  • uv run --frozen --no-sync ruff format --check build_scripts\inject_version_picker.py tests\unit\build_scripts\test_landing_video_players.py tests\unit\build_scripts\test_inject_version_picker.py: passed.
  • node --check doc\assets\videos\player.js: passed.
  • From doc, uv run --frozen --no-sync jupyter-book build --html --ci: passed.
  • Automated headless Edge 154 at 1440×1000 and 390×844: passed. Both players remain paused at 0:00 with no MP4 requests before clicking Play; both native controls start playback; switching tabs pauses the hidden video; returning to a tab does not resume playback automatically. Embedded players have no version-picker overlays.

The original issue was reproduced on the published /latest/ landing page in automated headless Edge. Chrome and Firefox were not tested directly. The full unit suite and live-target integration tests were not run.

JupyText was not run because no notebook or paired Python documentation files changed.

Roman Lutz (romanlutz) and others added 2 commits October 7, 2026 13:34
Replace MP4 iframe embeds with linked preview images so walkthroughs open only after an explicit click.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use local iframe players with manual controls, pause hidden or competing walkthroughs, and publish their assets through MyST. Exclude embedded player pages from the version picker.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@hannahwestra25 hannahwestra25 self-assigned this Oct 8, 2026
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Oct 8, 2026
Merged via the queue into microsoft:main with commit 3205a7b Oct 8, 2026
56 checks passed
@romanlutz
Roman Lutz (romanlutz) deleted the romanlutz-disable-video-autoplay branch October 8, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants