微信小程序 - uni-app的video标签全屏播放问题

 

问题描述:

我在使用uni-app的video标签的时候使用微信开发者工具模拟不能够全屏然后我使用了@fullscreenchange结果会执行两次,一点全屏就会闪一下,请问一下怎样实现video的全屏和非全屏的切换啊

<video id="myVideo" 
:src=selectLookBack.info.remote_url 
style="width: 100%;" 
v-if="showVideo" 
autoplay="true"     
@fullscreenchange="fullScreen">
</video>

fullScreen:function(e){
  console.log("进入123")
  console.log(e)
  var videoContext = wx.createVideoContext('myvideo', this);
  if(!this.fullScreenStatus){
      console.log("进入if")
      videoContext.requestFullScreen();
      this.fullScreenStatus=true
  }else{
      console.log("进入else")
      videoContext.exitFullScreen(); 
      this.fullScreenStatus=false
  }
}

image.png


 

第 1 个答案:

你好请问解决了嘛,我也遇到了这个问题


对接外部 sdk,在 utils文件夹下的代码中引入 topsdk,引入后运行项目报如题错误,请教可以如何解决?