Lock orientation button

This commit is contained in:
Arkadiusz Fal
2022-07-11 01:26:35 +02:00
parent 5bfc1a3206
commit fc175be76b
3 changed files with 41 additions and 10 deletions

View File

@@ -93,6 +93,10 @@ final class PlayerModel: ObservableObject {
backend.setNeedsNetworkStateUpdates(true)
}}
#if os(iOS)
@Published var lockedOrientation: UIInterfaceOrientationMask?
#endif
var accounts: AccountsModel
var comments: CommentsModel
var controls: PlayerControlsModel { didSet {
@@ -717,7 +721,7 @@ final class PlayerModel: ObservableObject {
#if os(iOS)
if !playingFullScreen {
Orientation.lockOrientation(.allButUpsideDown, andRotateTo: .portrait)
Orientation.lockOrientation(.allButUpsideDown)
}
#endif
}