LWPlayerFullScreenViewController.swift 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // LWPlayerFullScreenViewController.swift
  3. // SwiftBilibili
  4. //
  5. // Created by 罗文 on 2021/3/29.
  6. // Copyright © 2021年 罗文. All rights reserved.
  7. //
  8. import UIKit
  9. class LWPlayerFullScreenViewController: UIViewController {
  10. weak var player: LWPlayer!
  11. var preferredlandscapeForPresentation = UIInterfaceOrientation.landscapeLeft
  12. var currentOrientation = UIDevice.current.orientation
  13. private var statusBarHiddenAnimated = true
  14. lazy var statusbarBackgroundView : UIView = {
  15. let view = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds.width, height: UIApplication.shared.statusBarFrame.height))
  16. view.backgroundColor = player.fullScreenStatusbarBackgroundColor
  17. view.autoresizingMask = [ .flexibleWidth,.flexibleLeftMargin,.flexibleRightMargin,.flexibleBottomMargin]
  18. return view
  19. }()
  20. override func viewDidLoad() {
  21. super.viewDidLoad()
  22. // NotificationCenter.default.addObserver(self, selector: <#T##Selector#>, name: <#T##NSNotification.Name?#>, object: <#T##Any?#>)
  23. }
  24. @objc func playerControlsHiddenDidChange(_ notifiaction: Notification) {
  25. // self.statusBarHiddenAnimated = notifiaction.userInfo?[Notification.Key.EZPlayerControlsHiddenDidChangeByAnimatedKey] as? Bool ?? true
  26. // self.setNeedsStatusBarAppearanceUpdate()
  27. // if #available(iOS 11.0, *) {
  28. // self.setNeedsUpdateOfHomeIndicatorAutoHidden()
  29. // }
  30. }
  31. }