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
| Parameter | Type | Description |
|---|---|---|
callId | string | Your own call's identifier — the same callId returned when the call was established |
legId | string | The leg whose mute state changed — when callId == legId this is your own leg; otherwise it is a remote participant's leg |
isMuted | boolean | true when muted, false when unmuted |
Notes
- Event name is
muteon Web; native callbacks/delegates exposeonMuteUpdate-equivalent listeners - Use this event to synchronize mute indicators in your UI
- Event can reflect local or remote leg changes depending on call topology