onAudioDeviceVolumeChanged property

void Function(MediaDeviceType deviceType, int volume, bool muted)? onAudioDeviceVolumeChanged
final

音频设备或 App 的音量发生改变回调。

当音频播放、采集设备或 App 的音量发生改变时,会触发该回调。 该回调仅适用于 Windows 和 macOS。

  • deviceType 设备类型定义。详见 MediaDeviceType 。
  • volume 音量。范围为 0,255
  • muted 音频设备是否为静音状态: true : 音频设备已静音。 false : 音频设备未被静音。

Implementation

final void Function(MediaDeviceType deviceType, int volume, bool muted)?
    onAudioDeviceVolumeChanged;