Types

Link copied to clipboard
class ActiveSpeakersChanged(val room: Room, val speakers: List<Participant>) : RoomEvent

Active speakers changed. List of speakers are ordered by their audio level. loudest speakers first. This will include the LocalParticipant too.

Link copied to clipboard
class Connected(val room: Room) : RoomEvent

Connected to Room

Link copied to clipboard
class ConnectionQualityChanged(val room: Room, val participant: Participant, val quality: ConnectionQuality) : RoomEvent

The connection quality for a participant has changed.

Link copied to clipboard
class DataReceived(val room: Room, val data: ByteArray, val participant: RemoteParticipant?, val topic: String?) : RoomEvent

Received data published by another participant

Link copied to clipboard
class Disconnected(val room: Room, val error: Exception?, val reason: DisconnectReason) : RoomEvent

Disconnected from room

Link copied to clipboard
class FailedToConnect(val room: Room, val error: Throwable) : RoomEvent
Link copied to clipboard
class LocalTrackSubscribed(val room: Room, val publication: LocalTrackPublication, val participant: LocalParticipant) : RoomEvent

Fired when the first remote participant has subscribed to the localParticipant's track

Link copied to clipboard
class ParticipantAttributesChanged(val room: Room, participant: Participant, val changedAttributes: Map<String, String>, val oldAttributes: Map<String, String>) : RoomEvent

When a participant's attributes are changed, fired for all participants

Link copied to clipboard
class ParticipantConnected(val room: Room, val participant: RemoteParticipant) : RoomEvent

When a RemoteParticipant joins after the local participant. It will not emit events for participants that are already in the room

Link copied to clipboard
class ParticipantDisconnected(val room: Room, val participant: RemoteParticipant) : RoomEvent

When a RemoteParticipant leaves after the local participant has joined.

Link copied to clipboard
class ParticipantMetadataChanged(val room: Room, val participant: Participant, val prevMetadata: String?) : RoomEvent

Participant metadata is a simple way for app-specific state to be pushed to all users. When RoomService.UpdateParticipantMetadata is called to change a participant's state, this event will be fired for all clients in the room.

Link copied to clipboard
class ParticipantNameChanged(val room: Room, val participant: Participant, val name: String?) : RoomEvent
Link copied to clipboard
class ParticipantPermissionsChanged(val room: Room, val participant: Participant, val newPermissions: ParticipantPermission?, val oldPermissions: ParticipantPermission?) : RoomEvent

A participant's permissions have changed.

Link copied to clipboard
class Reconnected(val room: Room) : RoomEvent

The reconnect attempt had been successful

Link copied to clipboard
class Reconnecting(val room: Room) : RoomEvent

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

Link copied to clipboard
class RecordingStatusChanged(val room: Room, isRecording: Boolean) : RoomEvent

The recording of a room has started/stopped.

Link copied to clipboard
class RoomMetadataChanged(val room: Room, val newMetadata: String?, val prevMetadata: String?) : RoomEvent
Link copied to clipboard
class TrackE2EEStateEvent(val room: Room, val track: Track, val publication: TrackPublication, val participant: Participant, var state: E2EEState) : RoomEvent

The E2EE state of a track has changed.

Link copied to clipboard
class TrackMuted(val room: Room, val publication: TrackPublication, val participant: Participant) : RoomEvent

The participant was muted.

Link copied to clipboard
class TrackPublished(val room: Room, val publication: TrackPublication, val participant: Participant) : RoomEvent

When a new track is published to room after the local participant has joined. It will not fire for tracks that are already published

Link copied to clipboard
class TrackStreamStateChanged(val room: Room, val trackPublication: TrackPublication, val streamState: Track.StreamState) : RoomEvent

A track's stream state has changed.

Link copied to clipboard
class TrackSubscribed(val room: Room, val track: Track, val publication: TrackPublication, val participant: RemoteParticipant) : RoomEvent

The LocalParticipant has subscribed to a new track. This event will always fire as long as new tracks are ready for use.

Link copied to clipboard
class TrackSubscriptionFailed(val room: Room, val sid: String, val exception: Exception, val participant: RemoteParticipant) : RoomEvent

Could not subscribe to a track

Link copied to clipboard
class TrackSubscriptionPermissionChanged(val room: Room, val participant: RemoteParticipant, val trackPublication: RemoteTrackPublication, val subscriptionAllowed: Boolean) : RoomEvent

A remote track's subscription permissions have changed.

Link copied to clipboard
class TrackUnmuted(val room: Room, val publication: TrackPublication, val participant: Participant) : RoomEvent

The participant was unmuted.

Link copied to clipboard
class TrackUnpublished(val room: Room, val publication: TrackPublication, val participant: Participant) : RoomEvent

A Participant has unpublished a track

Link copied to clipboard
class TrackUnsubscribed(val room: Room, val track: Track, val publications: TrackPublication, val participant: RemoteParticipant) : RoomEvent

A subscribed track is no longer available. Clients should listen to this event and ensure the track removes all renderers

Link copied to clipboard
class TranscriptionReceived(val room: Room, val transcriptionSegments: List<TranscriptionSegment>, val participant: Participant?, val publication: TrackPublication?) : RoomEvent

Properties

Link copied to clipboard
val room: Room