web: force WebTransport-only moq-watch sessions
This commit is contained in:
parent
305ea39828
commit
66ce78e82d
2 changed files with 30 additions and 0 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue