Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ios 16.0 cannot play in full screen #354

Open
xipeng5 opened this issue Nov 8, 2022 · 4 comments
Open

Ios 16.0 cannot play in full screen #354

xipeng5 opened this issue Nov 8, 2022 · 4 comments

Comments

@xipeng5
Copy link

xipeng5 commented Nov 8, 2022

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

@MahipalAppentus
Copy link

Just update the Pod/SPM and it will work

@azisramdhan
Copy link

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

@sachinhunasnale
Copy link

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. 

@shengrenjin
Copy link

why is the 1.3.2 code still like this:

@objc fileprivate func fullScreenButtonPressed() {
controlView.updateUI(!self.isFullScreen)
if isFullScreen {
UIDevice.current.setValue(UIInterfaceOrientation.portrait.rawValue, forKey: "orientation")
UIApplication.shared.setStatusBarHidden(false, with: .fade)
UIApplication.shared.statusBarOrientation = .portrait
} else {
UIDevice.current.setValue(UIInterfaceOrientation.landscapeRight.rawValue, forKey: "orientation")
UIApplication.shared.setStatusBarHidden(false, with: .fade)
UIApplication.shared.statusBarOrientation = .landscapeRight
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants