jsonwang %!s(int64=3) %!d(string=hai) anos
pai
achega
a7006cccea
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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