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

阅读 5.7k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题