On Earmuff
Fired when a call leg earmuff state changes.
Event Registration
fun setOnEarmuffListener(
fn: (callId: String, legId: String, earmuffStatus: Boolean) -> Unit
): Subscription
Usage Example
client.setOnEarmuffListener {call, legId, earmuffStatus ->
if (earmuffStatus) {
// earmuff enabled
println("earmuff is enabled for leg:$legId with Call $call")
} else {
// earmuff disabled
println("earmuff is disabled for leg:$legId with Call $call")
}
}
Event Data
| Parameter | Type | Description |
|---|---|---|
callId | string | Your own call's identifier — the same callId returned when the call was established |
legId | string | The remote leg whose earmuff state changed — this is another participant's leg ID, not your own |
earmuffStatus | boolean | true when earmuff is enabled, false when disabled |
Notes
- Event name is
earmuffon Web; native callbacks/delegates exposeonEarmuffUpdate-equivalent listeners - Earmuff controls incoming audio for a leg
- Use this event to keep UI controls in sync with runtime state
Related Actions
enableEarmuff- Enable earmuffdisableEarmuff- Disable earmuff