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,