Publish
Send each track once
A publisher announces a broadcast under a path and sends its tracks to the relay. It sends one copy of each, whether ten people are watching or ten thousand.
- Camera, microphone and screen, or your own data: chat messages, game controls, telemetry.
- From the browser with @moq/publish, from iOS and Android with MoQKit.
- What you send to the relay is free.
publish.ts@moq/publish
// publishUrl comes from your backendconst connection = await Moq.Connection.connect( new URL(publishUrl),);const broadcast = new Publish.Broadcast({ connection, name: Moq.Path.from(PUBLISHER_PATH), enabled: true, video: { source: camera.source, hd: { enabled: true }, }, audio: { enabled: true, source: microphone.source },});