From 66ce78e82d5849a8b660d6e0efd24a23871bb6a1 Mon Sep 17 00:00:00 2001 From: "every.channel" Date: Tue, 24 Feb 2026 23:03:34 -0800 Subject: [PATCH] web: force WebTransport-only moq-watch sessions --- apps/web/app.js | 7 ++++++ .../ECP-0076-webtransport-only-web-watcher.md | 23 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 evolution/proposals/ECP-0076-webtransport-only-web-watcher.md diff --git a/apps/web/app.js b/apps/web/app.js index 483a3df..be2e7e0 100644 --- a/apps/web/app.js +++ b/apps/web/app.js @@ -161,6 +161,13 @@ function mountPlayer(relayUrl, name) { // Support both @moq/watch attribute variants across minor versions. watch.setAttribute("name", name); watch.setAttribute("path", name); + watch.setAttribute("volume", "1"); + + // Force WebTransport in-browser; websocket fallback has shown degraded + // media behavior (especially audio) against public relay paths. + if (watch.connection && typeof watch.connection === "object") { + watch.connection.websocket = { enabled: false }; + } // A canvas enables video rendering. Without it, only audio is played. const canvas = document.createElement("canvas"); diff --git a/evolution/proposals/ECP-0076-webtransport-only-web-watcher.md b/evolution/proposals/ECP-0076-webtransport-only-web-watcher.md new file mode 100644 index 0000000..baf9e9c --- /dev/null +++ b/evolution/proposals/ECP-0076-webtransport-only-web-watcher.md @@ -0,0 +1,23 @@ +# ECP-0076: WebTransport-Only Browser Watcher Path + +## Context + +The browser watcher (`@moq/watch`) races WebTransport against WebSocket fallback by default. In production relay sessions this fallback path correlates with degraded playback behavior (frequent stream resets and unreliable audio despite active subscription). + +## Decision + +In `apps/web/app.js`, configure each `` instance to disable WebSocket fallback before connect: + +- `watch.connection.websocket = { enabled: false }` + +Also set default watcher volume to full (`volume="1"`) to avoid low-volume false negatives during validation. + +## Rationale + +- Aligns browser transport with the intended relay mode (WebTransport MoQ). +- Removes fallback-induced variability from live playback behavior. +- Keeps implementation local to web app wiring without forking upstream packages. + +## Reversibility + +- Remove the connection override to restore default fallback behavior.