tabchange

merge-requests/1/head
qiushui 4 years ago
parent 8cfddc29c9
commit a0c82c4bda

@ -35,7 +35,7 @@
width="80%" width="80%"
height="80%" height="80%"
:id="`camera${id}`" :id="`camera${id}`"
autoplay controls muted ></video> autoplay muted ></video>
<!-- <object id="video-test" type='application/x-vlc-plugin' events='True' width="100%" <!-- <object id="video-test" type='application/x-vlc-plugin' events='True' width="100%"
height="100%" pluginspage="http://www.videolan.org" height="100%" pluginspage="http://www.videolan.org"
codebase="http://downloads.videolan.org/pub/videolan/vlc-webplugins/2.0.6/npapi-vlc-2.0.6.tar.xz"> codebase="http://downloads.videolan.org/pub/videolan/vlc-webplugins/2.0.6/npapi-vlc-2.0.6.tar.xz">
@ -101,7 +101,7 @@
<video width="900" <video width="900"
height="600" height="600"
:id="`camera${id}`" :id="`camera${id}`"
autoplay controls muted ></video> autoplay muted ></video>
<div class="operation-list"> <div class="operation-list">
<div class="operation-item"> <div class="operation-item">
<img :src="zoomSubUrl" alt="" @mousedown="zoomDecStart" <img :src="zoomSubUrl" alt="" @mousedown="zoomDecStart"

@ -20,12 +20,7 @@
}" }"
style="width: 100%;object-fit: cover;" style="width: 100%;object-fit: cover;"
:id="`camera${item.id}`" :id="`camera${item.id}`"
autoplay controls muted ></video> autoplay muted ></video>
<!-- <video-player
v-if="showVideo"
@showModel="showModel(item)"
:src="item.m3u8">
</video-player> -->
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
@ -105,7 +100,7 @@ export default {
tabsChange(key) { tabsChange(key) {
sessionStorage.setItem('tabKey', key) sessionStorage.setItem('tabKey', key)
this.reload() this.autoPlay()
}, },
showModel(item) { showModel(item) {
this.$nextTick(() => { this.$nextTick(() => {
@ -116,8 +111,11 @@ export default {
for(var a of this.realTimeListData){ for(var a of this.realTimeListData){
for (let b of a.cameras){ for (let b of a.cameras){
let video = document.getElementById('camera'+b.id); let video = document.getElementById('camera'+b.id);
let player = new WebRtcPlayer(video,'camera'+b.id); if(video){
player.load('camera'+b.id); let player = new WebRtcPlayer(video,'camera'+b.id);
player.load('camera'+b.id);
}
} }
} }

Loading…
Cancel
Save