获得过 0 次赞
回答过的问题获得 0 次赞
分享过的文章/案例获得 0 次赞
评论与回复获得 0 次赞
wx.createVideoContext('myvideo2', this); 需要传递this上下文
组件内用wx.createVideoContext(id)后play()不行,是什么原因啊?自定义组件内wxml <video id="myvideo2" src='https://peacebird-img.oss-cn-shanghai.aliyuncs.com/wx/2019-12-11-bar-12.mp4' enable-danmu danmu-btn controls> <cover-view bindtap="videoPlayCover"> <cover-image class="img" src="http://ofstudio.com/tempimag/001.jpg" style="width: 50%;" /> </cover-view> </video> 自定义组件内JS methods: { videoPlayCover() { var video = wx.createVideoContext('myvideo2'); console.log(video) video.play(); } } video.play(); //执行失败 https://developers.weixin.qq.com/s/8xTOfJml7tfg
2020-05-01