feat:对接消息相关接口
This commit is contained in:
@@ -11,12 +11,11 @@
|
||||
>
|
||||
<div>
|
||||
<p :class="[index % 2 === 0 ? 'item-title--primary' : 'item-title--error']">
|
||||
三峡之巅-最新异常名称三峡之巅-最新异常名称三峡之巅-最新异常名称
|
||||
{{ item.cameraName }}
|
||||
</p>
|
||||
<!-- <img class="item-img" src="@/assets/images/cover.png" /> -->
|
||||
<video
|
||||
class="item-img"
|
||||
:ref="(el) => getRefs(el, index)"
|
||||
:ref="(el) => getRefs(el, item, index)"
|
||||
muted
|
||||
autoplay
|
||||
controls
|
||||
@@ -38,10 +37,15 @@
|
||||
|
||||
let list = ref([])
|
||||
|
||||
const getRefs = (el) => {
|
||||
const getRefs = async (el, item) => {
|
||||
if (el) {
|
||||
let res = await postRefreshApi({
|
||||
businessVideoDisplayPosition: item.businessVideoDisplayPosition,
|
||||
cameraIndexCode: item.cameraIndexCode
|
||||
})
|
||||
let hlsUrl = res.data.hlsUrl.replace('http://172.22.15.170:8050', 'http://36.138.38.16:6150')
|
||||
const hls = new Hls()
|
||||
hls.loadSource('http://36.138.38.16:6106/live/042f4987808b444aa96c1e8bc6e3ad2a/hls.m3u8')
|
||||
hls.loadSource(hlsUrl)
|
||||
hls.attachMedia(el)
|
||||
hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
||||
el.play()
|
||||
@@ -135,7 +139,7 @@
|
||||
}
|
||||
&-img {
|
||||
width: 100%;
|
||||
height: vw(164);
|
||||
height: vh(164);
|
||||
display: block;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user