瀏覽代碼

回到主线

jsonwang 3 年之前
父節點
當前提交
a7006cccea
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Introduce/Record/INVideoExportController.swift

+ 3 - 1
Introduce/Record/INVideoExportController.swift

@@ -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