diff --git a/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift b/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift index d7e130a..b1dc38a 100644 --- a/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift +++ b/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift @@ -246,8 +246,6 @@ class CCSpatialVideoDisplayController: BaseController { override func viewDidLoad() { super.viewDidLoad() ZZHHelper.setNowTimeToUserDefaultWithKey(kNowTimeToUserDefaultKey_VideoDisplayController) - - Task { print("ccs viewdid load ---------") await self.loadVideoAssetReader() @@ -256,34 +254,9 @@ class CCSpatialVideoDisplayController: BaseController { // 检查当前是否已连接到 AirPlay 设备 self.checkAirPlayStatus() } -// DispatchQueue.main.async { -// -// } } } -// override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { -// print("播放状态\(keyPath)改变...\(change).") -// if(keyPath == "status"){ -// guard let ce = change else { -// return -// } -// -// let newVa = ce[NSKeyValueChangeKey.kindKey] as? Int -// -// if newVa != nil { -// if AVPlayer.Status(rawValue: newVa!) == .readyToPlay { -// DispatchQueue.main.async {[weak self] in -// print(">>>>>>bo fang....") -// self?.player?.play() -// } -// } -// } -// -// -// -// } -// } func configureInfo(){ @@ -291,7 +264,6 @@ class CCSpatialVideoDisplayController: BaseController { player = AVPlayer() player?.allowsExternalPlayback = true player?.usesExternalPlaybackWhileExternalScreenIsActive = true -// player?.addObserver(self, forKeyPath: "status", context: nil) print("getPlayerItem >>>>>>>") self.view.backgroundColor = UIColor(hexString: "#060507") diff --git a/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayForVideoTask.swift b/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayForVideoTask.swift index dc5c1e9..dab6566 100644 --- a/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayForVideoTask.swift +++ b/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayForVideoTask.swift @@ -115,13 +115,9 @@ extension CCSpatialVideoDisplayController { do { if self.assetTrack == nil { assetTrack = try await self.videoOriginalAsset.loadTracks(withMediaType: .video).first! -// print("等待loading tracks。。。。。") } -// let timeRange = CMTimeRange(start: .zero, duration: .positiveInfinity) -// print("加载完毕loading tracks。。。。。") let timeRange = CMTimeRange(start: .zero, duration: CMTime(value: 1, timescale: 1)) DispatchQueue.main.async { -// print("进入主线程loading tracks。。。。。") self.quickLoadAReader(timeRange: timeRange) } @@ -161,8 +157,5 @@ extension CCSpatialVideoDisplayController { print("资产加载完毕。。。。开始播放player\n err:\(self.player?.error)") } - - - } }