We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2589b9 commit 6bbda45Copy full SHA for 6bbda45
lib/services/playback/playback_service.dart
@@ -199,7 +199,7 @@ class PlaybackService extends ChangeNotifier {
199
try {
200
source.preload(ref);
201
// wait for audio file to download and play it
202
- source.setOnPlayer(PlaybackService.player);
+ await source.setOnPlayer(PlaybackService.player);
203
if (setSourceOnly) {
204
loadedAndPaused = true;
205
} else {
@@ -368,6 +368,7 @@ class PlaybackService extends ChangeNotifier {
368
final playing = this.playing;
369
final nowPlayingIndex = playingIndex;
370
if (nowPlayingIndex != index || reload) {
371
+ await player.pause();
372
playing?.dispose();
373
this.playing = PlayingTrack(queue[index], ref);
374
}
0 commit comments