Browse Source

导出时禁止播放

harry 3 years ago
parent
commit
ddcfb78e6e
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Introduce/Record/INVideoExportController.swift

+ 6 - 0
Introduce/Record/INVideoExportController.swift

@@ -24,6 +24,7 @@ class INVideoExportController: BFBaseViewController {
     var hasSaveOnly = false
     var saveAllUlr = URL(fileURLWithPath: "aaa")
     var saveOnlyUlr = URL(fileURLWithPath: "aaa")
+    var isExporting = false
     
     // 播放进度
     lazy var progreddL : UILabel = {
@@ -129,6 +130,7 @@ class INVideoExportController: BFBaseViewController {
                 guard let sself = self else {
                     return
                 }
+                self?.isExporting = false
                 sself.bottomView.isHidden = false
                 sself.progreddL.isHidden = false
                 sself.progressView.isHidden = true
@@ -338,6 +340,10 @@ class INVideoExportController: BFBaseViewController {
     }
     
     @objc func play(){
+        if isExporting {
+            self.avplayer.pause()
+            return
+        }
         if self.avplayer.currentItem != nil {
             if self.avplayer.timeControlStatus == .playing {
                 self.avplayer.pause()