ParticipantState

data class ParticipantState(var sessionId: String = "", val call: Call, initialUserId: String, var trackLookupPrefix: String = "")

Represents the state of a participant in a call.

  • A list of participants is shared when you join a call the SFU send you the participant joined event.

Constructors

Link copied to clipboard
constructor(sessionId: String = "", call: Call, initialUserId: String, trackLookupPrefix: String = "")

Types

Link copied to clipboard
data class Audio(val sessionId: String, val track: AudioTrack?, val enabled: Boolean) : ParticipantState.Media
Link copied to clipboard
sealed class Media
Link copied to clipboard
data class ScreenSharing(val sessionId: String, val track: VideoTrack?, val enabled: Boolean) : ParticipantState.Media
Link copied to clipboard
data class Video(val sessionId: String, val track: VideoTrack?, val enabled: Boolean) : ParticipantState.Media

Properties

Link copied to clipboard
val audio: StateFlow<ParticipantState.Audio?>
Link copied to clipboard
val audioEnabled: StateFlow<Boolean>
Link copied to clipboard
val audioLevel: StateFlow<Float>
Link copied to clipboard
val audioLevels: StateFlow<List<Float>>
Link copied to clipboard
val audioTrack: StateFlow<AudioTrack?>
Link copied to clipboard
val call: Call

The call object

Link copied to clipboard
val dominantSpeaker: StateFlow<Boolean>
Link copied to clipboard
val image: StateFlow<String>
Link copied to clipboard
Link copied to clipboard
val joinedAt: StateFlow<OffsetDateTime?>
Link copied to clipboard
val lastSpeakingAt: StateFlow<OffsetDateTime?>
Link copied to clipboard
val name: StateFlow<String>
Link copied to clipboard
Link copied to clipboard
val reactions: StateFlow<List<Reaction>>
Link copied to clipboard
val roles: StateFlow<List<String>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The SFU returns a session id for each participant. This session id is unique

Link copied to clipboard
val speaking: StateFlow<Boolean>
Link copied to clipboard

A prefix to identify tracks, internal

Link copied to clipboard
val userId: StateFlow<String>
Link copied to clipboard
val userNameOrId: StateFlow<String>
Link copied to clipboard
val video: StateFlow<ParticipantState.Video?>
Link copied to clipboard
val videoEnabled: StateFlow<Boolean>
Link copied to clipboard
val videoTrack: StateFlow<VideoTrack?>
Link copied to clipboard

Functions

Link copied to clipboard
fun consumeReaction(reaction: Reaction)
Link copied to clipboard
suspend fun muteAudio(): Result<MuteUsersResponse>
Link copied to clipboard
suspend fun muteScreenshare(): Result<MuteUsersResponse>
Link copied to clipboard
suspend fun muteVideo(): Result<MuteUsersResponse>
Link copied to clipboard
suspend fun pin()
Link copied to clipboard
Link copied to clipboard
suspend fun unpin()
Link copied to clipboard
fun updateAudioLevel(audioLevel: Float)
Link copied to clipboard
fun updateFromParticipantInfo(participant: <Error class: unknown class>)