service: start room composite egress configured in a room preset (#4926)
* service: start room composite egress configured in a room preset StandardRoomAllocator.CreateRoom merged a room preset into a copy of the request and discarded it. RoomInternal has no field for room composite egress, and getOrCreateRoom started it from the caller's original request, so a room composite egress from a preset was never started. RoomAllocator.CreateRoom now also returns the request with the preset applied, and getOrCreateRoom starts the egress from it. * service: return ErrEgressNotConnected instead of calling a nil egress launcher getOrCreateRoom started a room composite egress without checking that an egress launcher exists. RoomService.CreateRoom rejects egress on the request when there is none, but not egress from a room preset or a token's roomConfig.
This commit is contained in:
@@ -81,7 +81,9 @@ type IngressStore interface {
|
||||
type RoomAllocator interface {
|
||||
AutoCreateEnabled(ctx context.Context) bool
|
||||
SelectRoomNode(ctx context.Context, roomName livekit.RoomName, nodeID livekit.NodeID) error
|
||||
CreateRoom(ctx context.Context, req *livekit.CreateRoomRequest, isExplicit bool) (*livekit.Room, *livekit.RoomInternal, bool, error)
|
||||
// CreateRoom also returns the request with its room preset applied,
|
||||
// or req unchanged when the implementation does not resolve presets
|
||||
CreateRoom(ctx context.Context, req *livekit.CreateRoomRequest, isExplicit bool) (*livekit.Room, *livekit.RoomInternal, *livekit.CreateRoomRequest, bool, error)
|
||||
ValidateCreateRoom(ctx context.Context, roomName livekit.RoomName) error
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user