diff --git a/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/ZZHCustomPlayer.swift b/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/ZZHCustomPlayer.swift index d93de53..31e85cf 100644 --- a/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/ZZHCustomPlayer.swift +++ b/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/ZZHCustomPlayer.swift @@ -156,14 +156,14 @@ class ZZHCustomPlayer: UIView { // avPlayer?.allowsExternalPlayback = true // avPlayer?.usesExternalPlaybackWhileExternalScreenIsActive = true // avPlayer?.externalPlaybackVideoGravity = .resizeAspect - +// avPlayer. avPlayer?.addPeriodicTimeObserver(forInterval: CMTime(value: 1, timescale: self.avPlayer?.currentItem?.duration.timescale ?? 600), queue: DispatchQueue.main, using: {[weak self] ct in self?.updateSliderUI(ct: ct) }) avPlayerLayer = AVPlayerLayer(player: avPlayer) avPlayerLayer?.frame = CGRect(x: 0, y: 0, width: Int(playerWidth), height: playerHeight) - avPlayerLayer?.videoGravity = .resize + avPlayerLayer?.videoGravity = .resizeAspect playerLayerBgView!.layer.addSublayer(avPlayerLayer!) // playerLayerBgView?.backgroundColor = UIColor.red // self.backgroundColor = .orange