On Call Media Error
Fired when a media-related error occurs during a call.
Event Registration
fun setOnCallMediaErrorListener(
fn: (callId: String, error: VGError) -> Unit
): Subscription
Usage Example
client.setOnCallMediaErrorListener { callId, error ->
println("Received media error $error for Call $callId")
}
Event Data
| Parameter | Type | Description |
|---|---|---|
callId | string | Identifier of the affected call |
error | VonageError / VGError | Structured SDK error payload |
Errors
The error is always a media-layer failure with a media:error:* code: a WebRTC operation failed on the device (SDP, peer connection, audio track, etc.). For the complete list, see Error Reference.
Audio that stops while the call stays up is not an error: it is reported by onCallMediaWarning.
Notes
- Use this event for in-call diagnostics and recovery UX
- Error payload includes type/code/message fields for classification
Related Events
onCallMediaWarning- Fired when audio stops in one direction while the call stays uponCallMediaDisconnect- Fired when media disconnects