From 7c5272ccdae0e18988947e342481524082075c83 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 31 Aug 2022 23:06:22 +0800 Subject: [PATCH] setHideFullScreenBut --- .../web/client/src/components/videoPlayer/videoPlay.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx b/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx index dae0185..8bfc666 100644 --- a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx +++ b/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx @@ -95,6 +95,7 @@ const VideoPlay = ({ const [disappear, setDisappear] = useState(false) // 视频消失 const [disappears, setDisappears] = useState(false) // 视频消失 + const [hideFullScreenBut, setHideFullScreenBut] = useState(false) // 标记萤石操作中,等待ifream返回信息后清空 const [yingshiPrepare, setYingshiPrepare] = useState('') @@ -187,6 +188,7 @@ const VideoPlay = ({ } }, { key: 'fullScreen', + hide: hideFullScreenBut, click: (fullNoChange = false) => { changeSelectState('fullScreen') let videoplay = document.getElementById("vcmp_videoplay" + videoObj.id) @@ -237,6 +239,7 @@ const VideoPlay = ({ // 全屏状态监听 screenfull.on('change', (e) => { let curFullElement = screenfull.element + console.log(curFullElement); if (curFullElement && curFullElement.id == 'vcmp_videoplay' + videoObj.id) { if (e?.path[0]?.id?.includes("vcmp_videoplay")) { if (screenfull.isFullscreen && operationRef.current && !operationRef.current['fullScreen'].select) { @@ -249,8 +252,12 @@ const VideoPlay = ({ // yingshiPlayer.current.reSize(size?.width, size?.height); } } + setHideFullScreenBut(false) } + } else if (curFullElement && curFullElement.id == 'rearProjection') { + setHideFullScreenBut(true) } else { + setHideFullScreenBut(false) setTimeout(() => { if (operationRef.current.fullScreen.select) { operation.find(cf => cf.key == 'fullScreen').click(true)