web: prefer video tag with gesture audio unlock
This commit is contained in:
parent
c545b2381d
commit
ad81b9791a
2 changed files with 63 additions and 7 deletions
|
|
@ -0,0 +1,26 @@
|
|||
# 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:
|
||||
|
||||
1. Render live playback with a `<video>` child in `<moq-watch>` first.
|
||||
2. 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.
|
||||
3. 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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue