|
@@ -47,7 +47,9 @@ class INVideoExportController: BFBaseViewController {
|
|
|
avplayerTimeObserver = avplayer.addPeriodicTimeObserver(forInterval: CMTime(value: 1, timescale: 100), queue: DispatchQueue.global()) {[weak self, weak avplayer] time in
|
|
|
// 进度监控
|
|
|
if let item = avplayer?.currentItem {
|
|
|
- self?.progreddL.text = String(format: "%.2f / %.2f", CMTimeGetSeconds(time), CMTimeGetSeconds(item.duration))
|
|
|
+ DispatchQueue.main.async { [weak self] in
|
|
|
+ self?.progreddL.text = String(format: "%.2f / %.2f", CMTimeGetSeconds(time), CMTimeGetSeconds(item.duration))
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
} as? NSKeyValueObservation
|