潘哒
潘哒
  • 发布:2020-03-31 15:13
  • 更新:2020-04-10 18:57
  • 阅读:1577

ios13.4使用h5+播放视频,退出全屏时导致app闪退

分类:HTML5+

playVideo: function(src) {
this.player = new plus.video.VideoPlayer('myPlayer', {
src: src,
});
// 监听开始播放事件
this.player.addEventListener('play', function(e) {
console.log('Video play');
}, false)
// 监听播放进度更新事件
this.player.addEventListener('timeupdate', function(e) {
//console.log(JSON.stringify(e));
}, false);
// 监听播放结束事件
this.player.addEventListener('ended', function(e) {
console.log('Video ended');
}, false);
// 监听全屏事件
this.player.addEventListener('fullscreenchange', function(e) {
//event.detail = {fullScreen:"Boolean类型,当前状态是否为全屏", direction:"String类型,vertical或horizontal"}
if(!e.detail.fullScreen) { // 退出全屏时event.detail.fullScreen为false
this.player.stop();
this.player = {};
}
}.bind(this), false);
this.player.play()
this.player.requestFullScreen()
},
点击视频开始播放,并自动全屏,点击退出全屏后,停止播放视频,app项目直接闪退。
好像暂停播放视频或者视频播放完了也会闪退

2020-03-31 15:13 负责人:无 分享
已邀请:
consistent

consistent

请问解决了吗

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