|
|
@ -56,9 +56,9 @@ const VideoPlay = ({ dispatch, actions, |
|
|
|
// videoObj = { |
|
|
|
// type: 'cascade', |
|
|
|
// audio: false, |
|
|
|
// serialNo: '34020000001310000001', // 设备序列号 必须 |
|
|
|
// topSerialNo: '34020000001110000077', // 设备顶级序列号 必须 |
|
|
|
// playUrlSd: 'http://221.230.55.27:8081/jessica/34020000001110000077/34020000001310000001', // 必须 |
|
|
|
// serialNo: '34020000001310000003', // 设备序列号 必须 |
|
|
|
// topSerialNo: '34020000001110000079', // 设备顶级序列号 必须 |
|
|
|
// playUrlSd: 'ws://221.230.55.27:8081/jessica/34020000001110000079/34020000001310000003', // 必须 |
|
|
|
// // playUrlHd: 'ezopen://open.ys7.com/G75922040/1.hd.live', |
|
|
|
// // replayUrl: 'ezopen://open.ys7.com/G75922040/1.rec', |
|
|
|
// }, |
|
|
@ -67,7 +67,7 @@ const VideoPlay = ({ dispatch, actions, |
|
|
|
iotVideoServer, |
|
|
|
local, //是否本地调用视频 |
|
|
|
}) => { |
|
|
|
// console.log('1754',videoStyle); |
|
|
|
// console.log('1754',videoObj); |
|
|
|
if (videoObj.type == 'yingshi') { |
|
|
|
videoObj = { |
|
|
|
...videoObj, |
|
|
@ -111,6 +111,7 @@ const VideoPlay = ({ dispatch, actions, |
|
|
|
const yingshiPrepareRef = useRef(null) |
|
|
|
const playState = useRef(false) //播放状态 |
|
|
|
const yingshiPlayer = useRef(null) |
|
|
|
const jessibucas = useRef(null) |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
@ -141,7 +142,6 @@ const VideoPlay = ({ dispatch, actions, |
|
|
|
} else { |
|
|
|
setWritten('视频异常,问题处理中...') |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
@ -200,7 +200,7 @@ const VideoPlay = ({ dispatch, actions, |
|
|
|
} |
|
|
|
}, { |
|
|
|
key: 'talk', |
|
|
|
hide: !videoObj.audio, |
|
|
|
hide: !videoObj.audio, |
|
|
|
click: (e) => { |
|
|
|
changeSelectState('talk') |
|
|
|
} |
|
|
@ -227,7 +227,7 @@ const VideoPlay = ({ dispatch, actions, |
|
|
|
} |
|
|
|
}, { |
|
|
|
key: 'histroy', |
|
|
|
hide: !Boolean(videoObj.replayUrl), |
|
|
|
hide: !Boolean(videoObj.replayUrl), |
|
|
|
click: () => { |
|
|
|
changeSelectState('histroy') |
|
|
|
videoFront = new moment(); //验证前时间 |
|
|
@ -284,7 +284,7 @@ const VideoPlay = ({ dispatch, actions, |
|
|
|
}); |
|
|
|
|
|
|
|
document.onkeydown = (e) => { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// const resize_ = () => { |
|
|
@ -297,8 +297,8 @@ const VideoPlay = ({ dispatch, actions, |
|
|
|
// } |
|
|
|
|
|
|
|
return () => { |
|
|
|
if (jessibuca) { |
|
|
|
jessibuca.destroy() |
|
|
|
if (jessibucas.current) { |
|
|
|
jessibucas.current.destroy() |
|
|
|
} |
|
|
|
if (yingshiPlayer.current && videoObj.type == 'yingshi') { |
|
|
|
yingshiPlayer.current.stop() |
|
|
@ -361,6 +361,7 @@ const VideoPlay = ({ dispatch, actions, |
|
|
|
|
|
|
|
const createPlay = async () => { |
|
|
|
if (videoObj.type != 'yingshi') { |
|
|
|
// console.log(videoObj,iotVideoServer); |
|
|
|
try { |
|
|
|
// const inviteRes = await IotVideoServerRequest.get(VideoServeApi.invite, { |
|
|
|
// id: '36011200002002021114', |
|
|
@ -370,8 +371,14 @@ const VideoPlay = ({ dispatch, actions, |
|
|
|
// }, err => {. |
|
|
|
// console.log(err); |
|
|
|
// }) |
|
|
|
const inviteRes_ = await request.get(`${iotVideoServer}/api/gb28181/invite?id=${videoObj.topSerialNo}&channel=${videoObj.serialNo}`) |
|
|
|
videoFront = new moment(); //验证前时间 |
|
|
|
const inviteRes_ = await request.get(`${iotVideoServer}/api/gb28181/invite?id=${videoObj.topSerialNo}&channel=${videoObj.serialNo}`).then((res) =>{ |
|
|
|
videoAfter = new moment(); //验证后时间 |
|
|
|
console.log(11111, res) |
|
|
|
}) |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
console.log(123151); |
|
|
|
console.log(error.response); |
|
|
|
} |
|
|
|
|
|
|
@ -395,6 +402,7 @@ const VideoPlay = ({ dispatch, actions, |
|
|
|
isNotMute: false, |
|
|
|
}); |
|
|
|
setjessibuca(jessibuca) |
|
|
|
jessibucas.current = jessibuca |
|
|
|
play({ jessibuca }) |
|
|
|
} else { |
|
|
|
videoFront = new moment(); //验证前时间 |
|
|
@ -539,7 +547,7 @@ const VideoPlay = ({ dispatch, actions, |
|
|
|
// /> |
|
|
|
} |
|
|
|
<div id={containerId} style={{ height: '100%', width: '100%', }}></div> |
|
|
|
{videoMask ? <div style={{ height: '100%', width: '100%', position: 'absolute', top: '0', left: '0', backgroundColor: 'black', color: "red", }}><div style={{ position: 'absolute', top: 'calc(60%)', left: 0, zIndex: 99, textAlign: 'center', width: '100%' }}>{written}</div></div> : ''} |
|
|
|
{/* {videoMask ? <div style={{ height: '100%', width: '100%', position: 'absolute', top: '0', left: '0', backgroundColor: 'black', color: "red", }}><div style={{ position: 'absolute', top: 'calc(60%)', left: 0, zIndex: 99, textAlign: 'center', width: '100%' }}>{written}</div></div> : ''} */} |
|
|
|
|
|
|
|
{/* 下方操作栏 */} |
|
|
|
{/* 显示操作功能条件(宽高) */} |
|
|
|