From cc2df46ba6192b1541b976cb992e2ea3f76b8fc7 Mon Sep 17 00:00:00 2001
From: luobisheng <727299681@qq.com>
Date: 星期五, 09 十二月 2022 17:32:54 +0800
Subject: [PATCH] 点位管理视频加载
---
src/views/systemSetting/device/point/index.vue | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/views/systemSetting/device/point/index.vue b/src/views/systemSetting/device/point/index.vue
index 1feccd5..924bbde 100644
--- a/src/views/systemSetting/device/point/index.vue
+++ b/src/views/systemSetting/device/point/index.vue
@@ -50,12 +50,13 @@
class="video-js vjs-default-skin"
controls
preload="auto"
- width="300px"
- height="300px"
+ width="240px"
+ height="200px"
type="video/mp4"
:src="item.urlAddress"
>
</video>
+ <div @click="loadVideo(item)" class="button-div">鏌ョ湅瑙嗛</div>
</div>
</el-main>
<el-footer>
@@ -112,15 +113,12 @@
this.totalNum = total;
})
.catch((err) => this.$message.error(err));
- this.setVideo();
},
- setVideo() {
+ loadVideo(data) {
if (Hls.isSupported()) {
- this.videoData.forEach(video => {
- const videoPlayer = document.getElementById(video.id);
- this.hls.loadSource(video.urlAddress);
- this.hls.attachMedia(videoPlayer);
- })
+ const videoPlayer = document.getElementById(data.id);
+ this.hls.loadSource(data.urlAddress);
+ this.hls.attachMedia(videoPlayer);
}
},
selectedDepartment(data) {
@@ -200,6 +198,17 @@
cursor: pointer;
}
+.button-div {
+ color: rgb(75, 155, 183);
+ position: absolute;
+ height: 30px;
+ line-height: 30px;
+ width: 100%;
+ margin-left: 20px;
+ cursor: pointer;
+ border: 1px solid rgb(75, 155, 183);
+}
+
.el-pagination {
&::v-deep li,
&::v-deep .btn-prev,
--
Gitblit v1.8.0