From c0781d19c2449c672b692fdb2180988bb479cf1e Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Fri, 11 Aug 2023 15:38:32 +0800 Subject: [PATCH] =?UTF-8?q?test=20=E6=96=B0=E7=9A=84=2028181=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/videoPlayer/videoPlay.jsx | 15 ++++++++++++--- 1 file changed, 12 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 5402ca7..4d8b48e 100644 --- a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx +++ b/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx @@ -397,8 +397,9 @@ const VideoPlay = ({ dispatch, actions, const createPlay = async () => { if (videoObj.type != 'yingshi') { + let inviteRes = {} try { - // const inviteRes = await IotVideoServerRequest.get(VideoServeApi.invite, { + // inviteRes = await IotVideoServerRequest.get(VideoServeApi.invite, { // id: '36011200002002021114', // channel: '36011200581314002900' // }).then(res => { @@ -407,9 +408,16 @@ const VideoPlay = ({ dispatch, actions, // console.log(err); // }) videoFront = new moment(); //验证前时间 - const inviteRes_ = await request.get(`${iotVideoServer}/api/gb28181/invite?id=${videoObj.topSerialNo}&channel=${videoObj.serialNo}`).then((res) => { + // inviteRes = await request.get(`${iotVideoServer}/api/gb28181/invite?id=${videoObj.topSerialNo}&channel=${videoObj.serialNo}`).then((res) => { + // videoAfter = new moment(); //验证后时间 + // }) + inviteRes = await request.get( + `${iotVideoServer}/api/play/start/${videoObj.topSerialNo}/${videoObj.serialNo}?isSubStream=false` + // `http://218.3.126.49:32308/api/play/start/34020000001110000088/34020000001310000003?isSubStream=false` + ).then((res) => { videoAfter = new moment(); //验证后时间 }) + console.log(inviteRes); } catch (error) { console.log(error.response); } @@ -443,8 +451,9 @@ const VideoPlay = ({ dispatch, actions, const flv = flvjs.createPlayer({ type: 'flv', // url: 'ws://10.8.30.42:8081/jessica/34020000001110000001/34020000001310000001.flv', - url: `${iotVideoPlayServer}/jessica/${videoObj.topSerialNo}/${videoObj.serialNo}.flv`, + // url: `${iotVideoPlayServer}/jessica/${videoObj.topSerialNo}/${videoObj.serialNo}.flv`, // url: `${iotVideoPlayServer}/hdl/${videoObj.topSerialNo}/${videoObj.serialNo}.flv`, + url: inviteRes.data.ws_flv, isLive: true, hasAudio: false, hasVideo: true,