This commit is contained in:
cranci1 2024-12-24 15:47:36 +01:00
parent 94264a142c
commit fa57127371
3 changed files with 11 additions and 3 deletions

View file

@ -18,13 +18,21 @@ class NormalPlayer: AVPlayerViewController {
}
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
if UserDefaults.standard.bool(forKey: "alwaysLandscape") {
if UserDefaults.standard.bool(forKey: "AlwaysLandscape") {
return .landscape
} else {
return .all
}
}
override var prefersHomeIndicatorAutoHidden: Bool {
return true
}
override var prefersStatusBarHidden: Bool {
return true
}
private func setupHoldGesture() {
holdGesture = UILongPressGestureRecognizer(target: self, action: #selector(handleHoldGesture(_:)))
holdGesture?.minimumPressDuration = 0.5

View file

@ -9,12 +9,12 @@ import SwiftUI
struct SettingsPlayerView: View {
@AppStorage("externalPlayer") private var externalPlayer: String = "Default"
@AppStorage("alwaysLandscape") private var isAlwaysLandscape = false
@AppStorage("AlwaysLandscape") private var isAlwaysLandscape = false
@AppStorage("holdSpeedPlayer") private var holdSpeedPlayer: Double = 2.0
var body: some View {
Form {
Section(header: Text("Player"), footer: Text("The ForceLandscape and HoldSpeed only work inside the default iOS player and custom player.")) {
Section(header: Text("Player"), footer: Text("The Force Landscape and HoldSpeed only work inside the default iOS player and custom player.")) {
HStack {
Text("Media Player")
Spacer()