|
@@ -618,11 +618,24 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
// 字幕设置回调
|
|
// 字幕设置回调
|
|
subtitleSettingView.subtitleSettingCallBack = { [weak self] subtitileModel in
|
|
subtitleSettingView.subtitleSettingCallBack = { [weak self] subtitileModel in
|
|
|
|
|
|
- self?.setSubtitleStyle(settingModel: subtitileModel.setting)
|
|
|
|
- // mdf by ak 这里是设置字幕开关回调
|
|
|
|
- if self?.subTitleBtnClickHandle != nil {
|
|
|
|
- self?.subTitleBtnClickHandle!(subtitileModel.setting.subtitleIsShow)
|
|
|
|
|
|
+ if let wself = self{
|
|
|
|
+
|
|
|
|
+ //1,设置字幕样式
|
|
|
|
+ wself.setSubtitleStyle(settingModel: subtitileModel.setting)
|
|
|
|
+
|
|
|
|
+ //2,显示设置文字,不显示设置为空
|
|
|
|
+ if(subtitileModel.setting.subtitleIsShow){
|
|
|
|
+ wself.updateSubtitle(time: wself.currentAssetProgress)
|
|
|
|
+ }else{
|
|
|
|
+ wself.subtitleLabel.text = ""
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // mdf by ak 这里是设置字幕开关回调
|
|
|
|
+ if wself.subTitleBtnClickHandle != nil {
|
|
|
|
+ wself.subTitleBtnClickHandle!(subtitileModel.setting.subtitleIsShow)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
// 编辑字幕完成
|
|
// 编辑字幕完成
|
|
subtitleEditView.editSubtitleDone = { [weak self] newtext, index in
|
|
subtitleEditView.editSubtitleDone = { [weak self] newtext, index in
|
|
@@ -633,6 +646,7 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
// 删除数据
|
|
// 删除数据
|
|
BFLog(message: "清空字幕操作要删除原字幕 sticker 数据")
|
|
BFLog(message: "清空字幕操作要删除原字幕 sticker 数据")
|
|
self?.itemModels[self?.currItemModelIndex ?? 0].titleStickers.remove(at: index)
|
|
self?.itemModels[self?.currItemModelIndex ?? 0].titleStickers.remove(at: index)
|
|
|
|
+ self?.subtitleLabel.text = ""
|
|
} else {
|
|
} else {
|
|
// 更新数据
|
|
// 更新数据
|
|
self?.itemModels[self?.currItemModelIndex ?? 0].titleStickers[index].text = newtext
|
|
self?.itemModels[self?.currItemModelIndex ?? 0].titleStickers[index].text = newtext
|
|
@@ -1023,10 +1037,7 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
} else { // 上
|
|
} else { // 上
|
|
subtitleLabel.frame = CGRect(x: leftPoint, y: cScreenHeigth * 0.12, width: cScreenWidth - 37 * 2, height: height)
|
|
subtitleLabel.frame = CGRect(x: leftPoint, y: cScreenHeigth * 0.12, width: cScreenWidth - 37 * 2, height: height)
|
|
}
|
|
}
|
|
- // 打开的时候主动调用一次显示字幕
|
|
|
|
- updateSubtitle(time: currentAssetProgress)
|
|
|
|
- } else {
|
|
|
|
- subtitleLabel.text = ""
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|