Browse Source

Merge branch 'dev_trial' of https://gitea.anxinyun.cn/free-sun/FS-IOT into dev_trial

dev_trial
巴林闲侠 2 years ago
parent
commit
6ea960327d
  1. 5
      code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js
  2. 2
      code/VideoAccess-VCMP/web/client/index.ejs
  3. 26
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx
  4. 2
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx

5
code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js

@ -5,7 +5,7 @@ const moment = require('moment')
async function getCameraProject (ctx, next) { async function getCameraProject (ctx, next) {
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { limit, page, orderBy, orderDirection, keyword, abilityId, type, venderId, nvrId, externalDomain, state } = ctx.query const { limit, page, orderBy, orderDirection, keyword, abilityId, type, venderId, nvrId, externalDomain, state, serialNo } = ctx.query
const { userId, token } = ctx.fs.api const { userId, token } = ctx.fs.api
const { utils: { getPlayUrl } } = ctx.app.fs const { utils: { getPlayUrl } } = ctx.app.fs
@ -77,6 +77,9 @@ async function getCameraProject (ctx, next) {
if (externalDomain) { if (externalDomain) {
findOption.where.externalDomain = externalDomain findOption.where.externalDomain = externalDomain
} }
if (serialNo) {
findOption.where.serialNo = { $in: serialNo.split(',') }
}
if (state) { if (state) {
if (state == 'DISABLED') { if (state == 'DISABLED') {
findOption.where.forbidden = true findOption.where.forbidden = true

2
code/VideoAccess-VCMP/web/client/index.ejs

@ -4,7 +4,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width" /> <meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width" />
<meta content="upgrade-insecure-requests" http-equiv="Content-Security-Policy"> <!-- <meta content="upgrade-insecure-requests" http-equiv="Content-Security-Policy"> -->
<link rel="shortcut icon" href="/assets/images/favicon.ico"> <link rel="shortcut icon" href="/assets/images/favicon.ico">
<script src="/assets/js/jessibuca/jessibuca.js"></script> <script src="/assets/js/jessibuca/jessibuca.js"></script>
<script <script

26
code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx

@ -56,9 +56,9 @@ const VideoPlay = ({ dispatch, actions,
// videoObj = { // videoObj = {
// type: 'cascade', // type: 'cascade',
// audio: false, // audio: false,
// serialNo: '34020000001310000001', // // serialNo: '34020000001310000003', //
// topSerialNo: '34020000001110000077', // // topSerialNo: '34020000001110000079', //
// playUrlSd: 'http://221.230.55.27:8081/jessica/34020000001110000077/34020000001310000001', // // playUrlSd: 'ws://221.230.55.27:8081/jessica/34020000001110000079/34020000001310000003', //
// // playUrlHd: 'ezopen://open.ys7.com/G75922040/1.hd.live', // // playUrlHd: 'ezopen://open.ys7.com/G75922040/1.hd.live',
// // replayUrl: 'ezopen://open.ys7.com/G75922040/1.rec', // // replayUrl: 'ezopen://open.ys7.com/G75922040/1.rec',
// }, // },
@ -67,7 +67,7 @@ const VideoPlay = ({ dispatch, actions,
iotVideoServer, iotVideoServer,
local, // local, //
}) => { }) => {
// console.log('1754',videoStyle); // console.log('1754',videoObj);
if (videoObj.type == 'yingshi') { if (videoObj.type == 'yingshi') {
videoObj = { videoObj = {
...videoObj, ...videoObj,
@ -111,6 +111,7 @@ const VideoPlay = ({ dispatch, actions,
const yingshiPrepareRef = useRef(null) const yingshiPrepareRef = useRef(null)
const playState = useRef(false) // const playState = useRef(false) //
const yingshiPlayer = useRef(null) const yingshiPlayer = useRef(null)
const jessibucas = useRef(null)
useEffect(() => { useEffect(() => {
@ -141,7 +142,6 @@ const VideoPlay = ({ dispatch, actions,
} else { } else {
setWritten('视频异常,问题处理中...') setWritten('视频异常,问题处理中...')
} }
}); });
} }
@ -297,8 +297,8 @@ const VideoPlay = ({ dispatch, actions,
// } // }
return () => { return () => {
if (jessibuca) { if (jessibucas.current) {
jessibuca.destroy() jessibucas.current.destroy()
} }
if (yingshiPlayer.current && videoObj.type == 'yingshi') { if (yingshiPlayer.current && videoObj.type == 'yingshi') {
yingshiPlayer.current.stop() yingshiPlayer.current.stop()
@ -361,6 +361,7 @@ const VideoPlay = ({ dispatch, actions,
const createPlay = async () => { const createPlay = async () => {
if (videoObj.type != 'yingshi') { if (videoObj.type != 'yingshi') {
// console.log(videoObj,iotVideoServer);
try { try {
// const inviteRes = await IotVideoServerRequest.get(VideoServeApi.invite, { // const inviteRes = await IotVideoServerRequest.get(VideoServeApi.invite, {
// id: '36011200002002021114', // id: '36011200002002021114',
@ -370,8 +371,14 @@ const VideoPlay = ({ dispatch, actions,
// }, err => {. // }, err => {.
// console.log(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) { } catch (error) {
console.log(123151);
console.log(error.response); console.log(error.response);
} }
@ -395,6 +402,7 @@ const VideoPlay = ({ dispatch, actions,
isNotMute: false, isNotMute: false,
}); });
setjessibuca(jessibuca) setjessibuca(jessibuca)
jessibucas.current = jessibuca
play({ jessibuca }) play({ jessibuca })
} else { } else {
videoFront = new moment(); // videoFront = new moment(); //
@ -539,7 +547,7 @@ const VideoPlay = ({ dispatch, actions,
// /> // />
} }
<div id={containerId} style={{ height: '100%', width: '100%', }}></div> <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> : ''} */}
{/* 下方操作栏 */} {/* 下方操作栏 */}
{/* 显示操作功能条件(宽高) */} {/* 显示操作功能条件(宽高) */}

2
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/nvr.jsx

@ -141,7 +141,7 @@ const NvrHeader = (props) => {
modalName="revise" modalName="revise"
venderList={venderList} venderList={venderList}
close={() => { close={() => {
dispatch(equipmentWarehouse.getNvr(searchb.current)); dispatch(equipmentWarehouse.getNvr(searchData.current));
}} }}
/> />
</Button> </Button>

Loading…
Cancel
Save