← All demos
WHIP publish
Send your camera or screen to any WHIP ingest server (Meshcast, Cloudflare Stream, Twitch) with the standalone whip-client.js. No VDO.Ninja room is involved; viewers watch through the service's WHEP endpoint or player.
- Pick a service. Meshcast works with no account; the others need your own URL or key.
- Start the preview of your camera or screen.
- Publish. It worked when the status turns green ("ICE connected") and the bitrate keeps rising.
- Open the viewer link in another tab or on another device to watch over WHEP.
Service and settings
Preview and publish
Not publishing
Local preview
Video kbps0
FPS0
Packets sent0
Viewer link. Open it in another tab or send it to another device:
Log
Key WHIP client calls in this demo
const client = new WHIPClient('https://cae1.meshcast.io/whip/' + streamId, {
authToken, // optional; sent as "Authorization: Bearer ..."
videoCodec: 'h264', // optional codec preference
videoBitrate: 2500 // kbps
});
client.addEventListener('icestate', (e) => console.log('ICE', e.detail.state));
const stream = await navigator.mediaDevices.getUserMedia({ video: true, audio: true });
await client.publish(stream); // POSTs the SDP offer, applies the answer
// Viewers: new WHEPClient('https://cae1.meshcast.io/whep/' + streamId)
await client.stop(); // DELETEs the session and closes the connection