From 5bce56ee79222f1d32a263d70aa42e26b63257b5 Mon Sep 17 00:00:00 2001 From: "every.channel" Date: Sat, 21 Feb 2026 01:34:51 -0800 Subject: [PATCH] wt: use cdn relay defaults and native setup before overrides --- README.md | 4 ++-- apps/web/app.js | 2 +- crates/ec-node/src/main.rs | 16 +++++++++++++--- .../ECP-0063-cloudflare-moq-webtransport.md | 6 +++--- nix/modules/ec-node.nix | 2 +- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b13c02c..ab519c7 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Publish (node -> Cloudflare relay): ```sh cargo run -p ec-node -- wt-publish \ - --url https://interop-relay.cloudflare.mediaoverquic.com/ \ + --url https://cdn.moq.dev/anon \ --name la-nbc \ --input http:///auto/v4.1 ``` @@ -61,7 +61,7 @@ cargo run -p ec-node -- wt-publish \ Watch (web): ```txt -https://every.channel/watch?url=https%3A%2F%2Finterop-relay.cloudflare.mediaoverquic.com%2F&name=la-nbc +https://every.channel/watch?url=https%3A%2F%2Fcdn.moq.dev%2Fanon&name=la-nbc ``` Coverage: diff --git a/apps/web/app.js b/apps/web/app.js index 15bac33..f58c8dd 100644 --- a/apps/web/app.js +++ b/apps/web/app.js @@ -3,7 +3,7 @@ // This uses the upstream hang web component (WebTransport + WebCodecs). // It is intentionally dependency-light: no framework, no bundler. -const DEFAULT_RELAY_URL = "https://interop-relay.cloudflare.mediaoverquic.com/"; +const DEFAULT_RELAY_URL = "https://cdn.moq.dev/anon"; const HANG_WATCH_MODULE_URL = "https://esm.sh/@kixelated/hang@0.7.0/watch/element.js"; let hangWatchModulePromise = null; diff --git a/crates/ec-node/src/main.rs b/crates/ec-node/src/main.rs index db78dea..6506c99 100644 --- a/crates/ec-node/src/main.rs +++ b/crates/ec-node/src/main.rs @@ -4446,11 +4446,21 @@ async fn wt_publish(args: WtPublishArgs) -> Result<()> { .await .context("failed WebTransport CONNECT")?; - // Establish a MoQ session. Cloudflare's relay currently does not always include a selected - // subprotocol in the CONNECT response, so we attempt a few protocol overrides to select - // the correct IETF draft encoding for SETUP. + // Establish a MoQ session. First try native negotiation as-selected by the relay. + // If that fails, fall back to explicit protocol overrides for relays that omit protocol + // selection in CONNECT responses. let client = moq_lite::Client::new().with_publish(publish); + match client.connect(wt.clone()).await { + Ok(session) => { + tracing::info!("connected to relay (native protocol negotiation)"); + return Ok(session); + } + Err(err) => { + tracing::debug!(err = %err, "native MoQ SETUP failed; trying protocol overrides"); + } + } + // These correspond to IETF draft ALPNs as used by moq-lite/web code. // We use string literals here since moq-lite does not currently expose these constants. let attempts: [&str; 4] = ["moqt-16", "moqt-15", "moq-00", ""]; diff --git a/evolution/proposals/ECP-0063-cloudflare-moq-webtransport.md b/evolution/proposals/ECP-0063-cloudflare-moq-webtransport.md index 4526dbb..3213fdf 100644 --- a/evolution/proposals/ECP-0063-cloudflare-moq-webtransport.md +++ b/evolution/proposals/ECP-0063-cloudflare-moq-webtransport.md @@ -8,7 +8,7 @@ Adopt Cloudflare's MoQ relay preview as the default "global" distribution layer Concrete changes: -1. `ec-node` gains a WebTransport MoQ publisher path that can publish a live CMAF (fMP4) stream to a relay URL (default: `https://interop-relay.cloudflare.mediaoverquic.com/`). +1. `ec-node` gains a WebTransport MoQ publisher path that can publish a live CMAF (fMP4) stream to a relay URL (default: `https://cdn.moq.dev/anon`). 2. `every.channel` (the deployed static site) becomes a real web watcher by embedding a WebTransport-capable MoQ player component (``). 3. The existing WebRTC/WS bootstrap directory/relay remains temporarily for compatibility, but is treated as deprecated once MoQ/WebTransport is stable. @@ -41,10 +41,10 @@ Out of scope (explicitly deferred): ### Relay default Default relay endpoint is: -- `https://interop-relay.cloudflare.mediaoverquic.com/` +- `https://cdn.moq.dev/anon` Nodes may override via CLI flags for self-hosted relays or future Cloudflare relay endpoints. -As of February 20, 2026, the production relay endpoint (`https://relay.cloudflare.mediaoverquic.com/`) is observed to close sessions immediately after MoQ `SETUP` for current clients, while the interop relay completes `SETUP` and `ANNOUNCE` tests. +As of February 21, 2026, browser sessions against `https://interop-relay.cloudflare.mediaoverquic.com/` are observed to stall/fail during MoQ session establishment with current web clients, while `https://cdn.moq.dev/anon` establishes browser sessions in Chrome. ### Web player diff --git a/nix/modules/ec-node.nix b/nix/modules/ec-node.nix index 1390da1..946e83e 100644 --- a/nix/modules/ec-node.nix +++ b/nix/modules/ec-node.nix @@ -48,7 +48,7 @@ in relayUrl = lib.mkOption { type = lib.types.str; - default = "https://interop-relay.cloudflare.mediaoverquic.com/"; + default = "https://cdn.moq.dev/anon"; description = "MoQ relay URL for ec-node wt-publish."; };