renzifeng / ZFPlayer

Support customization of any player SDK and control layer(支持定制任何播放器SDK和控制层)
MIT License
7.05k stars 1.75k forks source link

iOS 16, iPhone 12 pro max 调用全屏函数 app整个卡死 #1362

Open yownyang opened 1 year ago

yownyang commented 1 year ago

问题描述: 目前在非iOS 16系统上,iPhone设备正常 在iOS 16系统上,iPhone Xs Max正常; iPhone 12 pro max 全屏 app整个卡死,但还是有声音 未做任何其他处理,只调用了

[self.player enterFullScreen:YES animated:YES];

https://user-images.githubusercontent.com/13342825/199639538-3302abaf-c995-4415-8ae5-26c03a22f301.mov

twttt123 commented 1 year ago

解决了吗, 老哥, 我这也遇到这个问题

yownyang commented 1 year ago

解决了吗, 老哥, 我这也遇到这个问题

这个问题是因为屏幕旋转后,横屏的window没有移除,所以导致竖屏无法点击,但是作者似乎是没时间处理了

Mr-Dsg commented 1 year ago

找到:ZFLandscapeRotationManager_iOS16 在68行之后添加一个隐藏window的判断,暂时解决这个问题

JoanLeeo commented 1 year ago

我也遇到了这个问题。具体什么原因呢

TDGYL commented 1 year ago

好消息:我有一个项目没问题 12 pro max全屏没问题 坏消息:现在的新项目也卡死了 没找到问题在哪 也是12 pro max就有问题

TDGYL commented 1 year ago

找到:ZFLandscapeRotationManager_iOS16 在68行之后添加一个隐藏window的判断,暂时解决这个问题

  • (void)interfaceOrientation:(UIInterfaceOrientation)orientation completion:(void(^ __nullable)(void))completion { ... if (fromOrientation == UIInterfaceOrientationPortrait || self.contentView.superview != self.landscapeViewController.view) { ... if (!self.window.isKeyWindow) { ... } if(toOrientation == UIInterfaceOrientationPortrait){ self.window.hidden = YES; } } else if (toOrientation == UIInterfaceOrientationPortrait) { ... } 试了下 我这不起作用
JoanLeeo commented 1 year ago

找到:ZFLandscapeRotationManager_iOS16 在68行之后添加一个隐藏window的判断,暂时解决这个问题

  • (void)interfaceOrientation:(UIInterfaceOrientation)orientation completion:(void(^ __nullable)(void))completion { ... if (fromOrientation == UIInterfaceOrientationPortrait || self.contentView.superview != self.landscapeViewController.view) { ... if (!self.window.isKeyWindow) { ... } if(toOrientation == UIInterfaceOrientationPortrait){ self.window.hidden = YES; } } else if (toOrientation == UIInterfaceOrientationPortrait) { ... } 试了下 我这不起作用

你用的是不是IJK, 我用 AVPlayer 就好了。

TDGYL commented 1 year ago

找到:ZFLandscapeRotationManager_iOS16 在68行之后添加一个隐藏window的判断,暂时解决这个问题

  • (void)interfaceOrientation:(UIInterfaceOrientation)orientation completion:(void(^ __nullable)(void))completion { ... if (fromOrientation == UIInterfaceOrientationPortrait || self.contentView.superview != self.landscapeViewController.view) { ... if (!self.window.isKeyWindow) { ... } if(toOrientation == UIInterfaceOrientationPortrait){ self.window.hidden = YES; } } else if (toOrientation == UIInterfaceOrientationPortrait) { ... } 试了下 我这不起作用

你用的是不是IJK, 我用 AVPlayer 就好了。

昨天调试的时候我发现设置视频的高度是210以下就不卡了 设置很大的值才卡 待会我试试只用av不用ijk看 之前我不用av是因为av遇到了一个问题 好像是退出stop之后还有声音 记不清了

TDGYL commented 1 year ago

好消息:我有一个项目没问题 12 pro max全屏没问题 坏消息:现在的新项目也卡死了 没找到问题在哪 也是12 pro max就有问题

确实是设置height是209时候 高度小才没问题 设置255时候就卡死了,希望可以提供一些排除点