Instantiate default agent dispatches in rtc for better backward compatibility (#2886)
This commit is contained in:
@@ -106,15 +106,9 @@ func (r *StandardRoomAllocator) CreateRoom(ctx context.Context, req *livekit.Cre
|
||||
internal.TrackEgress = req.Egress.Tracks
|
||||
}
|
||||
}
|
||||
if req.Agent == nil {
|
||||
// Backward compatibility: by default, start any agent in the empty JobName
|
||||
req.Agent = &livekit.RoomAgent{
|
||||
Dispatches: []*livekit.RoomAgentDispatch{
|
||||
&livekit.RoomAgentDispatch{},
|
||||
},
|
||||
}
|
||||
if req.Agent != nil {
|
||||
internal.AgentDispatches = req.Agent.Dispatches
|
||||
}
|
||||
internal.AgentDispatches = req.Agent.Dispatches
|
||||
if req.MinPlayoutDelay > 0 || req.MaxPlayoutDelay > 0 {
|
||||
internal.PlayoutDelay = &livekit.PlayoutDelay{
|
||||
Enabled: true,
|
||||
|
||||
Reference in New Issue
Block a user