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

@ -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);