onLocalAudioStateChanged property
void Function(RtcConnection connection, LocalAudioStreamState state, LocalAudioStreamReason reason)?
onLocalAudioStateChanged
final
Callback when the local audio state changes.
When the local audio state changes (including microphone capture and audio encoding states), the SDK triggers this callback to report the current local audio state. This callback helps you diagnose issues by providing the current state and reason when a local audio failure occurs. When the state is localAudioStreamStateFailed (3), you can check the returned error information in the error parameter.
connectionConnection information. See RtcConnection.stateCurrent local audio state. See LocalAudioStreamState.reasonReason for the local audio state change. See LocalAudioStreamReason.
Implementation
final void Function(RtcConnection connection, LocalAudioStreamState state,
LocalAudioStreamReason reason)? onLocalAudioStateChanged;