fix: 视频全屏遮挡 issues #347

This commit is contained in:
guozhigq
2024-02-22 00:17:38 +08:00
parent 740d5f1ddd
commit 5746b85b27
2 changed files with 20 additions and 2 deletions

View File

@ -90,6 +90,8 @@ class VideoDetailController extends GetxController
late String cacheDecode; late String cacheDecode;
late int cacheAudioQa; late int cacheAudioQa;
PersistentBottomSheetController? replyReplyBottomSheetCtr;
@override @override
void onInit() { void onInit() {
super.onInit(); super.onInit();
@ -140,7 +142,7 @@ class VideoDetailController extends GetxController
} }
showReplyReplyPanel() { showReplyReplyPanel() {
PersistentBottomSheetController? ctr = replyReplyBottomSheetCtr =
scaffoldKey.currentState?.showBottomSheet((BuildContext context) { scaffoldKey.currentState?.showBottomSheet((BuildContext context) {
return VideoReplyReplyPanel( return VideoReplyReplyPanel(
oid: oid.value, oid: oid.value,
@ -153,7 +155,7 @@ class VideoDetailController extends GetxController
source: 'videoDetail', source: 'videoDetail',
); );
}); });
ctr?.closed.then((value) { replyReplyBottomSheetCtr?.closed.then((value) {
fRpid = 0; fRpid = 0;
}); });
} }
@ -372,4 +374,11 @@ class VideoDetailController extends GetxController
} }
return result; return result;
} }
// mob端全屏状态关闭二级回复
hiddenReplyReplyPanel() {
replyReplyBottomSheetCtr != null
? replyReplyBottomSheetCtr!.close()
: print('replyReplyBottomSheetCtr is null');
}
} }

View File

@ -92,6 +92,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
videoSourceInit(); videoSourceInit();
appbarStreamListen(); appbarStreamListen();
lifecycleListener(); lifecycleListener();
fullScreenStatusListener();
} }
// 获取视频资源,初始化播放器 // 获取视频资源,初始化播放器
@ -188,6 +189,14 @@ class _VideoDetailPageState extends State<VideoDetailPage>
); );
} }
void fullScreenStatusListener() {
plPlayerController?.isFullScreen.listen((bool isFullScreen) {
if (isFullScreen) {
videoDetailController.hiddenReplyReplyPanel();
}
});
}
@override @override
void dispose() { void dispose() {
shutdownTimerService.handleWaitingFinished(); shutdownTimerService.handleWaitingFinished();