Skip to content

Commit

Permalink
Merge branch 'SleepySquash-1326-improve-web-methods-signature' into m…
Browse files Browse the repository at this point in the history
…inor
  • Loading branch information
ryanheise committed Sep 26, 2024
2 parents b5fad79 + bfa1c76 commit 2455a94
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
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.13

* Fix `dart2js`/`dart2wasm` compile error with Flutter 3.26.0 (@SleepySquash).

## 0.4.12

* Bump package:web version to `>=0.5.1 <2.0.0` (@ali2236)
Expand Down
18 changes: 9 additions & 9 deletions just_audio_web/lib/just_audio_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,50 +114,50 @@ class Html5AudioPlayer extends JustAudioPlayer {
Html5AudioPlayer({required String id}) : super(id: id) {
_audioElement.addEventListener(
'durationchange',
(event) {
(Event event) {
_durationCompleter?.complete();
broadcastPlaybackEvent();
}.toJS);
_audioElement.addEventListener(
'error',
(event) {
(Event event) {
_durationCompleter?.completeError(_audioElement.error!);
}.toJS);
_audioElement.addEventListener(
'ended',
(event) async {
(Event event) {
_currentAudioSourcePlayer?.complete();
}.toJS);
_audioElement.addEventListener(
'timeupdate',
(event) {
(Event event) {
_currentAudioSourcePlayer
?.timeUpdated(_audioElement.currentTime.toDouble());
}.toJS);
_audioElement.addEventListener(
'loadstart',
(event) {
(Event event) {
transition(ProcessingStateMessage.buffering);
}.toJS);
_audioElement.addEventListener(
'waiting',
(event) {
(Event event) {
transition(ProcessingStateMessage.buffering);
}.toJS);
_audioElement.addEventListener(
'stalled',
(event) {
(Event event) {
transition(ProcessingStateMessage.buffering);
}.toJS);
_audioElement.addEventListener(
'canplaythrough',
(event) {
(Event event) {
_audioElement.playbackRate = _speed;
transition(ProcessingStateMessage.ready);
}.toJS);
_audioElement.addEventListener(
'progress',
(event) {
(Event event) {
broadcastPlaybackEvent();
}.toJS);
}
Expand Down
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.12
version: 0.4.13

flutter:
plugin:
Expand Down

0 comments on commit 2455a94

Please sign in to comment.