Browse Source

默认清晰度

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

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

@ -87,6 +87,15 @@ module.exports = dc => {
field: "cloud_control",
autoIncrement: false
},
definition: {
type: DataTypes.BOOLEAN,
allowNull: true,
defaultValue: null,
comment: "清晰度",
primaryKey: false,
field: "definition",
autoIncrement: false
},
highDefinition: {
type: DataTypes.BOOLEAN,
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: '*/3 * * * *',
// immediate: true,
proRun: true,
immediate: true,
// proRun: true,
},
async () => {
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'
// setYingshiPrepare('play')
}
console.log(1111);
videoFront = new moment(); //
player.stop().then((res) => {
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`,
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 {
videoObj = {
...videoObj,
@ -476,16 +479,16 @@ const VideoPlay = ({ dispatch, actions,
},
handleError: (e) => { //
console.log(e, '播放失败');
if (playNumber.current > 4) {
setNumbers(e.retcode)
videoAfter = new moment(); //
setDisappear(true)
} else {
playNumber.current = playNumber.current + 1
yingshiPlayer.current.stop().then(() => {
yingshiPlayer.current.play({ url: videoObj.playUrlSd })
})
}
// if (playNumber.current > 4) {
// setNumbers(e.retcode)
videoAfter = new moment(); //
// setDisappear(true)
// } else {
// playNumber.current = playNumber.current + 1
// yingshiPlayer.current.stop().then(() => {
// yingshiPlayer.current.play({ url: videoObj.playUrlSd })
// })
// }
},
})
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`,
// replayUrl: `ezopen://open.ys7.com/${row.serialNo}/${row.channelNo || 1}.hd.local.rec`,
content: data,
definition:row.definition
})
} else {
setVideoObj({

Loading…
Cancel
Save