Skip to content

On Mute ​

Fired when a call leg mute state changes.

Event Registration ​

fun setOnMutedListener(
  fn: (callId: String, legId: String, isMuted: Boolean) -> Unit
): Subscription

Usage Example ​


client.setOnMutedListener { call, legId, isMuted ->
    if (isMuted) {
        // leg is muted
        println("leg:$legId for call: $call was muted")
    } else {
        // leg is unmuted
        println("leg:$legId for call: $call was un-muted")
    }
}

Event Data ​

ParameterTypeDescription
callIdstringYour own call's identifier — the same callId returned when the call was established
legIdstringThe leg whose mute state changed — when callId == legId this is your own leg; otherwise it is a remote participant's leg
isMutedbooleantrue when muted, false when unmuted

Notes ​

  • Event name is mute on Web; native callbacks/delegates expose onMuteUpdate-equivalent listeners
  • Use this event to synchronize mute indicators in your UI
  • Event can reflect local or remote leg changes depending on call topology
  • mute - Mute local audio
  • unmute - Unmute local audio

Built with VitePress.