rememberEventSelector

inline fun <T : RoomEvent> rememberEventSelector(room: Room): Flow<T>

A utility method to obtain a flow for specific room events.

Pass in RoomEvent as the type to receive all room events.

// Receive only participant connected events.
val eventFlow = rememberEventSelector<RoomEvent.ParticipantConnected>(room = room)

inline fun <T : ParticipantEvent> rememberEventSelector(participant: Participant): Flow<T>

A utility method to obtain a flow for specific room events.

Pass in ParticipantEvent as the type to receive all room events.

// Receive only participant connected events.
val eventFlow = rememberEventSelector<ParticipantEvent.SpeakingChanged>(participant)

inline fun <T : TrackPublicationEvent> rememberEventSelector(publication: TrackPublication): Flow<T>

A utility method to obtain a flow for specific room events.

Pass in TrackPublicationEvent as the type to receive all publication events.

// Receive only participant connected events.
val eventFlow = rememberEventSelector<TrackPublicationEvent.TranscriptionReceived>(publication)

inline fun <T : TrackEvent> rememberEventSelector(track: Track): Flow<T>

A utility method to obtain a flow for specific track events.

Pass in TrackEvent as the type to receive all track events.

// Receive only stream state changed events.
val eventFlow = rememberEventSelector<TrackEvent.StreamStateChanged>(track)

inline fun <T : U, U> rememberEventSelector(eventListenable: EventListenable<U>): Flow<T>