enableAudioVolumeEvaluation method

Future<void> enableAudioVolumeEvaluation(
  1. int intervalMs
)

Enable volume reminder

After this feature is enabled, the evaluation result of the volume by the SDK will be obtained in TRTCCloudListener.onUserVoiceVolume. To enable this feature, call this API before calling startLocalAudio().

Parameters:

intervalMs determines the interval in ms for triggering the onUserVoiceVolume callback. The minimum interval is 100 ms. If the value is smaller than 0, the callback will be disabled. We recommend you set this parameter to 300 ms. For detailed callback rules, please see the description of onUserVoiceVolume.

Implementation

Future<void> enableAudioVolumeEvaluation(
    int intervalMs // Determines the interval in ms for triggering the `onUserVoiceVolume` callback. The minimum interval is 100 ms. If the value is smaller than 0, the callback will be disabled. We recommend you set this parameter to 300 ms. For detailed callback rules, please see the description of `onUserVoiceVolume`.
    ) {
  return _cloudChannel!.invokeMethod('enableAudioVolumeEvaluation', {
    "intervalMs": intervalMs,
  });
}