This commit is contained in:
duanliang
2025-04-17 20:18:38 +08:00
parent d7eeea3efe
commit 09dcabadda
23 changed files with 1302 additions and 269 deletions

View File

@@ -62,6 +62,7 @@
}
)
let isCollect = ref(0)
let list = ref([])
let src = ref('')
@@ -84,7 +85,7 @@ let isCollect = ref(0)
postVideoRemainApi({
cameraIndexCode: list.value.map((item) => item.cameraIndexCode)
})
}, 4000)
}, 1500)
}
const getPreviewUrl = async (code) => {
@@ -101,13 +102,8 @@ let isCollect = ref(0)
pageSize: 5
})
list.value = res.data
if(list.value.length){
postVideoRemain()
}else{
console.log('清除定时器')
//清除定时器
if (timer) clearInterval(timer)
}
postVideoRemain()
if (timer) clearInterval(timer)
// console.log(list.value,'list.valuelist.valuelist.valuelist.value')
// nextTick(() => {
// list.value.forEach(async (item, index) => {
@@ -129,7 +125,14 @@ let isCollect = ref(0)
// })
// })
}
watch(
() => list.value,
(val) => {
if(val.length){
postVideoRemain()
}
}
)
// 释放hls实例
const clearHlsRefs = () => {
if (hlsRefs.length > 0) {