diff --git a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js index cb97ebc..c121e88 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js @@ -117,7 +117,7 @@ async function getNvrSteam (ctx) { } const addedRes = await models.Camera.findAll({ - attributes: ['id', 'name', 'serialNo'], + attributes: ['id', 'name', 'serialNo', 'cloudControl'], where: { nvrId: nvrRes.id } diff --git a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js index 47b7ca5..0d274d8 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js @@ -138,7 +138,8 @@ async function getCameraProject (ctx, next) { } if (camera.type != 'yingshi') { - camera.gbCamera.dataValues.playUrl = getPlayUrl({ topSerialNo: camera.topSerialNo, serialNo: camera.serialNo }) + const playUrl = await getPlayUrl({ topSerialNo: camera.topSerialNo, serialNo: camera.serialNo }) + camera.gbCamera.dataValues.playUrl = playUrl } } diff --git a/code/VideoAccess-VCMP/api/app/lib/schedule/freshYingshiMsg.js b/code/VideoAccess-VCMP/api/app/lib/schedule/freshYingshiMsg.js index 0ab221b..6e9e4fd 100644 --- a/code/VideoAccess-VCMP/api/app/lib/schedule/freshYingshiMsg.js +++ b/code/VideoAccess-VCMP/api/app/lib/schedule/freshYingshiMsg.js @@ -53,7 +53,8 @@ module.exports = function (app, opts) { id: existD.id } }) - + // 状态更新 END + // 状态推送 const { connected } = app.socket.sockets const roomId = 'ROOM_' + Math.random() + '_' + d.deviceSerial 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 bf96296..6035bf6 100644 --- a/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx +++ b/code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx @@ -6,15 +6,15 @@ import VideoOperation from './videoOperation' import './videoPlay.less'; const VideoPlay = ({ - height, width, + height, width, type, containerId = 'myPlayer', yingshiToken, // playUrl, - + }) => { const [jessibuca, setjessibuca] = useState(null) const [playUrl, setPlayUrl] = useState( // 'http://flv.bdplay.nodemedia.cn/live/bbb.flv' // TEST - // 'http://221.230.55.27:2020/hdl/36011200002002021114/36011200581314002916.flv', - 'ws://221.230.55.27:8081/jessica/34020000001110000077/34020000001310000003' + 'ws://221.230.55.27:8081/jessica/34020000001110000077/34020000001310000001', + // 'ws://221.230.55.27:8081/jessica/34020000001110000077/34020000001310000003' ) const [isPlaying, setIsPlaying] = useState(false) const [operationState, setoperationState] = useState() @@ -121,12 +121,27 @@ const VideoPlay = ({ {/* 顶部信息 */} {/* 视频内容 */} -
+ { + type == 'yingshi' ? +