Skip to content

Disable Earmuff ​

Disables earmuff for your leg in an active call and restores incoming audio playback.

Signature ​

// Callback version
fun disableEarmuff(
  callId: String,
  callback: (Exception?) -> Unit
)

// Suspend version
suspend fun disableEarmuff(
  callId: String
)

Parameters ​

ParameterTypeRequiredDescription
callIdstringYesIdentifier of the active call

Return Type ​

Returns void (or Promise<void> for Web).

Usage Example ​


// Callback
client.disableEarmuff("callId") {
    it?.let { err ->
        // Handle Error in disabling earmuff
        println("Error in disabling earmuff: $err")
    }
}

// Coroutine
try {
    client.disableEarmuff("callId")
} catch (e: Error) {
    // Handle Error in disabling earmuff
}

Errors ​

Error TypeError CodeDescription
INTERNAL_ERRORvoice:error:no_call_foundNo active call found for provided callId
INTERNAL_ERRORMedia-layer errorsMedia operation failed while disabling earmuff
UNKNOWN_ERRORN/AUnexpected failure

For complete error reference and handling guidelines, see Error Reference.

Notes ​

  • Disabling earmuff restores incoming audio for your leg
  • Outgoing audio is independent from earmuff state
  • onEarmuff - Fired when earmuff state changes for a leg

Built with VitePress.