livekit/server-sdk-kotlin

Support for Room Creation with initial Room Metadata

calvin-seo opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
kotiln-sdk's RoomServiceClient only supports creation of room without metadata

/**
* Creates a new room. Explicit room creation is not required, since rooms will
* be automatically created when the first participant joins. This method can be
* used to customize room settings.
*/
@JvmOverloads
fun createRoom(
name: String,
emptyTimeout: Int? = null,
maxParticipants: Int? = null,
nodeId: String? = null,
): Call<LivekitModels.Room> {
val request = with(LivekitRoom.CreateRoomRequest.newBuilder()) {
this.name = name
if (emptyTimeout != null) {
this.emptyTimeout = emptyTimeout
}
if (maxParticipants != null) {
this.maxParticipants = maxParticipants
}
if (nodeId != null) {
this.nodeId = nodeId
}
build()
}
val credentials = authHeader(RoomCreate(true))
return service.createRoom(request, credentials)
}

so if you want create a room with initial metadata, you have to request room update once you created room first

Describe the solution you'd like
simply add additional parameter for metadata, then pass it to the roomRequestBuilder

Describe alternatives you've considered
maybe change the method to allow passing CreateRoomRequest just like go-sdk