Skip to content

Commit

Permalink
Merge branch 'fix/web_play_queue' into minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed Nov 13, 2023
2 parents 70eabd6 + ed74280 commit 422a90e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion just_audio/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
just_audio_platform_interface: ^4.2.2
# just_audio_platform_interface:
# path: ../just_audio_platform_interface
just_audio_web: ^0.4.8
just_audio_web: ^0.4.9
# just_audio_web:
# path: ../just_audio_web
audio_session: ^0.1.14
Expand Down
4 changes: 4 additions & 0 deletions just_audio_web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.9

* Fix bug to ensure play exceptions pass through (@idy).

## 0.4.8

* Update minimum flutter version to 3.0.
Expand Down
14 changes: 9 additions & 5 deletions just_audio_web/lib/just_audio_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -961,12 +961,16 @@ 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();
}
request.completer.complete();
} catch (e, st) {
request.completer.completeError(e, st);
}
request.completer.complete();
}
}
}
2 changes: 1 addition & 1 deletion just_audio_web/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: just_audio_web
description: Web platform implementation of just_audio. This implementation is endorsed and therefore doesn't require a direct dependency.
homepage: https://github.com/ryanheise/just_audio/tree/master/just_audio_web
version: 0.4.8
version: 0.4.9

flutter:
plugin:
Expand Down

0 comments on commit 422a90e

Please sign in to comment.