Skip to content

Commit

Permalink
chore: internally manage skipping to next when playback finished
Browse files Browse the repository at this point in the history
  • Loading branch information
MSOB7YY committed Nov 18, 2024
1 parent 0089b43 commit 14817d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions lib/base/audio_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1718,13 +1718,9 @@ class NamidaAudioVideoHandler<Q extends Playable> extends BasicAudioHandler<Q> {
Future<void> togglePlayPause() {
if (isPlaying.value) {
return pause();
} else {
return play();
}
if (currentState.value == ProcessingState.completed) {
// return seek(Duration.zero);
setPlayWhenReady(true);
return skipToNext(andPlay: true);
}
return play();
}

@override
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: namida
description: A Beautiful and Feature-rich Music Player, With YouTube & Video Support Built in Flutter
publish_to: "none"
version: 4.6.9-beta+241118164
version: 4.6.91-beta+241118164

environment:
sdk: ">=3.4.0 <4.0.0"
Expand Down

0 comments on commit 14817d3

Please sign in to comment.