This commit is contained in:
PangMo5 2021-07-24 21:49:27 +09:00
parent d3580ced48
commit f0107ae7ef
3 changed files with 217 additions and 196 deletions

View File

@ -34,7 +34,7 @@ struct ItemView: View {
.statusBar(hidden: true)
.edgesIgnoringSafeArea(.all)
.prefersHomeIndicatorAutoHidden(true)
}.supportedOrientations(.landscape), isActive: $videoPlayerItem.shouldShowPlayer) {
}, isActive: $videoPlayerItem.shouldShowPlayer) {
EmptyView()
}
VStack {
@ -56,7 +56,6 @@ struct ItemView: View {
.navigationBarHidden(false)
.navigationBarBackButtonHidden(false)
.environmentObject(videoPlayerItem)
.supportedOrientations(.all)
}
}
}

View File

@ -209,6 +209,8 @@ class EmailHelper: NSObject, MFMailComposeViewControllerDelegate {
@main
struct JellyfinPlayerApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
let persistenceController = PersistenceController.shared
var body: some Scene {
@ -224,3 +226,12 @@ struct JellyfinPlayerApp: App {
}
}
}
class AppDelegate: NSObject, UIApplicationDelegate {
static var orientationLock = UIInterfaceOrientationMask.all
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
AppDelegate.orientationLock
}
}

File diff suppressed because it is too large Load Diff