绑定事件时,需要使用 bindPay , 在真机上可全屏
wx.createVideoContext 的 requestFullScreen调用无效?requestFullScreen 在开发者工具上会同时执行2次,真机下无效: 代码如下 videoFullscreenchange(e: any){ console.log('eeee',e) let {fullScreen} = e.detail this.setData({ fullScreen: fullScreen }) if(!fullScreen){ let video: any = this.data.video video.pause() } }, videoPlay(e : any){ let {videoid} = e.currentTarget.dataset let video: any = wx.createVideoContext(videoid, this); console.log(videoid) setTimeout(() => { video.requestFullScreen({ direction: 0, }) }, 500) this.setData({ video: video, fullScreen: true }) video.play() } 输出结果 [图片]
2023-11-03