|
@@ -484,6 +484,35 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
btn.addTarget(self, action: #selector(cameraFlipAction), for: .touchUpInside)
|
|
btn.addTarget(self, action: #selector(cameraFlipAction), for: .touchUpInside)
|
|
return btn
|
|
return btn
|
|
}()
|
|
}()
|
|
|
|
+
|
|
|
|
+ // 添加音乐设置
|
|
|
|
+ lazy var addMusicBtn: UIButton = {
|
|
|
|
+ let btn = UIButton(type: .custom)
|
|
|
|
+ btn.backgroundColor = UIColor.black
|
|
|
|
+ btn.layer.cornerRadius = 16
|
|
|
|
+ btn.setImage(imageInRecordScreenKit(by: "addmusic"), for: .normal)
|
|
|
|
+ btn.setTitle("选择音乐", for: .normal)
|
|
|
|
+ btn.titleLabel?.font = UIFont.systemFont(ofSize: 13)
|
|
|
|
+ btn.addTarget(self, action: #selector(addMusicAction), for: .touchUpInside)
|
|
|
|
+ return btn
|
|
|
|
+ }()
|
|
|
|
+
|
|
|
|
+ lazy var choseMusicPanel: BFChooseMusicView = {
|
|
|
|
+ let vv = BFChooseMusicView(frame: CGRect(x: 0, y: cScreenHeigth, width: cScreenWidth, height: cScreenHeigth - 200))
|
|
|
|
+ vv.clickBtnAction = { [weak self] type in
|
|
|
|
+ guard let wself = self else { return }
|
|
|
|
+
|
|
|
|
+ if type == BFChooseMusicViewClickType.sure {
|
|
|
|
+
|
|
|
|
+ }else {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ UIView.animate(withDuration: 0.25) {
|
|
|
|
+ wself.choseMusicPanel.frame = CGRect(x: 0, y: cScreenHeigth, width: cScreenWidth, height: cScreenHeigth - 200)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return vv
|
|
|
|
+ }()
|
|
|
|
|
|
// 字幕设置面板
|
|
// 字幕设置面板
|
|
lazy var subtitleSettingView: BFSubtitleSettingView = {
|
|
lazy var subtitleSettingView: BFSubtitleSettingView = {
|
|
@@ -728,6 +757,9 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
|
|
|
view.addSubview(bottomeView)
|
|
view.addSubview(bottomeView)
|
|
// view.addSubview(subtitleLabel)
|
|
// view.addSubview(subtitleLabel)
|
|
|
|
+ view.addSubview(addMusicBtn)
|
|
|
|
+ view.addSubview(choseMusicPanel)
|
|
|
|
+
|
|
view.addSubview(playBtn)
|
|
view.addSubview(playBtn)
|
|
// view.addSubview(avatarView)
|
|
// view.addSubview(avatarView)
|
|
// view.addSubview(openCameraBtn)
|
|
// view.addSubview(openCameraBtn)
|
|
@@ -740,6 +772,8 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
}
|
|
}
|
|
|
|
|
|
view.addSubview(cameraFlipBtn)
|
|
view.addSubview(cameraFlipBtn)
|
|
|
|
+
|
|
|
|
+
|
|
view.addSubview(subtitleSettingView)
|
|
view.addSubview(subtitleSettingView)
|
|
view.addSubview(audioSettingView)
|
|
view.addSubview(audioSettingView)
|
|
//??? add key windows?
|
|
//??? add key windows?
|
|
@@ -930,6 +964,13 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
make.left.bottom.right.equalToSuperview()
|
|
make.left.bottom.right.equalToSuperview()
|
|
make.height.equalTo(adapterWidth(width: 180))
|
|
make.height.equalTo(adapterWidth(width: 180))
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ addMusicBtn.snp.makeConstraints { make in
|
|
|
|
+ make.centerX.equalToSuperview()
|
|
|
|
+ make.top.equalTo(soundSettingBtn).offset(-8)
|
|
|
|
+ make.width.equalTo(100)
|
|
|
|
+ make.height.equalTo(32)
|
|
|
|
+ }
|
|
|
|
|
|
progreddL.snp.makeConstraints { make in
|
|
progreddL.snp.makeConstraints { make in
|
|
make.width.equalTo(100)
|
|
make.width.equalTo(100)
|
|
@@ -1428,6 +1469,27 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
rscmanager.cameraFlip()
|
|
rscmanager.cameraFlip()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @objc func addMusicAction() {
|
|
|
|
+ cShowHUB(superView: nil, msg: "选择音乐")
|
|
|
|
+
|
|
|
|
+ soundSettingBtn.isHidden = true
|
|
|
|
+ cameraFlipBtn.isHidden = true
|
|
|
|
+ voiceSettingBtn.isHidden = true
|
|
|
|
+ subtitleBtn.isHidden = true
|
|
|
|
+ addMusicBtn.isHidden = true
|
|
|
|
+
|
|
|
|
+ UIView.animate(withDuration: 0.25) {[weak self] in
|
|
|
|
+ guard let wself = self else { return }
|
|
|
|
+ wself.soundSettingBtn.isHidden = false
|
|
|
|
+ wself.cameraFlipBtn.isHidden = false
|
|
|
|
+ wself.voiceSettingBtn.isHidden = false
|
|
|
|
+ wself.subtitleBtn.isHidden = false
|
|
|
|
+ wself.addMusicBtn.isHidden = false
|
|
|
|
+
|
|
|
|
+ wself.choseMusicPanel.frame = CGRect(x: 0, y: 210, width: cScreenWidth, height: cScreenHeigth - 200)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
/// 删除指定段落的所有字幕 数据
|
|
/// 删除指定段落的所有字幕 数据
|
|
/// - Parameter voiceModel: 删除的音频数据
|
|
/// - Parameter voiceModel: 删除的音频数据
|