mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
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:
committed by
GitHub
parent
4cf1c25b36
commit
9d747c8e2c
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user