历史播放
This commit is contained in:
parent
43af71a084
commit
dacd296f0a
|
|
@ -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,33 +154,12 @@ 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%';
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
* @param record
|
* @param record
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue