Skip to content

Commit

Permalink
Merge branch 'fix/ios_stopped_play' into minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed Oct 4, 2024
2 parents 2455a94 + ed4bd59 commit 35a33da
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions just_audio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.9.41

* Fix stop() to cause play() to return on iOS.

## 0.9.40

* Fix JDK 21 compile error.
Expand Down
9 changes: 9 additions & 0 deletions just_audio/darwin/Classes/AudioPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,15 @@ - (void)dispose {
if (!_player) return;
if (_processingState != none) {
[_player pause];

[self updatePosition];
[self broadcastPlaybackEvent];
if (_playResult) {
//NSLog(@"PLAY FINISHED DUE TO STOP");
_playResult(@{});
_playResult = nil;
}

_processingState = none;
// If used just before destroying the current FlutterEngine, this will result in:
// NSInternalInconsistencyException: 'Sending a message before the FlutterEngine has been run.'
Expand Down
2 changes: 1 addition & 1 deletion just_audio/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: just_audio
description: A feature-rich audio player for Flutter. Loop, clip and concatenate any sound from any source (asset/file/URL/stream) in a variety of audio formats with gapless playback.
version: 0.9.40
version: 0.9.41
repository: https://github.com/ryanheise/just_audio/tree/minor/just_audio
issue_tracker: https://github.com/ryanheise/just_audio/issues
topics:
Expand Down

0 comments on commit 35a33da

Please sign in to comment.