Skip to content

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 ​

ParameterTypeDescription
callIdstringIdentifier of the affected call
errorVonageError / VGErrorStructured 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

Built with VitePress.