2***@qq.com
2***@qq.com
  • 发布:2019-03-11 20:54
  • 更新:2019-09-29 09:12
  • 阅读:1633

【报Bug】h5+ 的video在ios端页面关闭的时候调用close方法无效

分类:HTML5+

用vue2.x开发的单页,然后用hbuilderx在线打包的app,iphone6s ios12测试的,当跳转到别的页面时,播放器还浮在页面上,挡住别的页面内容了,求大神指点

methods:{  
// 获取视频播放信息  
    getUrl(){  
      let _this = this;  
      this.$api.post('api/portal/Video/url',{},res=>{  
        this.link = res.data.video_url;  
        this.postImg = res.data.video_pic_url;  
        if(this.player){  
          this.player.close();  
        }  
        if(window.plus){  
          this.player = new plus.video.VideoPlayer('myvideo', {    
            src:_this.link,    
            poster: _this.postImg ,         //视频封面地址    
            autoplay: res.data.video_auto_play == '1'?true:false  
          });     
        }else{  
          document.addEventListener("plusready", function(){  
            _this.player = new plus.video.VideoPlayer('myvideo', {    
              src:_this.link,    
              poster: _this.postImg ,         //视频封面地址   
              autoplay: res.data.video_auto_play == '1'?true:false   
            });  
          },false)  
        }  
      },res=>{  
      })  
    },  
},  
  beforeDestroy () {  
    if(this.player){  
      this.player.close();  
    }  
  },
2019-03-11 20:54 负责人:无 分享
已邀请:
1***@163.com

1***@163.com

同 ios端beforeDestroy方法不调用

该问题目前已经被锁定, 无法添加新回复