wt: use cdn relay defaults and native setup before overrides

This commit is contained in:
every.channel 2026-02-21 01:34:51 -08:00
parent 0c76f33333
commit 5bce56ee79
No known key found for this signature in database
5 changed files with 20 additions and 10 deletions

View file

@ -53,7 +53,7 @@ Publish (node -> Cloudflare relay):
```sh ```sh
cargo run -p ec-node -- wt-publish \ cargo run -p ec-node -- wt-publish \
--url https://interop-relay.cloudflare.mediaoverquic.com/ \ --url https://cdn.moq.dev/anon \
--name la-nbc \ --name la-nbc \
--input http://<hdhr-host>/auto/v4.1 --input http://<hdhr-host>/auto/v4.1
``` ```
@ -61,7 +61,7 @@ cargo run -p ec-node -- wt-publish \
Watch (web): Watch (web):
```txt ```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: Coverage:

View file

@ -3,7 +3,7 @@
// This uses the upstream hang web component (WebTransport + WebCodecs). // This uses the upstream hang web component (WebTransport + WebCodecs).
// It is intentionally dependency-light: no framework, no bundler. // 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"; const HANG_WATCH_MODULE_URL = "https://esm.sh/@kixelated/hang@0.7.0/watch/element.js";
let hangWatchModulePromise = null; let hangWatchModulePromise = null;

View file

@ -4446,11 +4446,21 @@ async fn wt_publish(args: WtPublishArgs) -> Result<()> {
.await .await
.context("failed WebTransport CONNECT")?; .context("failed WebTransport CONNECT")?;
// Establish a MoQ session. Cloudflare's relay currently does not always include a selected // Establish a MoQ session. First try native negotiation as-selected by the relay.
// subprotocol in the CONNECT response, so we attempt a few protocol overrides to select // If that fails, fall back to explicit protocol overrides for relays that omit protocol
// the correct IETF draft encoding for SETUP. // selection in CONNECT responses.
let client = moq_lite::Client::new().with_publish(publish); 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. // 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. // We use string literals here since moq-lite does not currently expose these constants.
let attempts: [&str; 4] = ["moqt-16", "moqt-15", "moq-00", ""]; let attempts: [&str; 4] = ["moqt-16", "moqt-15", "moq-00", ""];

View file

@ -8,7 +8,7 @@ Adopt Cloudflare's MoQ relay preview as the default "global" distribution layer
Concrete changes: 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 (`<hang-watch>`). 2. `every.channel` (the deployed static site) becomes a real web watcher by embedding a WebTransport-capable MoQ player component (`<hang-watch>`).
3. The existing WebRTC/WS bootstrap directory/relay remains temporarily for compatibility, but is treated as deprecated once MoQ/WebTransport is stable. 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 ### Relay default
Default relay endpoint is: 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. 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 ### Web player

View file

@ -48,7 +48,7 @@ in
relayUrl = lib.mkOption { relayUrl = lib.mkOption {
type = lib.types.str; 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."; description = "MoQ relay URL for ec-node wt-publish.";
}; };