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 device type. See MediaDeviceType.
  • deviceState The device state. See MediaDeviceStateType.

Implementation

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