Ver código fonte

录制时清除字幕

harry 3 anos atrás
pai
commit
65dcff98c3

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

@@ -747,6 +747,10 @@ public class BFRecordScreenController: BFBaseViewController {
         BFLog(message: "currTime is \(CMTimeGetSeconds(time))")
         if isRecording || !subtitleSettingView.subtitle.setting.subtitleIsShow || currentPlayRecordIndex == -3 {
             // currentPlayRecordIndex == -3 代表刚录完音,不要找字幕,会因为小幅度回退seek导致上一个字幕出现
+            if subtitleLabel.text?.count ?? 0 > 0 {
+                subtitleLabel.text = ""
+                subtitleLabel.backgroundColor = UIColor.clear
+            }
             return
         }