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


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()
})
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM