index.vue
2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<template>
<div class="app-videoMonitor">
<div class="theme-card">
<div class="title">果园监控</div>
<div class="content">
<!--<el-carousel :interval="3000" trigger="click" height="150px" indicator-position="none" :autoplay="false">-->
<!--<el-carousel-item v-for="item in 4" :key="item">-->
<!--<h3>{{ item }}</h3>-->
<!--</el-carousel-item>-->
<!--</el-carousel>-->
<video-player class="video-player vjs-custom-skin videoContainer"
ref="videoPlayer"
:playsinline="true"
:options="playerOptions"
></video-player>
</div>
</div>
</div>
</template>
<script>
export default {
name: "videoMonitor",
data() {
return {
// color: this.$store.state.color,
// myChart: {},
//weather_news: this.$store.state.weatherModule.weather_news
playerOptions: {
autoplay: true,
loop:false,
preload: 'auto',
fluid: true,
language: 'zh-CN',
aspectRatio: '16:9',
sources: [{
type: "video/mp4",
src: '../static/video/videoMonitor/bind.mp4'
}],
notSupportedMessage: '网络不佳,请稍后再试',
//height: document.documentElement.clientHeight,
controls:false,
// controlBar: {
// timeDivider: false,
// durationDisplay: false,
// remainingTimeDisplay: false,
// fullscreenToggle: false //全屏按钮
// }
}
}
}
}
</script>
<style scoped lang="scss">
.app-videoMonitor {
width: 100%;
.theme-card{
height: 100%;
.content > span{
color: red;font-size: 12px;text-align: left;
}
}
.el-carousel__item h3 {
color: #475669;
font-size: 14px;
opacity: 0.75;
line-height: 150px;
margin: 0;
}
.el-carousel__item:nth-child(2n) {
background-color: #99a9bf;
}
.el-carousel__item:nth-child(2n+1) {
background-color: #d3dce6;
}
.videoContainer{
height: 100%;
width: 100%;
position: relative;
}
.video-js .vjs-big-play-button{
display:none;
}
}
</style>