onAudioRouteChange property

(void Function(ZegoAudioRoute audioRoute)?) onAudioRouteChange
read / write

Callback for device's audio route changed.

Available since: 1.20.0 Description: Callback for device's audio route changed. Trigger: This callback will be called when there are changes in audio routing such as earphone plugging, speaker and receiver switching, etc. Platform differences: Only supports iOS and Android.

  • audioRoute Current audio route.

Implementation

static void Function(ZegoAudioRoute audioRoute)? onAudioRouteChange;