* refa: cdn

* feat: live cdn (WIP)

* tweaks

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

* add live quality [skip ci]

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

* mod: replace durl host

* tweak [skip ci]

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

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
My-Responsitories
2025-11-15 20:12:21 +08:00
committed by GitHub
parent e589f27195
commit 27ae296b28
13 changed files with 297 additions and 156 deletions

View File

@@ -427,25 +427,23 @@ class HeaderControlState extends State<HeaderControl> {
title: const Text('CDN 设置', style: titleStyle),
leading: const Icon(MdiIcons.cloudPlusOutline, size: 20),
subtitle: Text(
'当前:${CDNService.fromCode(VideoUtils.cdnService).desc},无法播放请切换',
'当前:${VideoUtils.cdnService.desc},无法播放请切换',
style: subTitleStyle,
),
onTap: () async {
Get.back();
String? result = await showDialog(
CDNService? result = await showDialog(
context: context,
builder: (context) {
return CdnSelectDialog(
sample: videoInfo.dash?.video?.first,
sample: videoInfo.dash?.video?.firstOrNull,
);
},
);
if (result != null) {
VideoUtils.cdnService = result;
setting.put(SettingBoxKey.CDNService, result);
SmartDialog.showToast(
'已设置为 ${CDNService.fromCode(result).desc},正在重载视频',
);
setting.put(SettingBoxKey.CDNService, result.name);
SmartDialog.showToast('已设置为 ${result.desc},正在重载视频');
videoDetailCtr.queryVideoUrl(
defaultST: videoDetailCtr.playedTime,
fromReset: true,