From 002bd4d9611c5b510759c5b07bd01e69dada7269 Mon Sep 17 00:00:00 2001 From: wenlele Date: Mon, 22 May 2023 17:55:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=92=AD=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/client/src/components/videoPlayer/videoPlay.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 41d9ff1..9d70c76 100644 --- a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx +++ b/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx @@ -105,7 +105,6 @@ const VideoPlay = ({ dispatch, actions, const [showTime_, setShowTime] = useState('') const [showTimeSelect, setShowTimeSelect] = useState(false) - const [playNumber, setPlayNumber] = useState(0) const [hideFullScreenBut, setHideFullScreenBut] = useState(false) @@ -123,6 +122,7 @@ const VideoPlay = ({ dispatch, actions, const yingshiPlayer = useRef(null) const jessibucas = useRef(null) const flvPlayer = useRef() + const playNumber = useRef(0) @@ -476,12 +476,12 @@ const VideoPlay = ({ dispatch, actions, }, handleError: (e) => { //播放失败 console.log(e, '播放失败'); - if (playNumber > 4) { + if (playNumber.current > 4) { setNumbers(e.retcode) videoAfter = new moment(); //验证后时间 setDisappear(true) } else { - setPlayNumber(playNumber + 1) + playNumber.current = playNumber.current + 1 yingshiPlayer.current.stop().then(() => { yingshiPlayer.current.play({ url: videoObj.playUrlSd }) })