小程序 视频列表只能播放一个,其他视频暂停

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()
})
}
posted @ 2019-04-28 10:05  风一样的猿  阅读(2575)  评论(0编辑  收藏  举报