feat:重新对接首页接口
This commit is contained in:
@@ -55,16 +55,13 @@
|
||||
list.value.forEach(async (item, index) => {
|
||||
var video = document.getElementById(`video${index}`)
|
||||
let res1 = await postRefreshApi({
|
||||
type: 'hls',
|
||||
businessVideoDisplayPosition: item.businessVideoDisplayPosition,
|
||||
cameraIndexCode: item.cameraIndexCode
|
||||
})
|
||||
let hlsUrl = res1.data.hlsUrl.replace(
|
||||
'http://172.22.15.170:8050',
|
||||
'http://36.138.38.16:6150'
|
||||
)
|
||||
item.hlsUrl = hlsUrl
|
||||
item.hlsUrl = res1.data.hlsUrl
|
||||
const hls = new Hls()
|
||||
hls.loadSource(hlsUrl)
|
||||
hls.loadSource(res1.data.hlsUrl)
|
||||
hls.attachMedia(video)
|
||||
hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
||||
video.play()
|
||||
|
||||
Reference in New Issue
Block a user