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. 21
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx
  7. 87
      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') {

21
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)
// 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 })
})
}
// setDisappear(true)
// } else {
// playNumber.current = playNumber.current + 1
// yingshiPlayer.current.stop().then(() => {
// yingshiPlayer.current.play({ url: videoObj.playUrlSd })
// })
// }
},
})
setPlayer(player)

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

@ -7,6 +7,7 @@ function fluoriteCamera ({ cRef, CameraKind, CameraAbility, cameraData, ashTrue,
const form = useRef();
const [cloud, setcloud] = useState(""); //
const [voice, setvoice] = useState(""); //
const [definition, setDefinition] = useState(""); //
const [switching, setSwitching] = useState(""); //
const [memoryList, setMemoryList] = useState([
{
@ -275,6 +276,92 @@ function fluoriteCamera ({ cRef, CameraKind, CameraAbility, cameraData, ashTrue,
</Form.Select.Option>
))}
</Form.Select>
{/* 语音支持 */}
<Form.RadioGroup
// labelWidth= '76px'
label="清晰度:"
field="definition"
type="pureCard"
direction="horizontal"
style={{ padding: 0, paddingTop: 1, paddingBottom: 1 }}
onChange={(checked) => {
if (checked.target.value == true) {
setDefinition(true);
} else {
setDefinition(false);
}
}}
>
<Form.Radio
value={true}
style={{
width: 58,
height: 30,
padding: 0,
margin: 0,
background: "#F9F9F9",
}}
>
<div
className="voice"
style={{
width: 58,
height: 30,
textAlign: "center",
lineHeight: "30px",
}}
>
高清
</div>
{definition == true ? (
<div
style={{ position: "absolute", top: "-2px", right: "-1px" }}
>
<img
src="/assets/images/background/formchoose.png"
alt="1"
/>
</div>
) : (
""
)}
</Form.Radio>
<Form.Radio
value={false}
style={{
width: 58,
height: 30,
padding: 0,
margin: 0,
marginLeft: 18,
background: "#F9F9F9",
}}
>
<div
className="voice"
style={{
width: 58,
height: 30,
textAlign: "center",
lineHeight: "30px",
}}
>
标清
</div>
{definition == false && definition !== "" ? (
<div
style={{ position: "absolute", top: "-2px", right: "-1px" }}
>
<img
src="/assets/images/background/formchoose.png"
alt="1"
/>
</div>
) : (
""
)}
</Form.Radio>
</Form.RadioGroup>
</Col>
<Col span={12}>

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