Handle room configuration that's set in the grant itself (#3120)
* Handle room configuration that's set in the grant itself * ensure refresh token contains updates * deps * dep --------- Co-authored-by: Paul Wells <paulwe@gmail.com>
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"github.com/livekit/protocol/logger"
|
||||
)
|
||||
|
||||
@@ -67,3 +68,17 @@ func GetClientIP(r *http.Request) string {
|
||||
ip, _, _ := net.SplitHostPort(r.RemoteAddr)
|
||||
return ip
|
||||
}
|
||||
|
||||
func SetRoomConfiguration(createRequest *livekit.CreateRoomRequest, conf *livekit.RoomConfiguration) {
|
||||
if conf == nil {
|
||||
return
|
||||
}
|
||||
createRequest.Agents = conf.Agents
|
||||
createRequest.Egress = conf.Egress
|
||||
createRequest.EmptyTimeout = conf.EmptyTimeout
|
||||
createRequest.DepartureTimeout = conf.DepartureTimeout
|
||||
createRequest.MaxParticipants = conf.MaxParticipants
|
||||
createRequest.MinPlayoutDelay = conf.MinPlayoutDelay
|
||||
createRequest.MaxPlayoutDelay = conf.MaxPlayoutDelay
|
||||
createRequest.SyncStreams = conf.SyncStreams
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user