|
@@ -25,7 +25,7 @@ |
|
@@ -25,7 +25,7 @@ |
25
|
class="video"
|
25
|
class="video"
|
26
|
:src="item.videoUrl"
|
26
|
:src="item.videoUrl"
|
27
|
controls
|
27
|
controls
|
28
|
- webkit-playsinline
|
28
|
+ :title="item.name"
|
29
|
x5-video-player-type="h5"
|
29
|
x5-video-player-type="h5"
|
30
|
x5-video-orientation="portraint"
|
30
|
x5-video-orientation="portraint"
|
31
|
show-mute-btn
|
31
|
show-mute-btn
|
|
@@ -64,8 +64,7 @@ export default { |
|
@@ -64,8 +64,7 @@ export default { |
64
|
current: 0,
|
64
|
current: 0,
|
65
|
cameraTotal: 0,
|
65
|
cameraTotal: 0,
|
66
|
list: [],
|
66
|
list: [],
|
67
|
- ordId: '',
|
|
|
68
|
- videoContext: null
|
67
|
+ ordId: ''
|
69
|
};
|
68
|
};
|
70
|
},
|
69
|
},
|
71
|
onShow() {
|
70
|
onShow() {
|
|
@@ -74,9 +73,6 @@ export default { |
|
@@ -74,9 +73,6 @@ export default { |
74
|
this.loadData(1, this.ordId);
|
73
|
this.loadData(1, this.ordId);
|
75
|
}
|
74
|
}
|
76
|
},
|
75
|
},
|
77
|
- onReady() {
|
|
|
78
|
- this.videoContext = uni.createVideoContext('myVideo', this);
|
|
|
79
|
- },
|
|
|
80
|
onHide() {
|
76
|
onHide() {
|
81
|
this.ordId = '';
|
77
|
this.ordId = '';
|
82
|
this.loadData(1, null);
|
78
|
this.loadData(1, null);
|
|
@@ -126,17 +122,19 @@ export default { |
|
@@ -126,17 +122,19 @@ export default { |
126
|
},
|
122
|
},
|
127
|
playVideo(e) {
|
123
|
playVideo(e) {
|
128
|
/**
|
124
|
/**
|
129
|
- * 播放当前视频,暂停其余视频
|
125
|
+ * 点击全屏播放当前视频,暂停其余视频
|
|
|
126
|
+ * 兼容APP和MP端
|
130
|
*/
|
127
|
*/
|
131
|
let currentId = 'video' + e.currentTarget.dataset.id;
|
128
|
let currentId = 'video' + e.currentTarget.dataset.id;
|
132
|
this.videoContent = uni.createVideoContext(currentId, this);
|
129
|
this.videoContent = uni.createVideoContext(currentId, this);
|
133
|
- this.videoContext.requestFullScreen({ direction: 90 });
|
130
|
+ this.videoContent.requestFullScreen();
|
134
|
// 获取视频列表
|
131
|
// 获取视频列表
|
135
|
let trailer = this.list;
|
132
|
let trailer = this.list;
|
136
|
trailer.forEach((item, index) => {
|
133
|
trailer.forEach((item, index) => {
|
137
|
if (item.videoUrl != null && item.videoUrl != '') {
|
134
|
if (item.videoUrl != null && item.videoUrl != '') {
|
138
|
let temp = 'video' + item.id;
|
135
|
let temp = 'video' + item.id;
|
139
|
if (temp != currentId) {
|
136
|
if (temp != currentId) {
|
|
|
137
|
+ //暂停不是当前的视频
|
140
|
uni.createVideoContext(temp, this).pause();
|
138
|
uni.createVideoContext(temp, this).pause();
|
141
|
}
|
139
|
}
|
142
|
}
|
140
|
}
|