历史播放

This commit is contained in:
zy 2025-12-20 17:17:02 +08:00
parent 43af71a084
commit dacd296f0a
2 changed files with 86 additions and 77 deletions

View File

@ -68,6 +68,34 @@ function statistic(record) {
if(camType.value == 'ball' || camType.value === 'halfball') { if(camType.value == 'ball' || camType.value === 'halfball') {
width.value = 1000; width.value = 1000;
} }
if(record.isRewind) {
if(record.deviceReverseIotUrl && record.deviceReverseIotUrl != ''){
let videohtml =
`<div style="width: 100%;height: 600px;margin:auto;"><div id="videos" style="width: 100%; height: 100%"></div></div>`
nextTick(() => {
let dom = document.querySelector('#parent2')
dom.innerHTML = videohtml
player.value = new EZUIKit.EZUIKitPlayer({
id: 'videos', // ID
accessToken: record.ysToken,
url: record.deviceReverseIotUrl,
audio: 0,
autoplay: true,
// simple: ; pcLive: pc; pcRec: pc; mobileLive: ; mobileRec: ;security: ; voice: ;
template: 'security',
// themeData: this.themeData,
plugin: ['expend'], // talk-
height: 600,
showStreamInfo:false,
})
playerType.value = 'ys';
const videosWrap = document.getElementById('videos-wrap');
videosWrap.style.height = '100%';
})
}
}else{
if(record.deviceIotUrl && record.deviceIotUrl != ''){ if(record.deviceIotUrl && record.deviceIotUrl != ''){
let videohtml = let videohtml =
`<div style="width: 100%;height: 600px;margin:auto;"><div id="videos" style="width: 100%; height: 100%"></div></div>` `<div style="width: 100%;height: 600px;margin:auto;"><div id="videos" style="width: 100%; height: 100%"></div></div>`
@ -126,31 +154,10 @@ function statistic(record) {
playerType.value = 'm3u8'; playerType.value = 'm3u8';
player.value.play(); player.value.play();
}) })
}else if(record.deviceReverseIotUrl && record.deviceReverseIotUrl != ''){
let videohtml =
`<div style="width: 100%;height: 600px;margin:auto;"><div id="videos" style="width: 100%; height: 100%"></div></div>`
nextTick(() => {
let dom = document.querySelector('#parent2')
dom.innerHTML = videohtml
player.value = new EZUIKit.EZUIKitPlayer({
id: 'videos', // ID
accessToken: record.ysToken,
url: record.deviceReverseIotUrl,
audio: 0,
autoplay: true,
// simple: ; pcLive: pc; pcRec: pc; mobileLive: ; mobileRec: ;security: ; voice: ;
template: 'security',
// themeData: this.themeData,
plugin: ['expend'], // talk-
height: 600,
showStreamInfo:false,
})
playerType.value = 'ys';
const videosWrap = document.getElementById('videos-wrap');
videosWrap.style.height = '100%';
})
} }
}
} }
/** /**

View File

@ -45,6 +45,7 @@
* 查看监控 * 查看监控
*/ */
function handleMonitor(record) { function handleMonitor(record) {
record.isRewind = false;
monitorRegisterModal.value.statistic(record); monitorRegisterModal.value.statistic(record);
} }
@ -52,6 +53,7 @@
* 查看历史监控 * 查看历史监控
*/ */
function handleHisMonitor(record) { function handleHisMonitor(record) {
record.isRewind = true;
monitorRegisterModal.value.statistic(record); monitorRegisterModal.value.statistic(record);
} }