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:
Krzysztof Moch
2023-12-07 08:47:40 +01:00
committed by GitHub
parent 72679a7d63
commit 800aee09de
43 changed files with 1407 additions and 1364 deletions

View File

@@ -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
}