Auto egress (#1011)
* auto egress * fix room service test * reuse StartTrackEgress * add timestamp * update prefixed filename explicitly * update protocol * clean up telemetry * fix telemetry tests * separate room internal storage * auto participant egress * remove custom template url * fix internal key * use map for stats workers * remove sync.Map * remove participant composite
This commit is contained in:
@@ -68,10 +68,18 @@ func (r *StandardRoomAllocator) CreateRoom(ctx context.Context, req *livekit.Cre
|
||||
if req.Metadata != "" {
|
||||
rm.Metadata = req.Metadata
|
||||
}
|
||||
if err := r.roomStore.StoreRoom(ctx, rm); err != nil {
|
||||
|
||||
if err = r.roomStore.StoreRoom(ctx, rm); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if req.Egress != nil && req.Egress.Tracks != nil {
|
||||
internal := &livekit.RoomInternal{TrackEgress: req.Egress.Tracks}
|
||||
if err = r.roomStore.StoreRoomInternal(ctx, livekit.RoomName(req.Name), internal); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
// check if room already assigned
|
||||
existing, err := r.router.GetNodeForRoom(ctx, livekit.RoomName(rm.Name))
|
||||
if err != routing.ErrNotFound && err != nil {
|
||||
|
||||
Reference in New Issue
Block a user