RoomListener

interface RoomListener

Room Listener, this class provides callbacks that clients should override.

Types

Companion
Link copied to clipboard
object Companion

Functions

onActiveSpeakersChanged
Link copied to clipboard
open fun onActiveSpeakersChanged(speakers: List<Participant>, room: Room)
Active speakers changed.
onConnectionQualityChanged
Link copied to clipboard
open fun onConnectionQualityChanged(participant: Participant, quality: ConnectionQuality)
The connection quality for a participant has changed.
onDataReceived
Link copied to clipboard
open fun onDataReceived(data: ByteArray, participant: RemoteParticipant?, room: Room)
Received data published by another participant
onDisconnect
Link copied to clipboard
open fun onDisconnect(room: Room, error: Exception?)
Disconnected from room
onFailedToConnect
Link copied to clipboard
open fun onFailedToConnect(room: Room, error: Throwable)
Could not connect to the room
onMetadataChanged
Link copied to clipboard
open fun onMetadataChanged(participant: Participant, prevMetadata: String?, room: Room)
Participant metadata is a simple way for app-specific state to be pushed to all users.
onParticipantConnected
Link copied to clipboard
open fun onParticipantConnected(room: Room, participant: RemoteParticipant)
When a RemoteParticipant joins after the local participant.
onParticipantDisconnected
Link copied to clipboard
open fun onParticipantDisconnected(room: Room, participant: RemoteParticipant)
When a RemoteParticipant leaves after the local participant has joined.
onReconnected
Link copied to clipboard
open fun onReconnected(room: Room)
The reconnect attempt had been successful
onReconnecting
Link copied to clipboard
open fun onReconnecting(room: Room)
A network change has been detected and LiveKit attempts to reconnect to the room When reconnect attempts succeed, the room state will be kept, including tracks that are subscribed/published
onTrackMuted
Link copied to clipboard
open fun onTrackMuted(publication: TrackPublication, participant: Participant, room: Room)
The participant was muted.
onTrackPublished
Link copied to clipboard
open fun onTrackPublished(publication: LocalTrackPublication, participant: LocalParticipant, room: Room)
When a new track is published to room after the local participant has joined.
open fun onTrackPublished(publication: RemoteTrackPublication, participant: RemoteParticipant, room: Room)
When a new track is published to room after the local participant has joined.
onTrackSubscribed
Link copied to clipboard
open fun onTrackSubscribed(track: Track, publication: TrackPublication, participant: RemoteParticipant, room: Room)
The LocalParticipant has subscribed to a new track.
onTrackSubscriptionFailed
Link copied to clipboard
open fun onTrackSubscriptionFailed(sid: String, exception: Exception, participant: RemoteParticipant, room: Room)
Could not subscribe to a track
onTrackUnmuted
Link copied to clipboard
open fun onTrackUnmuted(publication: TrackPublication, participant: Participant, room: Room)
The participant was unmuted.
onTrackUnpublished
Link copied to clipboard
open fun onTrackUnpublished(publication: LocalTrackPublication, participant: LocalParticipant, room: Room)
LocalParticipant has unpublished a track
open fun onTrackUnpublished(publication: RemoteTrackPublication, participant: RemoteParticipant, room: Room)
A RemoteParticipant has unpublished a track
onTrackUnsubscribed
Link copied to clipboard
open fun onTrackUnsubscribed(track: Track, publications: TrackPublication, participant: RemoteParticipant, room: Room)
A subscribed track is no longer available.

Sources

SDK source
Link copied to clipboard