MultimediaSessionSource

Provides access to the current multimedia session.

Only one session can be active at a time. Use currentSessionFlow to reactively observe session creation and termination, or currentSession for a snapshot of the current state.

Samples

scope.launch {
    multimediaClient.currentSessionFlow
        .filterNotNull()
        .collect { session ->
            // Session became active; show call UI
        }
}
val activeSession: MultimediaSession? = multimediaClient.currentSession
activeSession?.let { session ->
    val status = session.status
    val isMuted = session.isMicrophoneMuted
}

Inheritors

Properties

Link copied to clipboard

The current MultimediaSession, or null if no session is active.

Link copied to clipboard
abstract val currentSessionFlow: StateFlow<MultimediaSession?>

A StateFlow of the current MultimediaSession, or null if no session is active.