Package-level declarations

Composition locals to aid in development of Livekit features.

Properties

Link copied to clipboard

Not to be confused with LocalParticipant.

Link copied to clipboard

Functions

Link copied to clipboard
fun ForEachParticipant(participants: List<Participant>, content: @Composable (Participant) -> Unit)

A simple way to loop over participants that creates a ParticipantScope for each participant and calls content.

Link copied to clipboard

A simple way to loop over tracks that creates a TrackReferenceScope for each track and calls content.

Link copied to clipboard
fun HandleRoomState(state: Room.State, passedRoom: Room? = null, vararg keys: Any, onState: suspend CoroutineScope.(Room, Room.State) -> Unit?)

fun HandleRoomState(states: List<Room.State> = emptyList(), passedRoom: Room? = null, vararg keys: Any, onState: suspend CoroutineScope.(Room, Room.State) -> Unit?)

A simple handler for listening to room state changes.

Link copied to clipboard
fun ParticipantScope(participant: Participant, content: @Composable () -> Unit)
Link copied to clipboard
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.

Link copied to clipboard
fun requireParticipant(passedParticipant: Participant? = null): Participant

Returns the passedParticipant or the currently provided ParticipantLocal.

Link copied to clipboard
fun requireRoom(passedRoom: Room? = null): Room

Returns the passedRoom or the currently provided RoomLocal.

Link copied to clipboard

Returns the passedTrack or the currently provided TrackReferenceLocal.

Link copied to clipboard
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.

Link copied to clipboard

Binds trackRef to the TrackReferenceLocal for the scope of content.