Skip to content

Commit

Permalink
fix: not pausing when jumping to first item when crossfade is disabled
Browse files Browse the repository at this point in the history
+ stopping methods fix
  • Loading branch information
MSOB7YY committed Dec 18, 2023
1 parent 717de50 commit 28035eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
18 changes: 4 additions & 14 deletions lib/controller/audio_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1238,22 +1238,12 @@ class NamidaAudioVideoHandler<Q extends Playable> extends BasicAudioHandler<Q> {
@override
Future<void> skipToQueueItem(int index, [bool? andPlay]) async => await onSkipToQueueItem(index, andPlay);

@protected
@override
Future<void> stop() async {
await [super.onStop(), VideoController.vcontroller.pause()].execute();
await super.stop();
}

@override
Future<void> onStop() async {
await stop();
}

@override
Future<void> onDispose() async {
await stop();
await super.onDispose();
await [
super.onStop(),
VideoController.vcontroller.pause(),
].execute();
}

@override
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ dependencies:
basic_audio_handler:
git:
url: https://github.com/namidaco/basic_audio_handler
ref: 1da72524498bf29e11f8ab9e16b89242f8e3fd3e
ref: 452f6bf5541202fb4d6ba6dc5162a85709e80f22
on_audio_query:
git:
url: https://github.com/MSOB7YY/on_audio_query
Expand Down

0 comments on commit 28035eb

Please sign in to comment.