RoomScope

fun RoomScope(url: String? = null, token: String? = null, audio: Boolean = false, video: Boolean = false, connect: Boolean = true, roomOptions: RoomOptions? = null, liveKitOverrides: LiveKitOverrides? = null, connectOptions: ConnectOptions? = null, onConnected: suspend CoroutineScope.(Room) -> Unit? = null, onDisconnected: suspend CoroutineScope.(Room) -> Unit? = null, onError: (Room, Exception?) -> Unit? = null, passedRoom: Room? = null, content: @Composable (room: Room) -> Unit)

Establishes a room scope which remembers a Room object which can be accessed through the RoomLocal composition local.

Parameters

url

the url of the livekit server to connect to.

token

the token to connect to livekit with.

audio

enable or disable audio. Defaults to false.

video

enable or disable video. Defaults to false.

connect

whether the room should connect to the server. Defaults to true.

roomOptions

options to pass to the Room.

liveKitOverrides

overrides to pass to the Room. Will not reflect changes beyond the initial creation.

connectOptions

options to use when connecting. Will not reflect changes if already connected.

onConnected

a listener to be called upon room connection.

onDisconnected

a listener to be called upon room disconnection.

onError

a listener to be called upon room error.

passedRoom

if a Room is provided, it will be used. If null, a new Room will be created instead.