← All demos
WHEP view
Watch a stream from any WHEP endpoint (Meshcast, Cloudflare Stream, other WHEP servers) with the standalone whep-client.js. No VDO.Ninja room is involved.
- Publish a stream first, for example with the WHIP publish demo. Its viewer link opens this page already filled in.
- Enter the WHEP URL. For Meshcast it is the WHIP URL with
/whep/instead of/whip/. - Connect. It worked when the status turns green ("Live") and the received bitrate keeps rising.
- Unmute. Video starts muted so the browser allows autoplay.
Source
Pick at least one: video or audio.
Player
Not connectedKbps received0
FPS0
Resolution-
Packets recv0
Log
Key WHEP client calls in this demo
const client = new WHEPClient('https://cae1.meshcast.io/whep/' + streamId, {
video: true,
audio: true
});
client.addEventListener('track', () => {
video.srcObject = client.getStream(); // every track received so far
});
client.addEventListener('icestate', (e) => console.log('ICE', e.detail.state));
await client.view(); // POSTs a receive-only offer, waits up to 3 s for the first track
// <video autoplay playsinline muted> plus an Unmute button keeps autoplay working
await client.stop(); // DELETEs the session and closes the connection