setMusicVolume abstract method

Future<void> setMusicVolume(
  1. String musicId, {
  2. required int volume,
})

Sets the volume of the playing music. The music must be playing when you set the volume.

musicId: Music ID.

volume: Music playing volume within the range of 0,400.

  • 0: Mute.
  • 100: Original volume.
  • 400: 4 times the original volume (with overflow protection).

Notes

  • The music must be playing when you call this API.
  • If the set volume is greater than 400, it will be adjusted by the maximum value of 400; if the set volume is less than 0, it will be adjusted by the minimum value of 0.
  • After calling this API, you can receive music playing status through RTCKTVPlayerEventHandler.onPlayStateChanged.

Implementation

Future<void> setMusicVolume(
  String musicId, {
  required int volume,
});