Selaa lähdekoodia

合成只保留时的字幕获取

harry 3 vuotta sitten
vanhempi
commit
490fb92b3b

+ 1 - 1
BFRecordScreenKit/Classes/BFRecordExport.swift

@@ -216,7 +216,7 @@ public class BFRecordExport {
                             voiceList.append(voice)
 
                             let titleModels = itemModel.titleStickers.filter { mod in
-                                mod.taskID == voiceSticker.titleTaskId
+                                mod.recordId == voiceSticker.recordId
                             }
                             
                             // 字幕的时间点是以相关录音的原点为坐标计算的。

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

@@ -1622,7 +1622,7 @@ public class BFRecordScreenController: BFBaseViewController {
             guard let sself = self else {
                 return
             }
-            BFLog(1, message: "判断是否开始录音播放** hadPrepareToPlayRecord:\(hadPrepareToPlayRecord), currentPlayRecordIndex:\(currentPlayRecordIndex), isNormalPlaying :\(sself.isNormalPlaying),\(recordPlayer?.currentItem?.duration.timescale ?? 0),\(CMTimeGetSeconds(currentT) >= recordedAudio.startCMTime.seconds),\(CMTimeGetSeconds(currentT) <= recordedAudio.endCMTime.seconds - 0.2)")
+//            BFLog(1, message: "判断是否开始录音播放** hadPrepareToPlayRecord:\(hadPrepareToPlayRecord), currentPlayRecordIndex:\(currentPlayRecordIndex), isNormalPlaying :\(sself.isNormalPlaying),\(recordPlayer?.currentItem?.duration.timescale ?? 0),\(CMTimeGetSeconds(currentT) >= recordedAudio.startCMTime.seconds),\(CMTimeGetSeconds(currentT) <= recordedAudio.endCMTime.seconds - 0.2)")
 
             if !hadPrepareToPlayRecord,
                CMTimeGetSeconds(currentT) >= (recordedAudio.startCMTime.seconds - 0.1),
@@ -1664,7 +1664,7 @@ public class BFRecordScreenController: BFBaseViewController {
             guard let sself = self, sself.isNormalPlaying else {
                 return
             }
-            BFLog(1, message: "判断是否开始录音播放** hadPrepareToPlayRecord:\(hadPrepareToPlayRecord), currentPlayRecordIndex:\(currentPlayRecordIndex), isNormalPlaying :\(sself.isNormalPlaying),\(recordPlayer?.currentItem?.duration.timescale ?? 0),\(CMTimeGetSeconds(currentT) >= recordedAudio.startCMTime.seconds),\(CMTimeGetSeconds(currentT) <= recordedAudio.endCMTime.seconds - 0.2)")
+//            BFLog(1, message: "判断是否开始录音播放** hadPrepareToPlayRecord:\(hadPrepareToPlayRecord), currentPlayRecordIndex:\(currentPlayRecordIndex), isNormalPlaying :\(sself.isNormalPlaying),\(recordPlayer?.currentItem?.duration.timescale ?? 0),\(CMTimeGetSeconds(currentT) >= recordedAudio.startCMTime.seconds),\(CMTimeGetSeconds(currentT) <= recordedAudio.endCMTime.seconds - 0.2)")
 
             if CMTimeGetSeconds(currentT) >= (recordedAudio.startCMTime.seconds - 0.1),
                CMTimeGetSeconds(currentT) <= recordedAudio.endCMTime.seconds // 这个条件是避免录音结束后有小幅度回退导致播放最新录音