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

用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();

}

},

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值