Skip to content

Commit

Permalink
Merge branch 'minor' of https://github.com/idy/just_audio into fix/we…
Browse files Browse the repository at this point in the history
…b_play_queue
  • Loading branch information
ryanheise committed Nov 13, 2023
2 parents 70eabd6 + 34ee289 commit 12005ea
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions just_audio_web/lib/just_audio_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -961,10 +961,15 @@ class _PlayPauseQueue {

Future<void> _run() async {
await for (var request in _queue.stream) {
if (request.playing) {
await audioElement.play();
} else {
audioElement.pause();
try {
if (request.playing) {
await audioElement.play();
} else {
audioElement.pause();
}
} catch (err) {
request.completer.completeError(err);
continue;
}
request.completer.complete();
}
Expand Down

0 comments on commit 12005ea

Please sign in to comment.