jsonwang 3 anni fa
parent
commit
a7006cccea
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  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