BMPlayer icon indicating copy to clipboard operation
BMPlayer copied to clipboard

Ios 16.0 cannot play in full screen

Open xipeng5 opened this issue 3 years ago • 4 comments

Ios 16.0 cannot play in full screen

2022-11-08 22:47:22.019162+0800 BMPlayer_Example[13285:5049044] [Orientation] BUG IN CLIENT OF UIKIT: Setting UIDevice.orientation is not supported. Please use UIWindowScene.requestGeometryUpdate(_:) 2022-11-08 22:47:22.019482+0800 BMPlayer_Example[13285:5049044] [Assert] -[UIApplication setStatusBarOrientation:] and -[UIApplication setStatusBarOrientation:animated:] API have been deprecated on iOS 8.0 and are no-ops on iOS 13.0

xipeng5 avatar Nov 08 '22 14:11 xipeng5

Just update the Pod/SPM and it will work

MahipalAppentus avatar Nov 10 '22 09:11 MahipalAppentus

Hello, I'm having the same problem. It is work now? @xipeng5

azisramdhan avatar Nov 29 '22 06:11 azisramdhan

Please update the function fullScreenButtonPressed() in BMPlayer file in pod @objc fileprivate func fullScreenButtonPressed() { controlView.updateUI(!self.isFullScreen) if isFullScreen { if #available(iOS 16.0, *) { let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene windowScene?.requestGeometryUpdate(.iOS(interfaceOrientations: UIInterfaceOrientationMask.portrait)) } else { UIDevice.current.setValue(UIInterfaceOrientation.portrait.rawValue, forKey: "orientation") } UIApplication.shared.setStatusBarHidden(false, with: .fade) UIApplication.shared.statusBarOrientation = .portrait } else { if #available(iOS 16.0, *) { let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene windowScene?.requestGeometryUpdate(.iOS(interfaceOrientations: UIInterfaceOrientationMask.landscapeRight)) } else { UIDevice.current.setValue(UIInterfaceOrientation.landscapeRight.rawValue, forKey: "orientation") } UIApplication.shared.setStatusBarHidden(false, with: .fade) UIApplication.shared.statusBarOrientation = .landscapeRight } }

or else if you get any callback we can use the above code in the view controller. 

sachinhunasnale avatar Feb 02 '24 11:02 sachinhunasnale