abundant-magician-17307
02/17/2025, 8:12 AMgray-monkey-83525
02/17/2025, 8:12 AMEgressClient
with your LiveKit host, API key, and secret.
2. Configure Stream Output: Create a StreamOutput
object specifying the RTMP protocol and the target URLs for streaming.
3. Start RoomComposite Egress: Use the startRoomCompositeEgress
method, providing the room name, stream output configuration, and layout options.
Here's a basic example in JavaScript:
const egressClient = new EgressClient('https://my-livekit-host', 'livekit-api-key', 'livekit-api-secret');
const streamOutput = new StreamOutput({
protocol: StreamProtocol.RTMP,
urls: ['rtmp://youtube-url/stream', 'rtmps://twitch-url/path'],
});
const info = await egressClient.startRoomCompositeEgress('my-room', { stream: streamOutput }, { layout: 'grid' });
Would you like more details on any specific part of the process?
Sources:
- RoomComposite Egress
- Egress API 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.