|
@@ -122,8 +122,8 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
let btn = UIButton(type: .custom)
|
|
|
btn.setImage(imageInRecordScreenKit(by: "mic1"), for: .normal)
|
|
|
btn.adjustsImageWhenHighlighted = false
|
|
|
- btn.addTarget(self, action: #selector(startRecord(btn:)), for: .touchDown)
|
|
|
- btn.addTarget(self, action: #selector(endRecord(btn:)), for: .touchUpInside)
|
|
|
+ btn.addTarget(self, action: #selector(startRecord), for: .touchDown)
|
|
|
+ btn.addTarget(self, action: #selector(endRecord), for: .touchUpInside)
|
|
|
return btn
|
|
|
}()
|
|
|
|
|
@@ -294,7 +294,7 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
beginOnStartBtn = false
|
|
|
if recordBtn.frame.contains(point) {
|
|
|
|
|
|
- endRecord(btn: recordBtn)
|
|
|
+ endRecord()
|
|
|
} else {
|
|
|
cancleRecord()
|
|
|
}
|
|
@@ -305,8 +305,8 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @objc func startRecord(btn:UIButton){
|
|
|
- btn.setImage(imageInRecordScreenKit(by: "mic2"), for: .normal)
|
|
|
+ @objc func startRecord(){
|
|
|
+ recordBtn.setImage(imageInRecordScreenKit(by: "mic2"), for: .normal)
|
|
|
BFLog(1, message: "start \(UIControl.Event.touchDown)")
|
|
|
pause()
|
|
|
|
|
@@ -321,7 +321,7 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
isRecording = true
|
|
|
}
|
|
|
|
|
|
- @objc func endRecord(btn:UIButton){
|
|
|
+ @objc func endRecord(){
|
|
|
recordBtn.setImage(imageInRecordScreenKit(by: "mic1"), for: .normal)
|
|
|
|
|
|
recorderManager.endRecord()
|
|
@@ -344,6 +344,7 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
|
|
|
@objc func nextAction(){
|
|
|
nextActionHandle?()
|
|
|
+ pause()
|
|
|
}
|
|
|
|
|
|
@objc func playVideo(btn:UIButton){
|
|
@@ -622,6 +623,9 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
self?.isNormalPlaying = false
|
|
|
self?.assetPlayer?.seek(to: CMTime.zero)
|
|
|
self?.currentPlayRecordIndex = -1
|
|
|
+ if self?.isRecording ?? false {
|
|
|
+ self?.endRecord()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|