You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During my use, I found that every time I click the shuffle button, the first music is always the first song in the playlist every time. Starting from the second song, random music will play.
I checked the code and found that the shuffle function directly calls the just_audio library. At the same time, I found that the shuffle() method can pass an initial position parameter. See if this information is helpful to solve this problem?
I haven't read the entire project code completely, and direct modification may introduce new bugs.
@override
Future<void> setShuffleMode(AudioServiceShuffleMode shuffleMode) async {
try {
switch (shuffleMode) {
case AudioServiceShuffleMode.all:
await _player.shuffle(); ///////////////////// Maybe need initialIndex params
await _player.setShuffleModeEnabled(true);
shuffleNextQueue = true;
break;
case AudioServiceShuffleMode.none:
await _player.setShuffleModeEnabled(false);
shuffleNextQueue = false;
break;
default:
return Future.error(
"Unsupported AudioServiceRepeatMode! Recieved ${shuffleMode.toString()}, requires all or none.");
}
} catch (e) {
The text was updated successfully, but these errors were encountered:
During my use, I found that every time I click the shuffle button, the first music is always the first song in the playlist every time. Starting from the second song, random music will play.
I checked the code and found that the shuffle function directly calls the just_audio library. At the same time, I found that the shuffle() method can pass an initial position parameter. See if this information is helpful to solve this problem?
I haven't read the entire project code completely, and direct modification may introduce new bugs.
The text was updated successfully, but these errors were encountered: