startAudioDeviceVolumeMonitor method

Future<void> startAudioDeviceVolumeMonitor(
  1. ZegoAudioDeviceType deviceType,
  2. String deviceID
)

Turn on audio device volume monitoring.

Available since: 1.1.0 Description: Starts the audio device volume monitor. When the volume of the device changes, the changed volume will be called back via onAudioDeviceVolumeChanged. Caution: Currently, only one audio output device and one audio input device are supported to be monitored at the same time. When this API is called multiple times and the same device type is set, the device ID set to this API during the last call will be overwritten. When to call: After creating the engine via createEngine. Platform differences: Only supports Windows and macOS. Related APIs: When you no longer need to monitor the device volume, please call stopAudioDeviceVolumeMonitor to stop monitoring.

Implementation

Future<void> startAudioDeviceVolumeMonitor(
    ZegoAudioDeviceType deviceType, String deviceID) async {
  return await ZegoExpressImpl.instance
      .startAudioDeviceVolumeMonitor(deviceType, deviceID);
}