CallState
The CallState class keeps all state for a call It's available on every call object
Samples
Properties
if the call is being broadcasted to HLS
Holds the current closed caption mode for the video call. This object contains information about closed captioning feature availability. This state is updated dynamically based on the server's transcription setting which is io.getstream.android.video.generated.models.TranscriptionSettingsResponse.closedCaptionMode
Holds the current list of closed captions. This list is updated dynamically and contains at most ClosedCaptionsSettings.maxVisibleCaptions captions.
how many milliseconds the call has been running in the simple date format.
how many milliseconds the call has been running, null if the call didn't start yet
Tracks whether closed captioning is currently active for the call. True if captioning is ongoing, false otherwise.
How long the call has been live for, represented as Duration, or null if the call hasn't been live yet. Keeps its value when live ends and resets when live starts again.
How long the call has been live for, in milliseconds, or null if the call hasn't been live yet. Keeps its value when live ends and resets when live starts again.
Your own participant state
Your own participant state
Participants in this call, ordered by the active SortPreset. The list emits whenever the order changes — identity-equal emissions are suppressed by the sorter's internal coalescing so consumers don't recompose for non-changes.
Pinned participants, combined value both from server and local pins.
Participants other than yourself, in the same sort order as participants. Lazy-initialized to defer resolving _sortedParticipantsState (defined later in this class).
Deprecated alias for participants. Return type is intentionally declared as Flow (not StateFlow) to preserve binary compatibility with the pre-existing public API — StateFlow is a Flow, so consumers see the same underlying value.
a count of the total number of participants.
Functions
Check if you have permissions to do things like share your audio, video, screen etc
Switch the active sort preset.
Plug in an ad-hoc Comparator for participant sorting. Overrides the active preset until called again with a different comparator or setSortPreset is invoked.
Update participants visibility on the UI.
Set a flow to update the participants visibility. The flow should emit lists with currently visible participant session IDs.