清除不需要的代码
This commit is contained in:
parent
9c3ec43bb4
commit
06e0b38c98
Binary file not shown.
@ -515,8 +515,8 @@
|
||||
filePath = "SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "340"
|
||||
endingLineNumber = "340"
|
||||
startingLineNumber = "280"
|
||||
endingLineNumber = "280"
|
||||
landmarkName = "notification_didActiveNotification(notification:)"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
|
||||
@ -93,13 +93,7 @@ class CCSpatialVideoDisplayController: BaseController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// let videoTranserConvertor = PlayByTransferConvertor()
|
||||
|
||||
// lazy var videoOriginalAsset:AVAsset = {
|
||||
// let asset = AVAsset(url: sourceVideoURL!)
|
||||
// return asset
|
||||
// }()
|
||||
|
||||
|
||||
var videoOriginalPHAsset:PHAsset?
|
||||
|
||||
@ -107,9 +101,7 @@ class CCSpatialVideoDisplayController: BaseController {
|
||||
var sourceVideoURL:URL?
|
||||
var imgData:Data?
|
||||
|
||||
// var player:AVPlayer?
|
||||
// var needRestReaderTimeRange = false//标识是否需呀重置时间读取范围
|
||||
// var playerController:AVPlayerViewController?
|
||||
|
||||
var customPlayer:ZZHCustomPlayer = {
|
||||
let cp = ZZHCustomPlayer(frame: .zero)
|
||||
return cp
|
||||
@ -222,65 +214,17 @@ class CCSpatialVideoDisplayController: BaseController {
|
||||
}()
|
||||
|
||||
|
||||
//监听播放完毕
|
||||
// @objc func notification_PlayerEndTime(notification:Notification){
|
||||
// print("PlayerEndTime....")
|
||||
// player?.seek(to: .zero)
|
||||
// player?.play()
|
||||
|
||||
|
||||
// }
|
||||
|
||||
//监听拖动播放的进度事件
|
||||
// @objc func notification_PlayerTimeJump(notification:Notification){
|
||||
//// needRestReaderTimeRange = true
|
||||
//
|
||||
// print("time jump....")
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
configureUI()
|
||||
ZZHHelper.setNowTimeToUserDefaultWithKey(kNowTimeToUserDefaultKey_VideoDisplayController)
|
||||
// Task {
|
||||
// print("ccs viewdid load ---------")
|
||||
// await self.loadVideoAssetReader()
|
||||
// DispatchQueue.main.asyncAfter(deadline: .now()+0.01) {[weak self] in
|
||||
// self?.setUPPlayer()
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// }
|
||||
// }
|
||||
self.customPlayer.setUPPlayer()
|
||||
// 检查当前是否已连接到 AirPlay 设备
|
||||
self.checkAirPlayStatus()
|
||||
}
|
||||
|
||||
// func setUPPlayer(){
|
||||
// print("getPlayerItem ========")
|
||||
// player = AVPlayer()
|
||||
// player?.allowsExternalPlayback = true
|
||||
// player?.usesExternalPlaybackWhileExternalScreenIsActive = true
|
||||
//
|
||||
// print("getPlayerItem >>>>>>>")
|
||||
//
|
||||
// playerController = AVPlayerViewController()
|
||||
// playerController?.player = player
|
||||
// playerController!.view.backgroundColor = .clear
|
||||
// playerController?.view.frame = CGRect.init(x: 0, y: 170, width: self.view.frame.size.width, height: 400)
|
||||
//
|
||||
// self.addChild(playerController!)
|
||||
// self.view.addSubview(playerController!.view)
|
||||
//
|
||||
// self.maskLabel.frame = playerController!.view.frame
|
||||
// self.view.addSubview(self.maskLabel)
|
||||
// }
|
||||
|
||||
|
||||
|
||||
func configureUI(){
|
||||
self.view.backgroundColor = UIColor(hexString: "#060507")
|
||||
|
||||
@ -319,10 +263,6 @@ class CCSpatialVideoDisplayController: BaseController {
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(exScreenDisConnectNotification(notification:)), name: UIScene.didDisconnectNotification, object: nil)
|
||||
|
||||
|
||||
|
||||
|
||||
// NotificationCenter.default.addObserver(self, selector: #selector(notification_PlayerEndTime(notification:)), name: AVPlayerItem.didPlayToEndTimeNotification, object: nil)
|
||||
// NotificationCenter.default.addObserver(self, selector: #selector(notification_PlayerTimeJump(notification:)), name: AVPlayerItem.timeJumpedNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(notificatin_failedToPlayToEndTimeNotification(notifiation: )), name: AVPlayerItem.failedToPlayToEndTimeNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(notificatin_failedToPlayToEndTimeNotification(notifiation: )), name: AVPlayerItem.newErrorLogEntryNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(notification_didEnterBackgroundNotification(notification: )), name: UIApplication.didEnterBackgroundNotification, object: nil)
|
||||
@ -359,7 +299,6 @@ class CCSpatialVideoDisplayController: BaseController {
|
||||
if externalVC != nil {
|
||||
externalVC?.playerLayer?.player = nil
|
||||
}
|
||||
// player?.pause()
|
||||
customPlayer.play(false)
|
||||
releaseVideoComposition()
|
||||
|
||||
@ -440,9 +379,7 @@ class CCSpatialVideoDisplayController: BaseController {
|
||||
|
||||
link = true
|
||||
isPlaying = true
|
||||
print("外接屏幕已连接.....")
|
||||
// activeSession()
|
||||
|
||||
print("外接屏幕已连接.....")
|
||||
UIApplication.shared.connectedScenes.forEach { us in
|
||||
print("uisence:\(us)\n")
|
||||
let ws = us as! UIWindowScene
|
||||
|
||||
Loading…
Reference in New Issue
Block a user