feat:视频列表现在分页操作
This commit is contained in:
@@ -53,18 +53,12 @@
|
||||
nextTick(() => {
|
||||
list.value.forEach(async (item, index) => {
|
||||
var video = document.getElementById(`video${index}`)
|
||||
let res1 = await postRefreshApi({
|
||||
type: 'hls',
|
||||
businessVideoDisplayPosition: item.businessVideoDisplayPosition,
|
||||
cameraIndexCode: item.cameraIndexCode
|
||||
})
|
||||
item.hlsUrl = res1.data.hlsUrl
|
||||
const hls = new Hls({
|
||||
maxBufferLength: 10, // 最大缓冲长度(秒)
|
||||
maxMaxBufferLength: 15, // 缓冲区长度的上限
|
||||
maxBufferSize: 20 * 1000 * 1000 // 最大缓冲大小(字节)
|
||||
})
|
||||
hls.loadSource(res1.data.hlsUrl)
|
||||
hls.loadSource(item.hlsUrl)
|
||||
hls.attachMedia(video)
|
||||
hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
||||
video.play()
|
||||
|
||||
Reference in New Issue
Block a user