onAudioDeviceStateChanged property

void Function(String deviceId, MediaDeviceType deviceType, MediaDeviceStateType deviceState)? onAudioDeviceStateChanged
final

Occurs when the audio device state changes.

Indicates that the system audio device state has changed, such as when a headset is unplugged. This method is only applicable to Windows and macOS.

  • deviceId The device ID.
  • deviceType The device type definition. See MediaDeviceType.
  • deviceState The device state. See MediaDeviceStateType.

Implementation

final void Function(String deviceId, MediaDeviceType deviceType,
    MediaDeviceStateType deviceState)? onAudioDeviceStateChanged;