Browse Source

删除视频的回退增加绘制

harry 3 năm trước cách đây
mục cha
commit
d64d24a61e

+ 2 - 2
BFRecordScreenKit/Classes/BFVideoThumbProgressStrategy.swift

@@ -19,9 +19,9 @@ class BFVideoThumbProgressStrategy: BFVideoThumbProgressStrategyProtocol {
 
         if assetDuration > 0, assetDuration <= 10 {
             count = 5
-        } else if assetDuration >= 10, assetDuration <= 60 {
+        } else if assetDuration > 10, assetDuration <= 60 {
             count = 10
-        } else if assetDuration >= 60, assetDuration <= 300 {
+        } else if assetDuration > 60, assetDuration <= 300 {
             count = 20
         } else if assetDuration > 300 {
             count = 50

+ 1 - 1
BFRecordScreenKit/Classes/BFVoiceRecordManager.swift

@@ -106,7 +106,7 @@ extension BFVoiceRecordManager: BFRecorderManagerDelegate {
             }
             
         } else {
-            cShowHUB(superView: nil, msg: "说话时间太短")
+            cShowHUB(superView: nil, msg: "最短录制1秒")
             cancelRecordHandle?(voiceModel)
         }
     }

+ 4 - 2
BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

@@ -916,7 +916,7 @@ public class BFRecordScreenController: BFBaseViewController {
         self.collectionView.isScrollEnabled = true
 
         recorderManager?.stopRecord(isCancel: false)
-        
+        changeWithDrawBtnLayout(true)
         if !avatarView.isHidden {
             avatarView.endRecord()
         }
@@ -968,7 +968,7 @@ public class BFRecordScreenController: BFBaseViewController {
                     }
                 }
             } else if action.type == 3 {
-                // 删除录音
+                // 恢复删除录音
                 var tuples = action.deletedVoices
                 if tuples != nil, tuples!.count > 0 {
                     tuples!.sort { tuple1, tuple2 in
@@ -989,6 +989,7 @@ public class BFRecordScreenController: BFBaseViewController {
                 if itemModels[currItemModelIndex].mediaType == .IMAGE {
                     itemModels[currItemModelIndex].materialDuraion = itemModels[currItemModelIndex].voiceStickers.last?.endTime ?? 0
                 }
+                
             } else {}
             events.removeLast()
             
@@ -1009,6 +1010,7 @@ public class BFRecordScreenController: BFBaseViewController {
                 changeWithDrawBtnLayout(false)
             }
             searchStopAtRecordRange()
+            indirectionView?.resetAllSubViews(items: itemModels[currItemModelIndex].voiceStickers, totalDuration: itemModels[currItemModelIndex].materialDuraion)
         }
     }