Commit 1ca30092 authored by xinzhedeai's avatar xinzhedeai

监控 ezuikitjs

parent 70c7de43
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
</div> --> </div> -->
<div class="cv-inbody"> <div class="cv-inbody">
<div class="EZUIKit-video" id="video-container"></div> <div class="EZUIKit-video" id="video-container"></div>
<div class="EZUIKit-video" id="video-container2"></div>
</div> </div>
</div> </div>
</template> </template>
...@@ -56,6 +57,8 @@ export default { ...@@ -56,6 +57,8 @@ export default {
}, },
mounted() { mounted() {
this.videoContainer = this.$el.querySelector("#video-container"); this.videoContainer = this.$el.querySelector("#video-container");
this.videoContainer2 = this.$el.querySelector("#video-container2");
this.info = { this.info = {
id: "AX8345878", id: "AX8345878",
appKey: "a3008abda1b94df7b3002f2034b7272d", appKey: "a3008abda1b94df7b3002f2034b7272d",
...@@ -95,6 +98,15 @@ export default { ...@@ -95,6 +98,15 @@ export default {
}, 500); }, 500);
} else { } else {
this.createVideo(item); 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 { ...@@ -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 * 获取Token
* @param: {String} appKey * @param: {String} appKey
...@@ -153,7 +178,7 @@ export default { ...@@ -153,7 +178,7 @@ export default {
return err; return err;
}); });
}, },
getUrl(item) { getUrl(item) {
var captcha = item.captcha ? item.captcha + "@" : ""; var captcha = item.captcha ? item.captcha + "@" : "";
var id = item.id || this.info.id || ""; var id = item.id || this.info.id || "";
...@@ -184,8 +209,7 @@ export default { ...@@ -184,8 +209,7 @@ export default {
.cv-inbox { .cv-inbox {
position: relative; position: relative;
height: 200px; height: 200px;
// width: 100%; width: 670px;
width: 360px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.vi-select { .vi-select {
...@@ -217,6 +241,8 @@ export default { ...@@ -217,6 +241,8 @@ export default {
} }
.cv-inbody { .cv-inbody {
display: flex;
justify-content: space-around;
flex: 1; flex: 1;
position: relative; position: relative;
.EZUIKit-video { .EZUIKit-video {
...@@ -230,9 +256,9 @@ export default { ...@@ -230,9 +256,9 @@ export default {
iframe { iframe {
// height: 100%; // height: 100%;
height: 200px !important; 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