setVolume abstract method

Future<int?> setVolume({
  1. required int volume,
  2. AudioMixingType type = AudioMixingType.playoutAndPublish,
})

Adjusts the volume of the specified audio mixing.

volume: The ratio of the volume to the original volume in % with overflow protection. The range is [0, 400] and the recommended range is [0, 100].

type: Specifies whether played at local devices or sent to remote devices.

Return value:

  • 0: Success.
  • <0: Failure.

Notes: Call this API only when the audio is mixing.

Implementation

Future<int?> setVolume({
  required int volume,
  AudioMixingType type = AudioMixingType.playoutAndPublish,
});