Commit 1ca30092 authored by xinzhedeai's avatar xinzhedeai

监控 ezuikitjs

parent 70c7de43
......@@ -7,6 +7,7 @@
</div> -->
<div class="cv-inbody">
<div class="EZUIKit-video" id="video-container"></div>
<div class="EZUIKit-video" id="video-container2"></div>
</div>
</div>
</template>
......@@ -56,6 +57,8 @@ export default {
},
mounted() {
this.videoContainer = this.$el.querySelector("#video-container");
this.videoContainer2 = this.$el.querySelector("#video-container2");
this.info = {
id: "AX8345878",
appKey: "a3008abda1b94df7b3002f2034b7272d",
......@@ -95,6 +98,15 @@ export default {
}, 500);
} else {
this.createVideo(item);
}
if (this.videoContainer2.firstElementChild) {
this.videoContainer2.innerHTML = "";
setTimeout(() => {
this.createVideo2(item);
}, 500);
} else {
this.createVideo2(item);
}
},
......@@ -126,6 +138,19 @@ export default {
);
},
createVideo2(item) {
this.getAccessToken(this.info.appKey, this.info.appSecret).then(
(accessToken) => {
this.player2 = new EZUIKit.EZUIKitPlayer({
autoplay: true,
id: "video-container2",
accessToken: accessToken,
url: 'ezopen://open.ys7.com/BA2171975/1.hd.live',
template: "standard", // simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版;
});
}
);
},
/**
* 获取Token
* @param: {String} appKey
......@@ -153,7 +178,7 @@ export default {
return err;
});
},
getUrl(item) {
var captcha = item.captcha ? item.captcha + "@" : "";
var id = item.id || this.info.id || "";
......@@ -184,8 +209,7 @@ export default {
.cv-inbox {
position: relative;
height: 200px;
// width: 100%;
width: 360px;
width: 670px;
display: flex;
flex-direction: column;
.vi-select {
......@@ -217,6 +241,8 @@ export default {
}
.cv-inbody {
display: flex;
justify-content: space-around;
flex: 1;
position: relative;
.EZUIKit-video {
......@@ -230,9 +256,9 @@ export default {
iframe {
// height: 100%;
height: 200px !important;
width: 100%;
}
width: 1
}
}
}
}
</style>
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment