onAudioDeviceStateChanged property
void Function(String deviceId, MediaDeviceType deviceType, MediaDeviceStateType deviceState)?
onAudioDeviceStateChanged
final
Occurs when the audio device state changes. This callback notifies the application that the system's audio device state is changed. For example, a headset is unplugged from the device.This method is for Windows and macOS only.
deviceId
The device ID.deviceType
The evice type. See MediaDeviceType .deviceState
The device state.On macOS:0: The device is ready for use.8: The device is not connected.On Windows: see MediaDeviceStateType .
Implementation
final void Function(String deviceId, MediaDeviceType deviceType,
MediaDeviceStateType deviceState)? onAudioDeviceStateChanged;