onLocalAudioStateChanged property
void Function(RtcConnection connection, LocalAudioStreamState state, LocalAudioStreamReason error)?
onLocalAudioStateChanged
final
Occurs when the local audio stream state changes. When the state of the local audio stream changes (including the state of the audio capture and encoding), the SDK triggers this callback to report the current state. This callback indicates the state of the local audio stream, and allows you to troubleshoot issues when audio exceptions occur.When the state is localAudioStreamStateFailed (3), you can view the error information in the error parameter.
connection
The connection information. See RtcConnection .state
The state of the local audio. See localaudiostreamstate .error
Local audio state error codes. See LocalAudioStreamError .
Implementation
final void Function(RtcConnection connection, LocalAudioStreamState state,
LocalAudioStreamReason error)? onLocalAudioStateChanged;