mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: exit
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:audio_service/audio_service.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
@@ -58,6 +60,13 @@ class VideoPlayerServiceHandler extends BaseAudioHandler with SeekHandler {
|
||||
// await player.seekTo(position);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> onTaskRemoved() async {
|
||||
if (Platform.isAndroid) {
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> setMediaItem(MediaItem newMediaItem) async {
|
||||
if (!enableBackgroundPlay) return;
|
||||
// print("此时调用栈为:");
|
||||
|
||||
Reference in New Issue
Block a user