every.channel/evolution/proposals/ECP-0078-live-video-tag-first-with-audio-unlock.md

1.4 KiB

ECP-0078: Live <video>-First Rendering With Gesture Audio Unlock

Status: Implemented

Context

Live browser playback currently prioritizes canvas rendering. Audio can fail on first load due to autoplay policy (AudioContext was not allowed to start) and we still need a robust <video> rendering path for native controls.

Decision

In the web watcher mount path:

  1. Render live playback with a <video> child in <moq-watch> first.
  2. Start muted at the watcher signal layer for autoplay compatibility, then unlock audio on first user gesture by:
    • forcing backend muted=false, volume=1,
    • toggling paused state to trigger resume,
    • unmuting the <video> element.

Rationale

  • Preserves the <video> UX target while handling browser autoplay constraints explicitly.
  • Keeps changes local to app wiring without forking upstream MoQ player internals.

Alternatives considered

  • Keep canvas-first rendering only. Rejected because native <video> controls/audio handling are still required.
  • Attempt autoplay with unmuted audio by default. Rejected because browser policy blocks reliable first-play behavior.

Rollout / teardown

  • Deploy muted-start plus gesture unlock wiring and validate first-load playback and unmute behavior.
  • Teardown by removing unlock wiring or reverting to prior renderer mode.

Reversibility

  • Remove the unlock wiring (or return to canvas renderer) to restore prior behavior.