rich-monitor-70665
02/28/2025, 11:30 AMgray-monkey-83525
02/28/2025, 11:30 AMlistEgress
method from the LiveKit Egress API. This method allows you to retrieve information about active egress instances, including their stream URLs if they are configured for streaming.
Here's a basic example using JavaScript:
const egressClient = new EgressClient('https://your-livekit-host', 'livekit-api-key', 'livekit-api-secret');
const egressList = await egressClient.listEgress();
egressList.forEach(egress => {
if (egress.streamOutputs) {
console.log(egress.streamOutputs.urls);
}
});
Would you like more details on how to implement this in a specific programming language or environment?
Sources:
- EgressClient | LiveKit JS Server SDK 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.rich-monitor-70665
02/28/2025, 11:32 AMstreamOutputs
is always undefinedgray-monkey-83525
02/28/2025, 11:32 AMstreamOutputs
being undefined could be due to the egress not being configured with stream outputs. When starting an egress, ensure that the stream_outputs
parameter is set correctly in your egress request. This parameter should include the protocol and URLs for the streams.
Here's an example of how to configure stream outputs when starting an egress:
const streamOutput = new StreamOutput({
protocol: 'rtmp',
urls: ['rtmp://your-rtmp-endpoint/path/stream-key']
});
const egressInfo = await egressClient.startRoomCompositeEgress('your-room-name', {
stream: streamOutput
});
If streamOutputs
is still undefined, verify that the egress was started with the correct configuration and that the egress is active. Would you like more detailed troubleshooting steps?
Sources:
- https://livekit-users.slack.com/archives/C07FVFARRK7/p1728540293.805929 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.