Skip to content

fix(player): preserve true start after first-frame bootstrap - #67

Merged
Leftium merged 2 commits into
mainfrom
continuum/bootstrap-preserve-start
Oct 19, 2026
Merged

Leftium merged 2 commits into
mainfrom
continuum/bootstrap-preserve-start

Conversation

@Leftium

@Leftium Leftium commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

This PR follows the Continuum protocol at 9aea333.

Summary

The silent first-frame bootstrap could leave first Play around one second into a video, audibly skipping its opening. Keep the clean paused preview, but restore resolved clip A on first Play before unmuting and starting playback. This applies to both watch and editor.

Changes

  • Separate the temporary provider preview position from the logical playhead. Ignore preview observations until playback or explicit navigation consumes startup restoration.
  • Seek in the existing Play call without adding an asynchronous wait. Deliberate seeking, scrubbing, frame stepping, and scope changes take precedence. Reset restoration per source and ignore stale provider events and bootstrap failures from replaced sources.
  • Preserve duration settling, seek recovery, mute/speed, Loop/Once, signed bounds, and the mounted provider. Document the startup contract in docs/player.md.

The retained preview approach avoids a paused rewind that could restore YouTube's cued thumbnail. YouTube seeks remain approximate; actual audible content and mobile user activation require manual verification.

Verification

  • pnpm check: passed, zero errors/warnings.
  • pnpm lint: passed.
  • pnpm test:clip: 30 passed.
  • pnpm test:share-url: 24 passed.
  • pnpm test:metadata: 18 passed.
  • pnpm build: passed.
  • pnpm test:browser: 36 passed (28 Chromium, 8 WebKit).
  • Temporary mocked-provider PR proof: 2 Chromium cases passed, covering zero, nonzero, signed and short clips in watch/editor; seek-before-Play and unmuted playback; pre-Play scrub/step cancellation; stale preview events; and source navigation. The uncommitted proof was removed after passing; local evidence is /tmp/youloop-67-startup-proof.log and /tmp/youloop-67-startup-preview.spec.ts.
  • Initial routine run: 35 passed, 1 failed because the signed-range journey expected the paused provider to be at A. Updated that obsolete contract to assert logical paused progress and actual resolved-A playback after Play, then reran the regular suite.

Test lifetime: retain first-Play assertions in the existing editor/provider journey and the signed-range journey permanently. They catch silent loss of opening content and signed-start regressions through the real adapter, which numeric Node tests miss. No new test cases, tags, or routine executions remain; existing resize and signed URL/history coverage stays in those journeys. The broad live/advisory suite was not run.

Manual verification after the preview deployment is Ready

Use the latest Vercel Preview linked below, not production before merge:

  1. Open watch and editor fresh, wait for the paused preview, and confirm a clean video frame with no bootstrap audio. Press Play and compare the opening words with the original video from zero. Repeat after reload.
  2. Open the nonzero-A clip and confirm Play begins near 5 seconds. Before first Play, scrub elsewhere or use an editor frame step; Play should honor that position. Try VIDEO/A:B, Loop/Once and replay, and another source or Back/Forward for unexpected rewinds.
  3. Repeat on physical iPhone Safari and Android Chrome where available. Confirm one tap starts playback, the opening words remain intact, and mute/speed still work.

Manual audio and physical-device checks remain pending. Mocked Chromium/WebKit do not prove audible content or real-device autoplay behavior. Leave merge to the maintainer.

@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
youloop Ready Ready Preview Oct 19, 2026 5:29am UTC

@Leftium

Leftium commented Oct 19, 2026

Copy link
Copy Markdown
Owner Author

This PR was claimed

@Leftium

Leftium commented Oct 19, 2026

Copy link
Copy Markdown
Owner Author

This PR's claim 6260289434 was released at 49ff662

@Leftium
Leftium marked this pull request as ready for review October 19, 2026 05:29
@Leftium
Leftium merged commit 80508ed into main Oct 19, 2026
3 checks passed
@Leftium
Leftium deleted the continuum/bootstrap-preserve-start branch October 19, 2026 05:37

This branch was successfully deployed

1 active deployment
Preview — 49ff6626 Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant