Merge branch 'main' into feature-sponsorBlock

This commit is contained in:
guozhigq
2024-11-24 16:38:43 +08:00
16 changed files with 532 additions and 171 deletions

View File

@ -141,8 +141,16 @@ class VideoDetailController extends GetxController
} else if (argMap.containsKey('pic')) {
updateCover(argMap['pic']);
}
tabCtr = TabController(length: 2, vsync: this);
tabs.value = <String>[
'简介',
if (videoType == SearchType.video &&
GlobalDataCache.enableComment.contains('video'))
'评论',
if (videoType == SearchType.media_bangumi &&
GlobalDataCache.enableComment.contains('bangumi'))
'评论'
];
tabCtr = TabController(length: tabs.length, vsync: this);
autoPlay.value =
setting.get(SettingBoxKey.autoPlayEnable, defaultValue: true);
enableHA.value = setting.get(SettingBoxKey.enableHA, defaultValue: false);
@ -481,6 +489,15 @@ class VideoDetailController extends GetxController
getDanmaku(subtitles);
}
}
headerControl = HeaderControl(
controller: plPlayerController,
videoDetailCtr: this,
floating: floating,
bvid: bvid,
videoType: videoType,
showSubtitleBtn: result['status'] && result['data'].subtitles.isNotEmpty,
);
plPlayerController.setHeaderControl(headerControl);
}
// 获取弹幕