mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-19 23:52:09 +00:00
as
This commit is contained in:
parent
94264a142c
commit
fa57127371
3 changed files with 11 additions and 3 deletions
Binary file not shown.
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue