Flutter-AssetsAudioPlayer icon indicating copy to clipboard operation
Flutter-AssetsAudioPlayer copied to clipboard

When shuffle is true, playing a playlist always start with the first track

Open brice-fromentin opened this issue 5 years ago • 1 comments

Flutter Version

Flutter 1.20.4 • channel stable • https://github.com/flutter/flutter.git Framework • revision fba99f6cf9 (2 weeks ago) • 2020-09-14 15:32:52 -0700 Engine • revision d1bc06f032 Tools • Dart 2.9.2

Lib Version

My version : 2.0.9+2

Platform (Android / iOS / web) + version

Platform : Android

Describe the bug

When shuffle is true, playing a playlist always start with the first track

Small code to reproduce

    this._player.shuffle = randomize;
    this._player.open(Playlist(audios: playlist),
        autoStart: true,
        loopMode: LoopMode.playlist,
        respectSilentMode: true,
        volume: 1.0);
    this.volume = 1.0;

brice-fromentin avatar Sep 29 '20 07:09 brice-fromentin

set Start index is Random startIndex: _random.nextInt(4) //4 is max length of playlist

BhaveshTechnomads avatar Oct 25 '21 05:10 BhaveshTechnomads