← All demos

Publisher with scene links

Publish your camera into a room with the SDK, then open the matching VDO.Ninja scene, director, or view link to see the stream in the regular VDO.Ninja app or OBS.

  1. Optionally set a room, password, and stream ID. Blank fields get a random name or the default password.
  2. Press Start publishing and allow camera and microphone access.
  3. Open a link: Scene shows everyone in the room, Director controls the room, View shows only this stream.

Settings

Not publishing

Local preview

How it works

  • With an empty password field, the SDK uses VDO.Ninja's default password, so the links need no &password.
  • The room name is hashed with the password to make the room ID on the server.
  • A custom password is added to every link; anyone with the link can join, so share it with care.
Key SDK calls in this demo
const vdo = new VDONinjaSDK({ room, password, salt: 'vdo.ninja' });  // omit password for the default
vdo.addEventListener('peerConnected', (e) => viewers.add(e.detail.uuid));
vdo.addEventListener('peerDisconnected', (e) => viewers.delete(e.detail.uuid));

await vdo.connect();
await vdo.joinRoom({ room });
const streamID = await vdo.publish(cameraStream, { streamID: requestedID });

// Matching VDO.Ninja links (add &password=... only for a custom password)
const scene    = `https://vdo.ninja/?room=${room}&scene`;
const director = `https://vdo.ninja/?director=${room}`;
const view     = `https://vdo.ninja/?room=${room}&view=${streamID}&scene`;