opt autosync

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-29 19:35:50 +08:00
parent 48c7dc0eed
commit 058ff44e39
2 changed files with 8 additions and 3 deletions

View File

@@ -800,7 +800,10 @@ class PlPlayerController {
}
// video-sync=display-resample
await pp.setProperty("video-sync", Pref.videoSync);
await pp.setProperty("autosync", Pref.autosync);
final autosync = Pref.autosync;
if (autosync != '0') {
await pp.setProperty("autosync", autosync);
}
// vo=gpu-next & gpu-context=android & gpu-api=opengl
// await pp.setProperty("vo", "gpu-next");
// await pp.setProperty("gpu-context", "android");

View File

@@ -252,8 +252,10 @@ abstract final class Pref {
static String get videoSync =>
_setting.get(SettingBoxKey.videoSync, defaultValue: 'display-resample');
static String get autosync =>
_setting.get(SettingBoxKey.autosync, defaultValue: '30');
static String get autosync => _setting.get(
SettingBoxKey.autosync,
defaultValue: Platform.isAndroid ? '30' : '0',
);
static CDNService get defaultCDNService {
if (_setting.get(SettingBoxKey.CDNService) case final String cdnName) {