Search code examples
flutterjust-audio

How to add delay after each audio ConcatenatingAudioSource?


How to add delay after the audio played with concatenating source audio with a delay of 2 seconds is there any methods in the package please guide on this issue .


Solution

  •  listenAudio() {
    audioPlayer.sequenceStateStream.listen((event) {
      if (autodelay) {
        audioPlayer.pause();
        Future.delayed(Duration(seconds: 2), () {
          audioPlayer.play();
        });
      }}
    

    call this method in initstate this works very well .