修改播放逻辑
parent
bca1841fa1
commit
dd5fb24eba
|
|
@ -338,7 +338,8 @@
|
||||||
this.update_share_info(this.display_video_list[0]);
|
this.update_share_info(this.display_video_list[0]);
|
||||||
|
|
||||||
this.display_video_list.forEach((item, index) => {
|
this.display_video_list.forEach((item, index) => {
|
||||||
this.video_contexts[index] = uni.createVideoContext(`video_${index}`, this);
|
// this.video_contexts[index] = uni.createVideoContext(`video_${index}`, this);
|
||||||
|
this.video_contexts[index] = document.getElementById(`video_${index}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
@ -365,11 +366,9 @@
|
||||||
},
|
},
|
||||||
video_play_event(video_contexts) {
|
video_play_event(video_contexts) {
|
||||||
try {
|
try {
|
||||||
video_contexts.play().then((err) => {
|
video_contexts.play();
|
||||||
console.log(err);
|
|
||||||
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
this.setData({
|
this.setData({
|
||||||
paused: true,
|
paused: true,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue