Repository navigation
feat: videos - Complete mapped playback and unavailable states #372
Description
Outcome
Complete consistent source-backed modal/detail playback with truthful failure states.
Verified context
VideoPlayer.tsx already supports YouTube, Vimeo and direct files; source-error presentation and the direct-file captions source are incomplete.
Scope
Reuse existing players and implement approved accessibility references only when assets exist.
Acceptance criteria
- Supported URL forms select the intended player.
- Missing/invalid media and direct-file failures show accessible fallback states.
- Closing/changing a modal stops obsolete playback; both contexts use mapped sources.
- Supplied accessibility assets connect appropriately; tests cover provider mapping and controlled failures without claiming live-provider verification.
Boundaries and sources
Creation defines work only; it does not start implementation. Preserve unrelated code, protected assets, editorial wording and existing records. Do not fabricate content, identity, media, manuscript chapters, dates or engagement data. Use approved repository-native authoring, validation, preview and publication decisions; do not provision an external CMS or database. Existing editorial verification remains with its current issues. All acceptance criteria remain unchecked until evidenced.
Repository evidence was inspected on develop at 4ecdb26d9655a48bf000a7c89da2f70383edce87. Recheck before implementation; no build or browser tests were run for this draft. Follow repository instructions and applicable Spec Kit requirements. Paths below refer to this repository.
Sources: repository instructions, application, editorial content.
Branch instructions
- Repository: lightspeedwp/ThisOneTimeOnAcidCom
- Proposed branch:
feat/videos-playback-states - Base:
develop - Naming policy: local guide, validator, organisation strategy.
- Pull request template: Organisation .github/PULL_REQUEST_TEMPLATE/pr_feature.md, per inspected local routing; recheck before opening a PR.
- Constraints: Preserve unrelated changes; do not force-push, merge or deploy. Complete applicable Spec Kit requirements before implementation.
- Conflicts or missing evidence: Proposed branch, not an existing branch; collision freedom is unverified. Recheck current branch routing and open governance changes, including PR automation: repo-governance - Add governance automation and validation #346. Older instructions claim branch rules are absent; the inspected local guide and executable validator establish the current convention. This draft creates no branch or pull request.
Branch instructions — batch 19 audit addendum
- Repository:
lightspeedwp/ThisOneTimeOnAcidCom; implementing target: this playback issue and verified GitHub counterpart 372 only. - Prefix:
feat/; proposed branch:feat/videos-playback-states; base: refresheddevelop, checked at4ecdb26d9655a48bf000a7c89da2f70383edce87(R). Organisation baseline:8f28eca80bff198879f7aaf496717dc0551bb32e(O). - Branch state: proposed new branch, not created/reused. Absent from inspected branches; no matching open implementation PR identified. Refresh before implementation; do not repurpose unrelated branches.
- Naming: local guide and validator authorise feat/type-scope-title. Static inspection only. Older no-conventions claims conflict with current files.
- PR template: shared Feature template. Local workflow suggests it/applies a label, not body insertion. Native loading unverified; frontmatter does not authorise metadata changes.
- Parent context: preserve hierarchy; omit coordination-parent identifiers/links from branches, PR metadata and coding prompts. Never use the parent as a native development/closing target.
- Allowed closing targets: none currently. Partial work cannot close the issue; future references/associations require separate review. Do not copy closing placeholders.
- Governance PR346 is context only, not delivered infrastructure, approval or reuse branch. No implementation, branch/PR operations, execution, merge or deployment authorised.
Expected file changes
Provisional plan, not delivered code. Existing paths inspected at R; test filename proposed. Follow repository instructions and applicable guidelines before implementation.
| Operation | Path | Intended change | Evidence/revision | Approval or dependency |
|---|---|---|---|---|
| Edit, bounded | src/app/components/ui/VideoPlayer.tsx |
Validate approved provider hosts/URL forms and direct sources; accessible invalid/source-error states; handle rejected play, reset state and stop obsolete media; use genuine supplied caption/transcript references | R: substring detection, unchecked play promise and empty caption track | Approved formats/wording and delivered optional-media contract; preserve callers |
| Edit, bounded | src/app/components/pages/videos/VideoModal.tsx |
Replace duplicate embed construction/raw iframe with shared player; teardown on close/source change | R: separate embed helper/iframe | Delivered mapped records; preserve routing-owned focus work |
| Edit, bounded | src/app/components/pages/videos/VideoDetailPage.tsx |
Pass approved playback/accessibility values; reset obsolete playback when source changes | R: player receives URL/title only | Coordinate routing work; no lookup/taxonomy/share/navigation ownership here |
| Edit, bounded | src/app/data/mock/ui/videos.ts |
Playback/unavailable/control/accessibility wording only | R: existing UI module and hardcoded player/modal labels | Approved UK English/sentence case; preserve routing labels |
| Edit, bounded | src/styles/blocks/video-player.css |
Token-based BEM fallback/error states and keyboard-visible controls; preserve light/dark behaviour | R: existing stylesheet/CSS guidelines | Approved presentation; no unrelated restyling |
| Create, proposed | e2e/video-playback.spec.ts |
Controlled provider/URL mapping, invalid/missing sources, direct errors/play rejection, switching, close/reopen cleanup, supplied/absent accessibility references and shared-lightbox regressions | R: Playwright e2e discovery/routing precedent | Delivered routes/adapter; isolated fixtures/browser environment; no live-provider claim |
No moves/deletions. Keyboard journeys/modal focus remain routing work; playback lifecycle/failures belong here. Existing shared lightbox consumes the player: preserve its API/behaviour without expanding edits.
The adapter’s pending batch 17 description and routing’s batch 18 plan are not completed dependencies. Existing video type permits YouTube/Vimeo and lacks caption/transcript fields. Await approved delivered mappings; do not invent field names, assets or APIs. No video specification verified; complete specification/plan/tasks approval first. Extra fixture/contract/source paths require revised preview and approval.
Preserve protected assets/imports/references, fallback component, Supabase, attribution/changelog and managed workflows. Changelog handling requires separate disposition. No editorial/media fabrication, dependency/configuration/deployment changes. No commands, installs, hooks, tests, builds or cloud operations performed. Exclude credentials/restricted material from public sync. Description approval changes no status, owner, labels, hierarchy or PR associations and grants no implementation authority.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
linear-code commentedon Oct 18, 2026
TOA-320