mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
fix: clear audio noti
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1529,7 +1529,6 @@ class PlPlayerController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_playerCount.value = 0;
|
_playerCount.value = 0;
|
||||||
videoPlayerServiceHandler.clear();
|
|
||||||
Utils.channel.setMethodCallHandler(null);
|
Utils.channel.setMethodCallHandler(null);
|
||||||
pause();
|
pause();
|
||||||
try {
|
try {
|
||||||
@@ -1560,6 +1559,7 @@ class PlPlayerController {
|
|||||||
_videoPlayerController = null;
|
_videoPlayerController = null;
|
||||||
}
|
}
|
||||||
_instance = null;
|
_instance = null;
|
||||||
|
videoPlayerServiceHandler.clear();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
debugPrint(err.toString());
|
debugPrint(err.toString());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,9 @@ class VideoPlayerServiceHandler extends BaseAudioHandler with SeekHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> setPlaybackState(PlayerStatus status, bool isBuffering) async {
|
Future<void> setPlaybackState(PlayerStatus status, bool isBuffering) async {
|
||||||
if (!enableBackgroundPlay || PlPlayerController.instanceExists().not) {
|
if (!enableBackgroundPlay ||
|
||||||
|
_item.isEmpty ||
|
||||||
|
PlPlayerController.instanceExists().not) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,7 +194,9 @@ class VideoPlayerServiceHandler extends BaseAudioHandler with SeekHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onPositionChange(Duration position) {
|
onPositionChange(Duration position) {
|
||||||
if (!enableBackgroundPlay) return;
|
if (!enableBackgroundPlay ||
|
||||||
|
_item.isEmpty ||
|
||||||
|
PlPlayerController.instanceExists().not) return;
|
||||||
|
|
||||||
playbackState.add(playbackState.value.copyWith(
|
playbackState.add(playbackState.value.copyWith(
|
||||||
updatePosition: position,
|
updatePosition: position,
|
||||||
|
|||||||
Reference in New Issue
Block a user