chore: lint project (#3395)
* chore: format swift code * chore: format clang code * chore: format kotlin code * refactor: rename folder "API" to "api"
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
import AVKit
|
||||
|
||||
class RCTVideoPlayerViewController: AVPlayerViewController {
|
||||
|
||||
weak var rctDelegate: RCTVideoPlayerViewControllerDelegate?
|
||||
|
||||
// Optional paramters
|
||||
var preferredOrientation:String?
|
||||
var autorotate:Bool?
|
||||
var preferredOrientation: String?
|
||||
var autorotate: Bool?
|
||||
|
||||
func shouldAutorotate() -> Bool {
|
||||
|
||||
if autorotate! || preferredOrientation == nil || (preferredOrientation!.lowercased() == "all") {
|
||||
return true
|
||||
}
|
||||
@@ -26,21 +24,21 @@ class RCTVideoPlayerViewController: AVPlayerViewController {
|
||||
|
||||
#if !os(tvOS)
|
||||
|
||||
func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
|
||||
return .all
|
||||
}
|
||||
|
||||
func preferredInterfaceOrientationForPresentation() -> UIInterfaceOrientation {
|
||||
if preferredOrientation?.lowercased() == "landscape" {
|
||||
return .landscapeRight
|
||||
} else if preferredOrientation?.lowercased() == "portrait" {
|
||||
return .portrait
|
||||
} else {
|
||||
// default case
|
||||
let orientation = UIApplication.shared.statusBarOrientation
|
||||
return orientation
|
||||
func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
|
||||
return .all
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func preferredInterfaceOrientationForPresentation() -> UIInterfaceOrientation {
|
||||
if preferredOrientation?.lowercased() == "landscape" {
|
||||
return .landscapeRight
|
||||
} else if preferredOrientation?.lowercased() == "portrait" {
|
||||
return .portrait
|
||||
} else {
|
||||
// default case
|
||||
let orientation = UIApplication.shared.statusBarOrientation
|
||||
return orientation
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user