胡志强 3 éve
szülő
commit
77bbae8fca

+ 11 - 7
BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

@@ -1156,10 +1156,10 @@ public class BFRecordScreenController: BFBaseViewController {
                 // 录制结束回调给主工程页面(埋点之类功能)
                 wself.recordEndHandle?(model)
 
-                if wself.currMediaType != .Video {
+                if wself.currMediaType != .Video,  CMTimeCompare(model.endCMTime, wself.itemModels[wself.currItemModelIndex].materialDuraion) == 0{
                     wself.isEndPlay = true
                 }
-                
+//
                 DispatchQueue.main.async { [weak self] in
                     guard let wself = self else { return }
 
@@ -1591,7 +1591,10 @@ public class BFRecordScreenController: BFBaseViewController {
             recorderManager?.cancelTitleService()
         }
         
-        events.removeLast()
+        if currMediaType != .Camera{
+            events.removeLast()
+        }
+        
         // 删除文件
         recorderManager?.deleteFile(outfile: voiceModel?.wavFilePath ?? "")
         var subtitleCount = itemModels[currItemModelIndex].titleStickers.count
@@ -1875,6 +1878,7 @@ public class BFRecordScreenController: BFBaseViewController {
                 changeWithDrawBtnLayout(event.type)
             } else {
                 changeWithDrawBtnLayout(0)
+                withDrawBtn.isEnabled = false
             }
             searchStopAtRecordRange()
             let itemModel = itemModels[currItemModelIndex]
@@ -2398,9 +2402,9 @@ public class BFRecordScreenController: BFBaseViewController {
             withDrawBtn.setTitle("record_recover".BFLocale, for: .normal)
         case 2:
             withDrawBtn.setTitle("record_undo".BFLocale, for: .normal)
-        case 0:
-            withDrawBtn.isEnabled = false
-            fallthrough
+//        case 0:
+//            withDrawBtn.isEnabled = false
+//            fallthrough
         default:
             withDrawBtn.setTitle("record_back".BFLocale, for: .normal)
         }
@@ -2662,7 +2666,7 @@ extension BFRecordScreenController: UICollectionViewDelegate, UICollectionViewDa
                 guard let wself = self else { return }
 
                 /// 重绘录音进度视图
-//                wself.resetAllIndirectionView()
+                wself.resetAllIndirectionView()
                 // 重绘录音进度
                 wself.recordBtn.isEnabled = true
                 wself.searchStopAtRecordRange()