清除无效代码

This commit is contained in:
bluesea 2024-04-22 15:41:14 +08:00
parent 06e0b38c98
commit f0528c6e7a
2 changed files with 0 additions and 12 deletions

View File

@ -9,10 +9,6 @@ import Foundation
import UIKit import UIKit
import AVKit import AVKit
//assetoutput 线
//let AssetGlobalQueue = DispatchQueue.global(qos: DispatchQoS.QoSClass.default)
//let CustomPlayerShareSemaphore = DispatchSemaphore(value: 1)
//let CustomPlayerShareRecursiveLock = NSRecursiveLock()
class ZZHCustomPlayer: UIView { class ZZHCustomPlayer: UIView {
@ -28,17 +24,14 @@ class ZZHCustomPlayer: UIView {
var assetReader:AVAssetReader? var assetReader:AVAssetReader?
var assetOutput:AVAssetReaderTrackOutput? { var assetOutput:AVAssetReaderTrackOutput? {
didSet { didSet {
// custominstruction?.assetOutput = assetOutput
} }
} }
// var custominstruction:ZZHCustomVideoCompositionInstruction?
let videoTranserConvertor = PlayByTransferConvertor() let videoTranserConvertor = PlayByTransferConvertor()
var selectedIndex:SpatialType = .parallelEyes// var selectedIndex:SpatialType = .parallelEyes//
{ {
didSet{ didSet{
// //
// custominstruction?.selectedIndex = selectedIndex
} }
} }
@ -53,8 +46,6 @@ class ZZHCustomPlayer: UIView {
var prePlayingState:Bool = true // ,player,便 var prePlayingState:Bool = true // ,player,便
let playerPauseBgColor:UIColor = UIColor(r: 20, g: 20, b: 20, a: 0.2)// let playerPauseBgColor:UIColor = UIColor(r: 20, g: 20, b: 20, a: 0.2)//
//线
// let lock = NSLock()
lazy var maskPlayerView:UIView? = {// lazy var maskPlayerView:UIView? = {//
let bgView = UIView() let bgView = UIView()
@ -114,7 +105,6 @@ class ZZHCustomPlayer: UIView {
avPlayerLayer = AVPlayerLayer(player: avPlayer) avPlayerLayer = AVPlayerLayer(player: avPlayer)
avPlayerLayer?.frame = CGRect(x: 0, y: 0, width: Int(playerWidth), height: playerHeight) avPlayerLayer?.frame = CGRect(x: 0, y: 0, width: Int(playerWidth), height: playerHeight)
// avPlayerLayer?.backgroundColor = UIColor.red.cgColor
avPlayerLayer?.videoGravity = .resizeAspectFill avPlayerLayer?.videoGravity = .resizeAspectFill
playerLayerBgView!.layer.addSublayer(avPlayerLayer!) playerLayerBgView!.layer.addSublayer(avPlayerLayer!)
playerLayerBgView?.backgroundColor = UIColor.clear playerLayerBgView?.backgroundColor = UIColor.clear
@ -140,7 +130,6 @@ class ZZHCustomPlayer: UIView {
//sliderseek //sliderseek
func manualToSeekPlay(value:Float,isMoving:Bool){ func manualToSeekPlay(value:Float,isMoving:Bool){
if isMoving { if isMoving {
// self.play(false)
self.avPlayer?.pause() self.avPlayer?.pause()
} }
@ -159,7 +148,6 @@ class ZZHCustomPlayer: UIView {
self.avPlayer?.seek(to: ct,toleranceBefore:.zero,toleranceAfter: .zero) self.avPlayer?.seek(to: ct,toleranceBefore:.zero,toleranceAfter: .zero)
if(!isMoving) {//, if(!isMoving) {//,
self.play(true) self.play(true)
// self.avPlayer?.play()
self.playerIsSeeking = false self.playerIsSeeking = false
} }