This message was deleted.
# cloud
s
This message was deleted.
d
Egress itself is a session-based construct.. (since all of the identifiers change when a new session comes). Even with RoomComposite egress, it would live as long as the room is. However, you can use AutoEgress to configure a template when rooms are created, that will ensure that the new rooms will also start the egress according to your template.
s
Hi @dry-elephant-14928 I have few questions related with AutoEgress.
1. AutoEgress supports the RTMP output same as the normal egress right? 2. Let's say, I created a room via server SDK and configured the RTMP output, User(s) join the session, and disconnected after sometime (let's say close the browser tab) and no buddy left in the room so will autoegress automatically close? and what if user(s) rejoin the same session again will the autoegress restart again using the same RTMP output?
d
CC: @able-gigabyte-21598
a
1. Yes, it supports all the same outputs 2. Yes, autoegress will automatically close when nobody is left in the room, and if people later rejoined it would not restart again. To ensure that sessions are always started with autoegress enabled, you can disable automatic room creation
s
@able-gigabyte-21598 just to confirm, If the auto room creation is disabled with AutoEgress config, and all the users in the room left and re-join (after any interval of time), AutoEgress will automatically start. correct?
a
The room itself would not restart in this situation. You would need to use the CreateRoom api again before the users re-join
s
Oh, That's tricky. What if the room already created, and we call the CreateRoom api again (with same room Name and RTMP output config) ?
let me explain my use case. We send a unique urls to our public users to join the video session, when user land of the unique url, we first perform the authentication/authorization, then we return the token using server side sdk
Copy code
const at = new livekitApi.AccessToken('livekit:key', 'livekit:secret', {
    identity: participantName,
    metadata: JSON.stringify(metadata)
  });
  at.addGrant({ roomJoin: true, room: roomName });
  return at.toJwt();
So before getting the token we can easily call the CreateRoom API.
fyi:
roomName
will always stay same for those unique urls. Even user disconnects and come back after sometime.
a
Calling CreateRoom every time should work
👍 1