修改播放逻辑

master
于肖磊 2026-02-10 16:43:37 +08:00
parent bca1841fa1
commit dd5fb24eba
1 changed files with 4 additions and 5 deletions

View File

@ -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,
}); });