大屏视频对接

pull/36/head
孙萌 2023-11-16 10:39:29 +08:00
parent 9a56e7b039
commit 09b4d0a0cb
1 changed files with 16 additions and 14 deletions

View File

@ -96,11 +96,11 @@
<div class="liveVideo"></div>
<div class="liveVideo_content">
<div class="swiper-container mySwiper_video">
<div class="swiper-container mySwiper_video" >
<div class="swiper-wrapper">
<div class="swiper-slide swiper-slide_video" v-for="(item, index) in get_sel_eqbyid_list" :key="index">
<div class="monitor" ref="monitor" id="monitor">
<div ref="videoPlayer" class="video-js" id="video-js"></div>
<div class="monitor" :id="'monitor'+item.number">
<div ref="videoPlayer" class="video-js" :id="'video-js'+item.number"></div>
</div>
<div class="c_bottom">{{ item.deviceTypeName }}</div>
</div>
@ -335,12 +335,12 @@ export default {
},
// Copy
getVideoData(cameraid, channelid) {
getVideoData(cameraid, channelid,index) {
this.api.camera_gethls(cameraid, channelid).then(res => {
// console.log(' Copy',res);
if (res.data.code == 200) {
// this.url = res.data.data.ezopen
// this.createVideoNew(res.data.data.accessToken)
this.createVideoNew(res.data.data.accesstoken,res.data.data.ezopen,index )
// this.createVideo()
}
})
@ -351,10 +351,11 @@ export default {
this.api.sel_eqbyid(userId).then(res => {
// console.log('id Copy',res);
res.data.data.forEach(item => {
if (item.equipmentName == 10 && item.cameraSerialNumber != null) {
this.get_sel_eqbyid_list.push(item)
this.getVideoData(item.cameraSerialNumber, item.cameraChannelNumber)
res.data.data.forEach((item,index) => {
if ( item.cameraSerialNumber != null) {
this.get_sel_eqbyid_list.push({...item,number:index})
this.getVideoData(item.cameraSerialNumber, item.cameraChannelNumber,index)
// this.getVideoData("L18357958", "5")
}
})
@ -393,14 +394,15 @@ export default {
this.get_sel_eqbyid(userInfo.userid)
},
createVideoNew(accessToken) {
createVideoNew(accessToken,url,index) {
console.log(accessToken,url,index,111);
// divWdivH 使div
let divW = this.$refs.monitor.clientWidth
let divH = this.$refs.monitor.clientHeight
let divW = document.getElementById('monitor'+index).clientWidth
let divH = document.getElementById('monitor'+index).clientHeight
this.player = new EZUIKit.EZUIKitPlayer({
id: 'video-js', // ID
id: 'video-js'+index, // ID
accessToken: accessToken,
url: this.url,
url: url,
// urlezopen://open.ys7.com/G39444019/1.live .live GitHub
// simple-; standard-; security-; voice-; GitHub
template: 'security',