Skip to content

Cancel periodic timer on stream cancel #1036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: minor
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions audio_service/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.18.13
* Fix AudioService.position stream inconsistencies

## 0.18.12

* Fix crash with Oppo/OnePlus devices running Android 13.
Expand Down
1 change: 1 addition & 0 deletions audio_service/lib/audio_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,7 @@ class AudioService {
});
},
onCancel: () {
currentTimer?.cancel();
mediaItemSubscription.cancel();
playbackStateSubscription.cancel();
},
Expand Down
3 changes: 2 additions & 1 deletion audio_service/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: audio_service
description: Flutter plugin to play audio in the background while the screen is off.
version: 0.18.12
version: 0.18.13
homepage: https://github.com/ryanheise/audio_service/tree/master/audio_service
repository: https://github.com/ryanheise/audio_service/tree/minor/audio_service
issue_tracker: https://github.com/ryanheise/audio_service/issues
topics:
Expand Down