← Back to Pull requests

fix(video): refresh decoder capabilities and attach source before playback #1530

Closed
unknown closed this pull request without merging on Dec 03, 2026 12:47 UTC
View on GitHub
unknown unknown commented on Dec 03, 2026 07:23 UTC
Author

Motivation

Closes #1529. Overlook 0.78.0 on macOS marked HEVC originals preserved-only even though its own later codec probes returned probably. Its debugger also caught “play() request was interrupted by a new load request”: native play ran before React committed the source.

Description

  • Revalidate early negative capability results after one shared asynchronous Chromium decoder-discovery request and when a viewer subscribes. Refresh grid and viewer together; cache positives and keep genuinely unsupported streams refused. The discovery query cannot authorize another codec.

  • Start intentional playback after source commit, handle refreshed custody URLs, reset retry without autoplay, and clean up the source/remux transport on end/error/close. Share one guarded native/remux session for initial play and resume; treat AbortError as interruption and ignore late failures after teardown. Refusal announcements wait for settled discovery and recheck the live verdict after subscription updates.

  • Preserve the requirement that every audio and video stream be decodable, the codec/container matrix, original bytes and existing authorization boundaries. No new decoder, transcoding or persistent playability data.
  • Documentation

    ADR-0026 clarifies settled device discovery before the capability implementation commit. Common-video acceptance separates deterministic DOM evidence, real encrypted H.264/AAC and H.264/PCM decoder assertions, and signed macOS HEVC verification. Synthetic fixture commands and hashes are recorded alongside the fixtures.

    Changeset

  • Patch changeset included.
  • Acceptance coverage

  • Updated the common-video coverage ledger with both DOM suites, real-decoder E2E scenarios, and the signed-device manual check.
  • Testing

    Cheap gates ran sequentially:

    npm run lint
    npm test
    npm run docs:gov
    npm run format:check
    npm run check:acceptance-coverage
    npm run check:changesets
    npm run check:interop-acceptance
    npm run check:a11y-budget
    

    All passed. Final player/test deltas also passed targeted ESLint and DOM compile. Full tests: 2,885 unit passes, 10 expected skips, 145 DOM passes, paging check pass. The 14 targeted regressions include delayed discovery, true refusal, shared work, container isolation, failed discovery, first play, retry, replay, refreshed-source cleanup, late rejection, pause while pending, stale resume failures, settled screen-reader announcements, and remux pause/resume ownership. Docs governance: 130 documents, zero findings.

    Hosted exact-head qualification passed at run 47062089615 on 0e3565bb567d4f53a04bef5946b3d25880cf9888: all 15 current-head checks successful, including coverage/build/Storybook, Windows x64, Docs governance, CodeQL and both required aggregate gates. E2E executed 147 passes with 7 expected skips; both real QuickTime AAC and PCM first-play/replay scenarios passed (4.4 seconds each). All three review findings have visible fixing-commit replies and are resolved. Each real-decoder E2E scenario captures video dimensions, time and decoded audio bytes in one evaluation on both first play and replay and retains those exact snapshots in decoded-video-and-audio.json; presence of player controls alone is insufficient. No heavy local lanes ran.

    Manual Testing

    1. On the affected signed macOS build, import the synthetic H.264/AAC, H.264/PCM and HEVC/AAC fixtures plus representative iPhone HEVC/AAC and HEVC/PCM originals. Opening must not autoplay; settled decoder discovery must restore the Play control where supported.
    2. One click starts video with audio. Pause, seek, let it end, replay, page away, close and lock; earlier playback must stop and retry must require a fresh play action.
    3. Export originals and compare source hashes.

    The user's installed-build codec verdicts and debugger breakpoint identify the original defects. They are not presented as a post-fix signed-package run.

    <!-- agent-bot-write: ghw_4df2325807a42a93 session=f601b21bf418 bot=trueline-codex-agent[bot] conversation_id=video-playback-macos conversation_id_source=self-reported -->

    Diff: 538 lines (+403 / -135) across 6 files Reviewer: qwts Review duration: 323m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 538 lines diff across 6 files
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.376
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1530"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.9% (MEDIUM) · Higher = larger blast radius
    47.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.9% · Safe to merge
    18.9%