Browse Source

api

release_1.3.0
wenlele 2 years ago
parent
commit
5677c3bc75
  1. 5
      code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js
  2. 2
      code/VideoAccess-VCMP/web/client/index.html
  3. 12
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.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) {
try {
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 { utils: { getPlayUrl } } = ctx.app.fs
@ -77,6 +77,9 @@ async function getCameraProject (ctx, next) {
if (externalDomain) {
findOption.where.externalDomain = externalDomain
}
if (serialNo) {
findOption.where.serialNo = { $in: serialNo.split(',') }
}
if (state) {
if (state == 'DISABLED') {
findOption.where.forbidden = true

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

@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width" />
<!-- <meta content="upgrade-insecure-requests" http-equiv="Content-Security-Policy"> 会将http转化成https,导致jessibuca视频播放不成功 -->
<!-- <meta content="upgrade-insecure-requests" http-equiv="Content-Security-Policy"> 会将http转化成https,导致jessibuca视频播放不成功 -->
<link rel="shortcut icon" href="/assets/images/favicon.ico">
<script src="/assets/js/jessibuca/jessibuca.js"></script>

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

@ -58,7 +58,7 @@ const VideoPlay = ({ dispatch, actions,
// audio: false,
// serialNo: '34020000001310000003', //
// topSerialNo: '34020000001110000079', //
// playUrlSd: 'http://221.230.55.27:8081/jessica/34020000001110000079/34020000001310000003', //
// 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',
// },
@ -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(() => {
@ -296,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()
@ -370,7 +371,9 @@ const VideoPlay = ({ dispatch, actions,
// }, err => {.
// console.log(err);
// })
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)
})
@ -399,6 +402,7 @@ const VideoPlay = ({ dispatch, actions,
isNotMute: false,
});
setjessibuca(jessibuca)
jessibucas.current = jessibuca
play({ jessibuca })
} else {
videoFront = new moment(); //
@ -543,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> : ''} */}
{/* 下方操作栏 */}
{/* 显示操作功能条件(宽高) */}

Loading…
Cancel
Save