rememberLiveKitRoom

fun rememberLiveKitRoom(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): Room

Remembers a new Room object.

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 automatically connect to the server. Defaults to true.

roomOptions

options to pass to the Room.

liveKitOverrides

overrides to pass to the Room.

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.