mirror of
https://github.com/yattee/yattee.git
synced 2025-11-12 21:28:42 +00:00
simplified fullscreen and orientation handling
- iPad: rotate to device orientation on startup - fixed controls in portrait fullscreen - iOS: don’t call setNeedsDrawing multiple times - On iOS we call set needs drawing only once. - Added cooldown time to MPV.Client setNeedsDrawing to avoid multiple successive calls - make fullscreen animation smoother - dragGesture now calls toggleFullScreenAction - fix tvOS and macOS build Signed-off-by: Toni Förster <toni.foerster@gmail.com>
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
import AVFoundation
|
||||
import Defaults
|
||||
import Foundation
|
||||
import Logging
|
||||
import UIKit
|
||||
|
||||
final class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
var orientationLock = UIInterfaceOrientationMask.all
|
||||
var orientationLock = UIInterfaceOrientationMask.allButUpsideDown
|
||||
|
||||
private var logger = Logger(label: "stream.yattee.app.delegalate")
|
||||
private var logger = Logger(label: "stream.yattee.app.delegate")
|
||||
private(set) static var instance: AppDelegate!
|
||||
|
||||
func application(_: UIApplication, supportedInterfaceOrientationsFor _: UIWindow?) -> UIInterfaceOrientationMask {
|
||||
orientationLock
|
||||
return orientationLock
|
||||
}
|
||||
|
||||
func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { // swiftlint:disable:this discouraged_optional_collection
|
||||
@@ -19,6 +20,7 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
#if !os(macOS)
|
||||
UIViewController.swizzleHomeIndicatorProperty()
|
||||
OrientationTracker.shared.startDeviceOrientationTracking()
|
||||
OrientationModel.shared.startOrientationUpdates()
|
||||
|
||||
// Configure the audio session for playback
|
||||
do {
|
||||
|
||||
Reference in New Issue
Block a user