|
@ -397,8 +397,9 @@ const VideoPlay = ({ dispatch, actions, |
|
|
|
|
|
|
|
|
const createPlay = async () => { |
|
|
const createPlay = async () => { |
|
|
if (videoObj.type != 'yingshi') { |
|
|
if (videoObj.type != 'yingshi') { |
|
|
|
|
|
let inviteRes = {} |
|
|
try { |
|
|
try { |
|
|
// const inviteRes = await IotVideoServerRequest.get(VideoServeApi.invite, { |
|
|
// inviteRes = await IotVideoServerRequest.get(VideoServeApi.invite, { |
|
|
// id: '36011200002002021114', |
|
|
// id: '36011200002002021114', |
|
|
// channel: '36011200581314002900' |
|
|
// channel: '36011200581314002900' |
|
|
// }).then(res => { |
|
|
// }).then(res => { |
|
@ -407,9 +408,16 @@ const VideoPlay = ({ dispatch, actions, |
|
|
// console.log(err); |
|
|
// console.log(err); |
|
|
// }) |
|
|
// }) |
|
|
videoFront = new moment(); //验证前时间 |
|
|
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(); //验证后时间 |
|
|
videoAfter = new moment(); //验证后时间 |
|
|
}) |
|
|
}) |
|
|
|
|
|
console.log(inviteRes); |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.log(error.response); |
|
|
console.log(error.response); |
|
|
} |
|
|
} |
|
@ -443,8 +451,9 @@ const VideoPlay = ({ dispatch, actions, |
|
|
const flv = flvjs.createPlayer({ |
|
|
const flv = flvjs.createPlayer({ |
|
|
type: 'flv', |
|
|
type: 'flv', |
|
|
// url: 'ws://10.8.30.42:8081/jessica/34020000001110000001/34020000001310000001.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: `${iotVideoPlayServer}/hdl/${videoObj.topSerialNo}/${videoObj.serialNo}.flv`, |
|
|
|
|
|
url: inviteRes.data.ws_flv, |
|
|
isLive: true, |
|
|
isLive: true, |
|
|
hasAudio: false, |
|
|
hasAudio: false, |
|
|
hasVideo: true, |
|
|
hasVideo: true, |
|
|