|
|
|
|
@ -46,6 +46,7 @@ export default {
|
|
|
|
|
modelData: [],
|
|
|
|
|
clientHeight: 0,
|
|
|
|
|
showVideo: false,
|
|
|
|
|
players: []
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
@ -70,7 +71,7 @@ export default {
|
|
|
|
|
this.getClientHeight();
|
|
|
|
|
},
|
|
|
|
|
destroyed() {
|
|
|
|
|
// window.onresize = null;
|
|
|
|
|
this.destory()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getClientHeight() {
|
|
|
|
|
@ -113,6 +114,7 @@ export default {
|
|
|
|
|
if(video){
|
|
|
|
|
let player = new WebRtcPlayer(video,'camera'+b.id);
|
|
|
|
|
player.load('camera'+b.id);
|
|
|
|
|
this.players.push(player)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -120,6 +122,12 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
destory(){
|
|
|
|
|
for(let player of this.players){
|
|
|
|
|
console.log("stop")
|
|
|
|
|
player.destroy()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
setVideoServer(){
|
|
|
|
|
this.$api.httpApi.getVideoServer({
|
|
|
|
|
data: {}
|
|
|
|
|
|