Vali
Vali
  • 发布:2019-10-24 17:45
  • 更新:2019-10-24 17:47
  • 阅读:4966

微信小程序,video组件,设置了多个视频只能播放一个,但是没有效果啊

分类:uni-app

handle:function(id){
// 检测 this.video 的值
// 停止播放
// do something ...
//控制只播放一个
let newVideo = uni.createVideoContext(id);
console.log(newVideo);
if (!this.video) {
this.video = newVideo;
this.video.play();
return
}
if (this.video.id !== newVideo.id) {
newVideo.play();
this.video.pause();
this.video = newVideo;
}
}

这个是方法

2019-10-24 17:45 负责人:无 分享
已邀请:
Vali

Vali (作者)

在HBuilderX上面写的代码

该问题目前已经被锁定, 无法添加新回复