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
| Parameter | Type | Required | Description |
|---|---|---|---|
callId | string | Yes | Identifier 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 Type | Error Code | Description |
|---|---|---|
INTERNAL_ERROR | voice:error:no_call_found | No active call found for provided callId |
INTERNAL_ERROR | Media-layer errors | Media operation failed while disabling earmuff |
UNKNOWN_ERROR | N/A | Unexpected 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
Related Actions
enableEarmuff- Enable earmuff and block incoming audio
Related Events
onEarmuff- Fired when earmuff state changes for a leg