Browse Source

默认清晰度

dev_trial
wenlele 2 years ago
parent
commit
6c7bdcc78c
  1. 4
      code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js
  2. 9
      code/VideoAccess-VCMP/api/app/lib/models/camera.js
  3. 4
      code/VideoAccess-VCMP/api/app/lib/schedule/freshYingshiMsg.js
  4. 4
      code/VideoAccess-VCMP/script/1.3.8/achema/1.update_camera.sql
  5. 2
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperation.jsx
  6. 23
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx
  7. 1049
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/fluoriteCamera.jsx
  8. 1
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx

4
code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js

@ -31,7 +31,7 @@ async function createYingshi (ctx) {
const { const {
id, name, cloudControl, highDefinition, memoryCard, id, name, cloudControl, highDefinition, memoryCard,
voice, kindId, abilityId, rtmp, serialNo, longitude, latitude, voice, kindId, abilityId, rtmp, serialNo, longitude, latitude,
channelNo, channelNo,definition
} = ctx.request.body; } = ctx.request.body;
let handleCameraId = id let handleCameraId = id
errMsg = (handleCameraId ? '修改' : '添加') + errMsg errMsg = (handleCameraId ? '修改' : '添加') + errMsg
@ -49,7 +49,7 @@ async function createYingshi (ctx) {
serialNo: String(serialNo).toUpperCase(), serialNo: String(serialNo).toUpperCase(),
yingshiSecretId: beloneSecret.id, yingshiSecretId: beloneSecret.id,
gbId: corGbYingshiRes ? corGbYingshiRes.id : null, gbId: corGbYingshiRes ? corGbYingshiRes.id : null,
channelNo, channelNo,definition
} }
if (handleCameraId) { if (handleCameraId) {

9
code/VideoAccess-VCMP/api/app/lib/models/camera.js

@ -87,6 +87,15 @@ module.exports = dc => {
field: "cloud_control", field: "cloud_control",
autoIncrement: false autoIncrement: false
}, },
definition: {
type: DataTypes.BOOLEAN,
allowNull: true,
defaultValue: null,
comment: "清晰度",
primaryKey: false,
field: "definition",
autoIncrement: false
},
highDefinition: { highDefinition: {
type: DataTypes.BOOLEAN, type: DataTypes.BOOLEAN,
allowNull: true, allowNull: true,

4
code/VideoAccess-VCMP/api/app/lib/schedule/freshYingshiMsg.js

@ -6,8 +6,8 @@ module.exports = function (app, opts) {
{ {
interval: '50 */4 * * * *', interval: '50 */4 * * * *',
// interval: '*/3 * * * *', // interval: '*/3 * * * *',
// immediate: true, immediate: true,
proRun: true, // proRun: true,
}, },
async () => { async () => {
console.log('萤石状态查询 ', moment().format('YYYY-MM-DD HH:mm:ss')); console.log('萤石状态查询 ', moment().format('YYYY-MM-DD HH:mm:ss'));

4
code/VideoAccess-VCMP/script/1.3.8/achema/1.update_camera.sql

@ -0,0 +1,4 @@
alter table camera
add definition boolean;
comment on column camera.definition is '清晰度';

2
code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperation.jsx

@ -52,7 +52,7 @@ const VideoOperation = ({
// yingshiPrepareRef.current = 'yingshi' // yingshiPrepareRef.current = 'yingshi'
// setYingshiPrepare('play') // setYingshiPrepare('play')
} }
console.log(1111);
videoFront = new moment(); // videoFront = new moment(); //
player.stop().then((res) => { player.stop().then((res) => {
if (resolution == 'sd') { if (resolution == 'sd') {

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

@ -77,6 +77,9 @@ const VideoPlay = ({ dispatch, actions,
playUrlHd: `ezopen://open.ys7.com/${videoObj.serialNo}/${videoObj.channelNo || '1'}.hd.live`, playUrlHd: `ezopen://open.ys7.com/${videoObj.serialNo}/${videoObj.channelNo || '1'}.hd.live`,
replayUrl: `ezopen://open.ys7.com/${videoObj.serialNo}/${videoObj.channelNo || '1'}.hd.local.rec`, replayUrl: `ezopen://open.ys7.com/${videoObj.serialNo}/${videoObj.channelNo || '1'}.hd.local.rec`,
} }
if (videoObj.definition) {
videoObj.playUrlSd = `ezopen://open.ys7.com/${videoObj.serialNo}/${videoObj.channelNo || '1'}.hd.live`
}
} else { } else {
videoObj = { videoObj = {
...videoObj, ...videoObj,
@ -476,16 +479,16 @@ const VideoPlay = ({ dispatch, actions,
}, },
handleError: (e) => { // handleError: (e) => { //
console.log(e, '播放失败'); console.log(e, '播放失败');
if (playNumber.current > 4) { // if (playNumber.current > 4) {
setNumbers(e.retcode) // setNumbers(e.retcode)
videoAfter = new moment(); // videoAfter = new moment(); //
setDisappear(true) // setDisappear(true)
} else { // } else {
playNumber.current = playNumber.current + 1 // playNumber.current = playNumber.current + 1
yingshiPlayer.current.stop().then(() => { // yingshiPlayer.current.stop().then(() => {
yingshiPlayer.current.play({ url: videoObj.playUrlSd }) // yingshiPlayer.current.play({ url: videoObj.playUrlSd })
}) // })
} // }
}, },
}) })
setPlayer(player) setPlayer(player)

1049
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/fluoriteCamera.jsx

File diff suppressed because it is too large

1
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/containers/camera.jsx

@ -230,6 +230,7 @@ const CameraHeader = (props) => {
// playUrlHd: `ezopen://open.ys7.com/${row.serialNo}/${row.channelNo || 1}.hd.live`, // playUrlHd: `ezopen://open.ys7.com/${row.serialNo}/${row.channelNo || 1}.hd.live`,
// replayUrl: `ezopen://open.ys7.com/${row.serialNo}/${row.channelNo || 1}.hd.local.rec`, // replayUrl: `ezopen://open.ys7.com/${row.serialNo}/${row.channelNo || 1}.hd.local.rec`,
content: data, content: data,
definition:row.definition
}) })
} else { } else {
setVideoObj({ setVideoObj({

Loading…
Cancel
Save