Skip to main content

HLS

The hls resource runs HLS playback streams, the way you broadcast a meeting to a large audience. start returns a handle you stop by room id.

Start HLS

await client.hls.start(roomId, {
composition: { layout: "spotlight", quality: "high" },
});

Options: composition (see Composition), transcription, webhookUrl, recording, templateUrl, resourceId. HLS storage is set at the API-key level, so there is no per-call dirPath.

Get the active stream

Returns the live stream with its playback URLs, or errors if none is active. Use getById / GetByID to fetch a stream by id instead of by room.

const stream = await client.hls.get(roomId);
stream.playbackHlsUrl; // manifest URL for players

Stop HLS

await client.hls.stop(roomId);

Capture a thumbnail

await client.hls.capture({ roomId, format: "png", width: 1280, height: 720 });

Options: roomId (required), format (png, jpg, webp), width, height, time (seconds; omit to capture in real time).

List and delete

await client.hls.list({ roomId });
await client.hls.delete(id);

The HLS stream object

id, roomId, sessionId, quality, orientation, duration, start, end, and the playback URLs playbackHlsUrl, livestreamUrl, downstreamUrl.

Got a Question? Ask us on discord