playWithControls method

Future<AudioStreamControl> playWithControls(
  1. int soundId, {
  2. int repeat = 0,
  3. double rate = 1.0,
})

Starts playing the sound identified by soundId.

Returns instance to control playback

web

repeat is ignored. The sound is played only once.

Implementation

Future<AudioStreamControl> playWithControls(int soundId,
    {int repeat = 0, double rate = 1.0}) async {
  final streamId = await play(soundId, repeat: repeat, rate: rate);
  return AudioStreamControl._(this, streamId);
}