web: keep canvas renderer while forcing audio signals
This commit is contained in:
parent
4b9d965fac
commit
c545b2381d
2 changed files with 4 additions and 9 deletions
|
|
@ -169,14 +169,9 @@ function mountPlayer(relayUrl, name) {
|
||||||
watch.connection.websocket = { enabled: false };
|
watch.connection.websocket = { enabled: false };
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use a media element for live playback so browser audio controls/policies apply naturally.
|
const canvas = document.createElement("canvas");
|
||||||
const video = document.createElement("video");
|
canvas.className = "canvas";
|
||||||
video.className = "archiveVideo";
|
watch.appendChild(canvas);
|
||||||
video.controls = true;
|
|
||||||
video.autoplay = true;
|
|
||||||
video.muted = false;
|
|
||||||
video.playsInline = true;
|
|
||||||
watch.appendChild(video);
|
|
||||||
|
|
||||||
mount.appendChild(watch);
|
mount.appendChild(watch);
|
||||||
const forceAudioOn = () => {
|
const forceAudioOn = () => {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ In `apps/web/app.js`, configure each `<moq-watch>` instance to disable WebSocket
|
||||||
|
|
||||||
- `watch.connection.websocket = { enabled: false }`
|
- `watch.connection.websocket = { enabled: false }`
|
||||||
|
|
||||||
Also set default watcher volume to full (`volume="1"`) and mount live playback on a `<video>` element (with controls) inside `<moq-watch>` so browser audio policies and controls apply predictably. On mount, force audio signals to `muted=false` and `volume=1`.
|
Also set default watcher volume to full (`volume="1"`). Keep canvas live rendering, and on mount force audio signals to `muted=false` and `volume=1`.
|
||||||
|
|
||||||
## Rationale
|
## Rationale
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue