1.1 KiB
1.1 KiB
ECP-0078: Live <video>-First Rendering With Gesture Audio Unlock
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:
- Render live playback with a
<video>child in<moq-watch>first. - Start muted 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.
- forcing backend
- If
<video>playback stalls during startup, automatically fall back to canvas rendering.
Rationale
- Preserves the
<video>UX target while handling browser autoplay constraints explicitly. - Avoids total playback failure by retaining a tested canvas fallback path.
- Keeps changes local to app wiring without forking upstream MoQ player internals.
Reversibility
- Remove the fallback timer and unlock wiring to return to a fixed rendering mode.