From 28035ebd954eb28e44213c6d5ee579cd1d977932 Mon Sep 17 00:00:00 2001 From: MSOB7YY Date: Mon, 18 Dec 2023 19:16:55 +0200 Subject: [PATCH] fix: not pausing when jumping to first item when crossfade is disabled + stopping methods fix --- lib/controller/audio_handler.dart | 18 ++++-------------- pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/lib/controller/audio_handler.dart b/lib/controller/audio_handler.dart index 3afb865d..88e03a3f 100644 --- a/lib/controller/audio_handler.dart +++ b/lib/controller/audio_handler.dart @@ -1238,22 +1238,12 @@ class NamidaAudioVideoHandler extends BasicAudioHandler { @override Future skipToQueueItem(int index, [bool? andPlay]) async => await onSkipToQueueItem(index, andPlay); - @protected - @override - Future stop() async { - await [super.onStop(), VideoController.vcontroller.pause()].execute(); - await super.stop(); - } - @override Future onStop() async { - await stop(); - } - - @override - Future onDispose() async { - await stop(); - await super.onDispose(); + await [ + super.onStop(), + VideoController.vcontroller.pause(), + ].execute(); } @override diff --git a/pubspec.yaml b/pubspec.yaml index e54cc52a..e3823b91 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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