Skip to content

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 ​

ParameterTypeDescription
callIdstringYour own call's identifier — the same callId returned when the call was established
legIdstringThe remote leg whose earmuff state changed — this is another participant's leg ID, not your own
earmuffStatusbooleantrue when earmuff is enabled, false when disabled

Notes ​

  • Event name is earmuff on Web; native callbacks/delegates expose onEarmuffUpdate-equivalent listeners
  • Earmuff controls incoming audio for a leg
  • Use this event to keep UI controls in sync with runtime state

Built with VitePress.