From 4c392b9475adbd9c123fb804bfeda4bfeaba5e6c Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Fri, 2 Dec 2022 14:32:46 +0800 Subject: [PATCH] flv bye --- .../web/client/src/components/videoPlayer/videoPlay.jsx | 8 +++++--- 1 file changed, 5 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 08f1e59..c002aa0 100644 --- a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx +++ b/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx @@ -313,6 +313,11 @@ const VideoPlay = ({ dispatch, actions, return () => { if (jessibucas.current) { jessibucas.current.destroy() + } + if (flvPlayer && flvPlayer.current) { + flvPlayer.current.destroy(); + } + if (flvPlayer.current || jessibucas.current) { const bye = request.get(`${iotVideoServer}/api/gb28181/bye?id=${videoObj.topSerialNo}&channel=${videoObj.serialNo}`).then(v => { }) @@ -320,9 +325,6 @@ const VideoPlay = ({ dispatch, actions, if (yingshiPlayer.current && videoObj.type == 'yingshi') { yingshiPlayer.current.stop() } - if (flvPlayer && flvPlayer.current) { - flvPlayer.current.destroy(); - } } }, [])