|
@@ -731,9 +731,11 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
if !SWNetRequest.isNetReachabled() {
|
|
|
cShowHUB(superView: view, msg: "网络不佳,字幕可能无法生成")
|
|
|
}
|
|
|
-
|
|
|
- view.addSubview(neoNuiDebugLabel)
|
|
|
- view.addSubview(audioQueueRecoderLabel)
|
|
|
+ if(PQENVUtil.shared.channel == "Development"){
|
|
|
+ view.addSubview(neoNuiDebugLabel)
|
|
|
+ view.addSubview(audioQueueRecoderLabel)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@objc func editSubtitle() {
|
|
@@ -1244,17 +1246,22 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
} else {
|
|
|
tuples?.forEach { tuple in
|
|
|
itemModels[currItemModelIndex].voiceStickers.insert(tuple.0, at: tuple.1)
|
|
|
- let currDuration = tuple.0.endCMTime.seconds - tuple.0.startCMTime.seconds
|
|
|
- itemModels[currItemModelIndex].materialDuraion = itemModels[currItemModelIndex].materialDuraion + currDuration
|
|
|
+ let currDuration = tuple.0.endCMTime - tuple.0.startCMTime
|
|
|
+ itemModels[currItemModelIndex].materialDuraion = itemModels[currItemModelIndex].materialDuraion + currDuration.seconds
|
|
|
for (index, item) in itemModels[currItemModelIndex].voiceStickers.enumerated() {
|
|
|
if index > tuple.1 {
|
|
|
- // 注:开始时间减去duration or 等一前一段录音的结束时间
|
|
|
-// item.startCMTime.seconds -= currDuration
|
|
|
-// item.endCMTime.seconds -= currDuration
|
|
|
- let startTime = item.startCMTime.seconds
|
|
|
- let endTime = item.endCMTime.seconds
|
|
|
- item.startCMTime = CMTime(seconds: startTime + currDuration, preferredTimescale: 1000)
|
|
|
- item.endCMTime = CMTime(seconds: endTime + currDuration, preferredTimescale: 1000)
|
|
|
+ // 注:之后的录音和字幕增加对应的时长
|
|
|
+ item.startCMTime = item.startCMTime + currDuration
|
|
|
+ item.endCMTime = item.endCMTime + currDuration
|
|
|
+
|
|
|
+ let titlsList = itemModels[currItemModelIndex].titleStickers.filter({ tm in
|
|
|
+ tm.taskID == item.titleTaskId
|
|
|
+ })
|
|
|
+
|
|
|
+ for titleM in titlsList {
|
|
|
+ titleM.timelineIn = titleM.timelineIn + currDuration
|
|
|
+ titleM.timelineOut = titleM.timelineOut + currDuration
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|