小程序 视频列表只能播放一个,其他视频暂停
if (!that.data.current) {//判断是否有播放的视频
this.videoContext.stop()
this.setData({//没有视频播放时
current: e.detail.current
}, function () {
this.videoContext = wx.createVideoContext('myVideo' + this.data.current)
this.videoContext.play()
})
} else {
this.videoContext.pause()
this.setData({
current: e.detail.current
}, function () {
this.videoContext = wx.createVideoContext('myVideo' + this.data.current)
this.videoContext.play()
})
}