CallState

data class CallState(val phase: CallPhase = CallPhase.Idle, val roomId: String? = null, val localCid: String? = null, val isHost: Boolean = false, val participantCount: Int = 0, val callStartedAtMs: Long? = null, val localAudioEnabled: Boolean = true, val localVideoEnabled: Boolean = true, val localCameraEnabled: Boolean = true, val localContent: ParticipantContent? = null, val localDisplayName: String? = null, val localAudioLevel: Float = 0.0f, val remoteParticipants: List<RemoteParticipant> = emptyList(), val connectionStatus: ConnectionStatus = ConnectionStatus.Connected, val signalingState: SignalingState = SignalingState.Connected, val localCameraMode: LocalCameraMode = LocalCameraMode.SELFIE, val availableCameraModes: List<LocalCameraMode> = DEFAULT_CAMERA_MODES, val error: CallError? = null, val requiredPermissions: List<MediaCapability> = emptyList())

SDK-native call state. This is the primary observable state for SDK consumers. Does not include host-app concerns (saved rooms, settings, etc.).

Constructors

Link copied to clipboard
constructor(phase: CallPhase = CallPhase.Idle, roomId: String? = null, localCid: String? = null, isHost: Boolean = false, participantCount: Int = 0, callStartedAtMs: Long? = null, localAudioEnabled: Boolean = true, localVideoEnabled: Boolean = true, localCameraEnabled: Boolean = true, localContent: ParticipantContent? = null, localDisplayName: String? = null, localAudioLevel: Float = 0.0f, remoteParticipants: List<RemoteParticipant> = emptyList(), connectionStatus: ConnectionStatus = ConnectionStatus.Connected, signalingState: SignalingState = SignalingState.Connected, localCameraMode: LocalCameraMode = LocalCameraMode.SELFIE, availableCameraModes: List<LocalCameraMode> = DEFAULT_CAMERA_MODES, error: CallError? = null, requiredPermissions: List<MediaCapability> = emptyList())

Properties

Link copied to clipboard

Camera modes the user can cycle through, in preference order. Derived from SerenadaConfig.cameraModes minus modes unsupported on this device. Empty means camera video is unavailable — call UIs should hide the camera video toggle.

Link copied to clipboard
val callStartedAtMs: Long? = null

Wall-clock timestamp in milliseconds when the local participant joined this call.

Link copied to clipboard

Network connection status.

Link copied to clipboard
val error: CallError? = null

Current error, if any.

Link copied to clipboard
val isHost: Boolean = false

Whether the local user created this room.

Link copied to clipboard

Whether local audio is currently enabled.

Link copied to clipboard

Smoothed voice activity level (0..1) for the locally captured mic. Updated at ~10 Hz while the call is active; intended to drive UI activity indicators. Always 0 when localAudioEnabled is false.

Link copied to clipboard

Whether the local camera video specifically is enabled. In the current (flag-off) build this mirrors localVideoEnabled; once independent content video ships it tracks camera-active independently from screen share.

Link copied to clipboard

Current camera mode (selfie, world, or composite).

Link copied to clipboard
val localCid: String? = null

Local client identifier assigned by the server.

Link copied to clipboard

Local content (screen share) presentation state. Null when the local user is not sharing content.

Link copied to clipboard

Local participant display name, if set.

Link copied to clipboard

Whether local video is currently enabled.

Link copied to clipboard

Number of participants currently in the call.

Link copied to clipboard

Current call lifecycle phase.

Link copied to clipboard

List of remote participants with their current state.

Link copied to clipboard
Link copied to clipboard

Permissions needed before joining (empty when all granted).

Link copied to clipboard
val roomId: String? = null

Room identifier for this call.

Link copied to clipboard

Richer signaling-transport state with timing details. Apps that don't need the extra detail can stick with connectionStatus.