清除无效代码
This commit is contained in:
parent
06e0b38c98
commit
f0528c6e7a
Binary file not shown.
@ -9,10 +9,6 @@ import Foundation
|
||||
import UIKit
|
||||
import AVKit
|
||||
|
||||
//专门用于assetoutput资源释放的 线程控制
|
||||
//let AssetGlobalQueue = DispatchQueue.global(qos: DispatchQoS.QoSClass.default)
|
||||
//let CustomPlayerShareSemaphore = DispatchSemaphore(value: 1)
|
||||
//let CustomPlayerShareRecursiveLock = NSRecursiveLock()
|
||||
|
||||
class ZZHCustomPlayer: UIView {
|
||||
|
||||
@ -28,17 +24,14 @@ class ZZHCustomPlayer: UIView {
|
||||
var assetReader:AVAssetReader?
|
||||
var assetOutput:AVAssetReaderTrackOutput? {
|
||||
didSet {
|
||||
// custominstruction?.assetOutput = assetOutput
|
||||
}
|
||||
}
|
||||
// var custominstruction:ZZHCustomVideoCompositionInstruction?
|
||||
|
||||
let videoTranserConvertor = PlayByTransferConvertor()
|
||||
var selectedIndex:SpatialType = .parallelEyes//记录当前选择的菜单选项
|
||||
{
|
||||
didSet{
|
||||
//进行相应解码操作,边解边播
|
||||
// custominstruction?.selectedIndex = selectedIndex
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,8 +46,6 @@ class ZZHCustomPlayer: UIView {
|
||||
var prePlayingState:Bool = true //标记 在滑块拖动前,player的播放状态,以便在拖动完毕之后回复播放状态
|
||||
let playerPauseBgColor:UIColor = UIColor(r: 20, g: 20, b: 20, a: 0.2)//暂停时的背景颜色
|
||||
|
||||
//线程锁
|
||||
// let lock = NSLock()
|
||||
|
||||
lazy var maskPlayerView:UIView? = {//播放按钮 背景
|
||||
let bgView = UIView()
|
||||
@ -114,7 +105,6 @@ class ZZHCustomPlayer: UIView {
|
||||
|
||||
avPlayerLayer = AVPlayerLayer(player: avPlayer)
|
||||
avPlayerLayer?.frame = CGRect(x: 0, y: 0, width: Int(playerWidth), height: playerHeight)
|
||||
// avPlayerLayer?.backgroundColor = UIColor.red.cgColor
|
||||
avPlayerLayer?.videoGravity = .resizeAspectFill
|
||||
playerLayerBgView!.layer.addSublayer(avPlayerLayer!)
|
||||
playerLayerBgView?.backgroundColor = UIColor.clear
|
||||
@ -140,7 +130,6 @@ class ZZHCustomPlayer: UIView {
|
||||
//通过slider进行seek播放时间点
|
||||
func manualToSeekPlay(value:Float,isMoving:Bool){
|
||||
if isMoving {
|
||||
// self.play(false)
|
||||
self.avPlayer?.pause()
|
||||
}
|
||||
|
||||
@ -159,7 +148,6 @@ class ZZHCustomPlayer: UIView {
|
||||
self.avPlayer?.seek(to: ct,toleranceBefore:.zero,toleranceAfter: .zero)
|
||||
if(!isMoving) {//结束拖动时,再进行播放
|
||||
self.play(true)
|
||||
// self.avPlayer?.play()
|
||||
self.playerIsSeeking = false
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user