8.25 回放时间处理

This commit is contained in:
jl-zhoujl2
2022-08-25 14:57:59 +08:00
parent 2a69d4531d
commit 01a17de0f9
2 changed files with 8 additions and 5 deletions

View File

@ -84,7 +84,7 @@ const ScreenVideoPlay: React.FC<ScreenVideoPlayProps> = (props) => {
var layout = "1x1"; //playMode指定模式的布局
var enableHTTPS = 1; //是否启用HTTPS协议与综合安防管理平台交互这里总是填1
var encryptedFields = 'secret'; //加密字段默认加密领域为secret
var showToolbar = status; //是否显示工具栏0-不显示非0-显示
var showToolbar = 0; //是否显示工具栏0-不显示非0-显示
var showSmart = 1; //是否显示智能信息如配置移动侦测后画面上的线框0-不显示非0-显示
// var buttonIDs = "0,16,256,257,258,259,260,512,513,514,515,516,517,768,769"; //自定义工具条按钮
var buttonIDs = ""; //自定义工具条按钮
@ -194,7 +194,6 @@ const ScreenVideoPlay: React.FC<ScreenVideoPlayProps> = (props) => {
//视频回放
function videoPlayback(caremaCode: any, startTime: any, endTime: any) {
var cameraIndexCode = caremaCode; //获取输入的监控点编号值,必填
var startTimeStamp = new Date(startTime?.replace('-', '/').replace('-', '/')).getTime(); //回放开始时间戳,必填
var endTimeStamp = new Date(endTime?.replace('-', '/').replace('-', '/')).getTime(); //回放结束时间戳,必填

View File

@ -140,7 +140,11 @@ export default (props: any) => {
const onCaremaPlay = (item: any) => {
setCameraSelect(item.id);
setCameraParams(item.platform);
videoRef.current.play(item.deviceCode);
if (basicInfo?.status == "2") {//回看
videoRef.current?.back(item.deviceCode, basicInfo?.startDate, basicInfo?.endDate);
} else {
videoRef.current?.play(item.deviceCode);
}
}
//获取基本信息数据
const getRoomData = () => {
@ -159,7 +163,7 @@ export default (props: any) => {
if (data.sectionPayerList?.length > 0) {
let length = 0
for (const ite of data.sectionPayerList) {
length += ite.payerNumber;
length += Number(ite.payerNumber);
}
data["supplierLength"] = length;
} else {
@ -197,7 +201,7 @@ export default (props: any) => {
setCameraSelect(data[0].id);
setCameraParams(data[0].platform);
setTimeout(() => {
if (data.status == "2") {//回看
if (baseData.status == "2") {//回看
videoRef.current?.back(data[0].deviceCode, baseData.startDate, baseData.endDate);
} else {
videoRef.current?.play(data[0].deviceCode);