Dawn Stream signaling

Signaling discovers streamers and viewers, authenticates them, and relays SDP/ICE. It does not carry media—WebRTC RTP goes peer-to-peer (or via TURN).

Standalone vs embedded

ModeWhen to useHow
Standalone (Node)Local demos and productionGems/DawnStream/Signalingnode src/main.ts
Embedded (in-engine)Single-machine / Editor demosSignaling.Embedded=true or Editor default (UseRemoteSignaling=false)

Do not configure the same logical instance from both streamer setreg and Node flags as if they were two servers—pick one host process.

Standalone quick start

cd Gems/DawnStream/Signaling
$env:PS_STREAMER_TOKEN = "<streamer-token>"
$env:PS_VIEWER_TOKEN = "<viewer-token>"
node src/main.ts --port 8090

Streamer points Signaling.Url (or --dawnstream-signaling-url) at ws://127.0.0.1:8090 and sets DAWNSTREAM_AUTH_TOKEN to the same streamer token.

Embedded

Set in project setreg or CLI:

  • Signaling.Embedded / --dawnstream-embedded-signaling
  • Port is taken from Signaling.Url (e.g. ws://127.0.0.1:8090 → listen 8090)

Editor defaults to embedded unless Editor.UseRemoteSignaling=true. Optional embedded extras (RestApi, ServeStatic, queue) live under the same Signaling.* setreg block—see Configuration.

Auth model

RoleEnv (preferred)CLI (avoid in production)
StreamerPS_STREAMER_TOKEN (signaling) + DAWNSTREAM_AUTH_TOKEN (engine)--streamer-token
ViewerPS_VIEWER_TOKEN--viewer-token
AdminPS_ADMIN_TOKEN--admin-token

Engine side: empty Signaling.AuthToken reads Signaling.AuthTokenEnv (default DAWNSTREAM_AUTH_TOKEN). Admin token env default: DAWNSTREAM_ADMIN_TOKEN.

Never put long-lived tokens on the process command line, in setreg committed to git, or in image layers. Prefer short-lived viewer tickets in production.

Health and readiness

EndpointPurpose
GET /healthzLiveness
GET /readyzReadiness

Use these from load balancers and local smoke checks before blaming WebRTC.

Common server flags

node src/main.ts --port 8090 `
 --stun stun:stun.l.google.com:19302 `
 --turn turn:turn.example.com:3478 `
 --turn-username user --turn-password secret `
 --tls-cert fullchain.pem --tls-key privkey.pem
Flag / envDescription
--host / --portListen address (default 0.0.0.0:8090)
PS_STREAMER_TOKEN / PS_VIEWER_TOKEN / PS_ADMIN_TOKENAuth tokens (preferred over CLI)
--max-viewersViewers per streamer (MVP default 1)
--max-player-countGlobal participant cap (-1 = unlimited)
--keepalive-secs / --idle-timeout-secs / --reserve-timeout-secsLiveness / idle / reserve timeouts
--stun / --turn + credentialsICE servers advertised to clients
--tls-cert / --tls-keyEnable wss:// (both required)
--rest-api / --rest-api-tokenRead-only monitoring under /api/*
--serve-static / --serve-frontend / --http-root / --homepageHost frontend files (demos)
--cors / --cors-allowed-originsCross-origin (default same-origin only)
--enable-queue / --max-queue-lengthFIFO when at capacity (default hard reject)
--enable-sfu / --sfu-streamer-idOptional SFU routing (extension)
--orchestratorInstance orchestration (none / stub / local / k8s)—roadmap / advanced

Production should use WSS + short-lived tokens + TURN. Orchestrator / SFU flags are not required for the MVP single-viewer loop.

What signaling exchanges

High-level WebSocket JSON flow (names abbreviated):

  1. Client authenticates with role + token.
  2. Streamer registers; viewer joins / reserves a session.
  3. Peers exchange SDP offer/answer and ICE candidates through the hub.
  4. Keepalive via signaling.ping / signaling.pong.
  5. Close with application codes in 4000–4999 (rejected / recycled / retryable).

Default negotiation: viewer creates the offer. Engine Video.OfferToReceive=true flips so the streamer offers (advanced).

Media and input never go through this hub.

Next steps


Copyright © 2026 DawnEngine. All rights reserved.

DawnEngine is a commercial 3D engine distributed under the DawnEngine end-user license agreement. Engine binaries and source are proprietary and are not covered by the licenses below.

Documentation only: the prose and templates on this site are a derivative work of Open 3D Engine (O3DE) documentation by the O3DE Contributors, used under CC BY 4.0 (documentation content), Apache 2.0 (site code), and the MIT license (inline code samples).

The open-source 3D engine that DawnEngine is built on top of is Open 3D Engine . DawnEngine is not affiliated with, endorsed by, or sponsored by The Linux Foundation or the O3DE project. “O3DE” and “Open 3D Engine” are trademarks of The Linux Foundation.