| | |
| | | import AVFoundation |
| | | import SnapKit |
| | | import UIKit |
| | | import JQTools |
| | | |
| | | extension CLPlayerView { |
| | | enum CLWaitReadyToPlayState { |
| | |
| | | if config.rotateStyle == .small, isFullScreen { return } |
| | | if config.rotateStyle == .fullScreen, !isFullScreen { return } |
| | | |
| | | switch UIDevice.current.orientation { |
| | | case .portrait: |
| | | dismiss() |
| | | case .landscapeLeft: |
| | | presentWithOrientation(.left) |
| | | case .landscapeRight: |
| | | presentWithOrientation(.right) |
| | | default: |
| | | break |
| | | if let vc = JQ_currentViewController() as? CourseVC,vc.pageViewController.currentPage == 1{ |
| | | switch UIDevice.current.orientation { |
| | | case .portrait: |
| | | dismiss() |
| | | case .landscapeLeft: |
| | | presentWithOrientation(.left) |
| | | case .landscapeRight: |
| | | presentWithOrientation(.right) |
| | | default: |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |