enableAudioVolumeIndicationEx abstract method
Future<void>
enableAudioVolumeIndicationEx({
- required int interval,
- required int smooth,
- required bool reportVad,
- required RtcConnection connection,
Enables audio volume indication.
This method allows the SDK to periodically report volume information of the local user who is sending a stream and up to 3 remote users with the highest instantaneous volume to the app.
intervalThe time interval for volume indication: ≤ 0: Disables the volume indication.
0: The interval in milliseconds for volume indication. It is recommended to set it greater than 100 ms. Must not be less than 10 ms, otherwise the onAudioVolumeIndication callback will not be received.
smoothThe smoothing factor that specifies the sensitivity of the volume indication. The range is0,10, and the recommended value is 3. The larger the value, the more sensitive the fluctuation; the smaller the value, the smoother the fluctuation.reportVadtrue : Enables local voice activity detection. When enabled, the vad parameter in the onAudioVolumeIndication callback reports whether voice is detected locally. false : (Default) Disables local voice activity detection. Unless the engine automatically detects local voice, the vad parameter in the onAudioVolumeIndication callback does not report local voice detection.connectionConnection information. See RtcConnection.
Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions. < 0: Method call failed. See Error Codes for details and resolution suggestions.
Implementation
Future<void> enableAudioVolumeIndicationEx(
{required int interval,
required int smooth,
required bool reportVad,
required RtcConnection connection});