This message was deleted.
# helpdesk
s
This message was deleted.
d
By "calling Api's Directly", I meant
Copy code
const egressClient = new EgressClient(
    '<https://my-livekit-host>',
    'livekit-api-key',
    'livekit-api-secret'
);

const info = await egressClient.startRoomCompositeEgress('my-room', {
    layout: 'speaker',
});
const egressID = info.egressId;
This would work right? (There is no output variable as mention in the doc)
•
fileRequest.Output.File.Output
can be left empty if one of
s3
,
azure
, or
gcp
is supplied with your config. This is what I inferenced from this line...
Also Another doubt - does adding this s3: section in egress.yaml would be of any help in calling egress through APIs?
Copy code
curl -X POST https://<your-livekit-host>/twirp/livekit.Egress/StartRoomCompositeEgress \
        -H "Authorization: Bearer <access-token>" \
        -H 'Content-Type: application/json' \
        -d '{"room_name": "your-room", "segments": {"filename_prefix": "your-hls-playlist.m3u8", "s3": {"access_key": "<key>", "secret": "<secret>", "bucket": "<bucket>", "region": "<bucket-region>"}}}'
a
ap-south-1 is the right format. You still need to include an output type, because
Copy code
egressClient.startRoomCompositeEgress('my-room', {
    layout: 'speaker',
});
doesn’t tell it whether you want a file, stream, or segmented file output
d
Thanks dc, please tell about the third doubt also.. does adding this s3: section in egress.yaml would be of any help in calling egress through APIs?
hey, also
Copy code
"segments": {"filename_prefix": "your-hls-playlist.m3u8"
what does .m3u8 mean? and is it necessary?
a
Yes, you would not need to add it in the API if it's in the config
m3u8 is the file type for an HLS playlist. You don't need to add it, it will automatically be added if you leave it out
🙏 1
d
Copy code
curl -X POST https://<your-livekit-host>/twirp/livekit.Egress/StartRoomCompositeEgress \
        -H "Authorization: Bearer <access-token>" \
        -H 'Content-Type: application/json' \
        -d '{"room_name": "your-room", "segments": {"filename_prefix": "your-hls-playlist.m3u8"}}'
thanks, just for confirmation, this api call is correct right?