refa: video (#1555)

* refa: video [skip ci]

* fix: scroll [skip ci]

* mod: only left click

* downgrade

* refa: background play & wakelock [skip ci]

* fix: subtitle [skip ci]

* upgrade deps

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

* mod: long press

* tweak

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

* fix [skip ci]

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

* use right pos

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

* delay showing

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

* fix: null danmaku

* remove

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

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
My-Responsitories
2025-10-14 17:05:31 +08:00
committed by GitHub
parent 4cf1c25b36
commit 9d747c8e2c
15 changed files with 1071 additions and 313 deletions

View File

@@ -165,17 +165,18 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
late final ctr = videoDetailController.plPlayerController;
if (state == AppLifecycleState.resumed) {
if (!videoDetailController.plPlayerController.showDanmaku) {
if (!ctr.showDanmaku) {
introController.startTimer();
videoDetailController.plPlayerController.showDanmaku = true;
ctr.showDanmaku = true;
// 修复从后台恢复时全屏状态下屏幕方向错误的问题
if (isFullScreen && Platform.isIOS) {
WidgetsBinding.instance.addPostFrameCallback((_) {
// 根据视频方向重新设置屏幕方向
final isVertical = videoDetailController.isVertical.value;
final mode = plPlayerController?.mode;
final mode = ctr.mode;
if (!(mode == FullScreenMode.vertical ||
(mode == FullScreenMode.auto && isVertical) ||
@@ -188,7 +189,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
}
} else if (state == AppLifecycleState.paused) {
introController.canelTimer();
videoDetailController.plPlayerController.showDanmaku = false;
ctr.showDanmaku = false;
}
}