Skip to content

Commit

Permalink
chore: pressing play button when playback is already finished will no…
Browse files Browse the repository at this point in the history
…w skip to next
  • Loading branch information
MSOB7YY committed Nov 5, 2024
1 parent 233da90 commit d842499
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions lib/base/audio_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1714,12 +1714,16 @@ class NamidaAudioVideoHandler<Q extends Playable> extends BasicAudioHandler<Q> {

// ------------------------------------------------------------

Future<void> togglePlayPause() async {
Future<void> togglePlayPause() {
if (isPlaying.value) {
await pause();
} else {
await play();
return pause();
}
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.67-beta+241105215
version: 4.6.68-beta+241105216

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

0 comments on commit d842499

Please sign in to comment.