* tweak

* opt: image quality

* opt: VideoPlayerServiceHandler

* fixes

* update

Signed-off-by: dom <githubaccount56556@proton.me>

* fix get file name

Signed-off-by: dom <githubaccount56556@proton.me>

---------

Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
My-Responsitories
2026-01-25 15:21:33 +08:00
committed by GitHub
parent 219228f8b5
commit 038f03a4e7
10 changed files with 64 additions and 49 deletions

View File

@@ -496,15 +496,15 @@ class PlPlayerController {
return _instance != null;
}
static void setPlayCallBack(VoidCallback? playCallBack) {
static void setPlayCallBack(Future<void>? Function()? playCallBack) {
_playCallBack = playCallBack;
}
static VoidCallback? _playCallBack;
static Future<void>? Function()? _playCallBack;
static void playIfExists() {
static Future<void>? playIfExists() {
// await _instance?.play(repeat: repeat, hideControls: hideControls);
_playCallBack?.call();
return _playCallBack?.call();
}
// try to get PlayerStatus
@@ -819,7 +819,7 @@ class PlPlayerController {
}
// 音轨
late final String audioUri;
final String audioUri;
if (isFileSource) {
audioUri = onlyPlayAudio.value || mediaType == 1
? ''
@@ -969,9 +969,9 @@ class PlPlayerController {
}
late final bool enableAutoEnter = Pref.enableAutoEnter;
Future<void> autoEnterFullscreen() async {
Future<void>? autoEnterFullscreen() {
if (enableAutoEnter) {
Future.delayed(const Duration(milliseconds: 500), () {
return Future.delayed(const Duration(milliseconds: 500), () {
if (dataStatus.status.value != DataStatus.loaded) {
_stopListenerForEnterFullScreen();
_dataListenerForEnterFullScreen = dataStatus.status.listen((status) {
@@ -981,10 +981,11 @@ class PlPlayerController {
}
});
} else {
triggerFullScreen(status: true);
return triggerFullScreen(status: true);
}
});
}
return null;
}
Set<StreamSubscription> subscriptions = {};

View File

@@ -2601,7 +2601,7 @@ Future<ui.Image?> _getImg(String url) async {
final cacheKey = Utils.getFileName(url, fileExt: false);
try {
final fileInfo = await cacheManager.getSingleFile(
url,
ImageUtils.safeThumbnailUrl(url),
key: cacheKey,
headers: Constants.baseHeaders,
);