web: force WebTransport-only moq-watch sessions

This commit is contained in:
every.channel 2026-02-24 23:03:34 -08:00
parent 305ea39828
commit 66ce78e82d
No known key found for this signature in database
2 changed files with 30 additions and 0 deletions

View file

@ -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");