|
@@ -1075,7 +1075,7 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
/// 不足一秒,主动取消录制
|
|
|
/// - Parameter voiceModel: <#voiceModel description#>
|
|
|
@objc func recordManagerCancelRecord(voiceModel: PQVoiceModel?) {
|
|
|
- if currentAssetProgress.seconds - (recorderManager?.voiceModel?.startCMTime.seconds ?? 0) < 1.0 {
|
|
|
+ if voiceModel != nil && (currentAssetProgress.seconds - (recorderManager?.voiceModel?.startCMTime.seconds ?? 0) < 1.0) {
|
|
|
cShowHUB(superView: nil, msg: "最短录制1秒")
|
|
|
}
|
|
|
// 删除文件
|
|
@@ -1388,6 +1388,7 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
} ?? (-1, nil)
|
|
|
|
|
|
guard let recordedAudio = recordedAudio, recordedAudio.wavFilePath.count > 0 else {
|
|
|
+ BFLog(3, message: "未找到可播放录音")
|
|
|
return
|
|
|
}
|
|
|
BFLog(1, message: "当前时间:\(CMTimeGetSeconds(currentT)), 找到的音频:\(recordedAudio.startCMTime.seconds) ~ \(recordedAudio.endCMTime.seconds), \(recordedAudio.wavFilePath ?? "")")
|
|
@@ -1540,7 +1541,6 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
currentAssetProgress = CMTime.zero
|
|
|
}
|
|
|
if itemModels[currItemModelIndex].mediaType == .VIDEO {
|
|
|
- assetPlayer?.volume = noSpeakVolume
|
|
|
if !movieIsProcessing {
|
|
|
movie?.startProcessing()
|
|
|
movieIsProcessing = true
|
|
@@ -1574,11 +1574,8 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
recordPlayer?.pause()
|
|
|
recordStartPlayTime = CMTime.zero
|
|
|
pauseTime = currentAssetProgress.seconds
|
|
|
-
|
|
|
- //
|
|
|
-// assetPlayer?.seek(to: currentAssetProgress, toleranceBefore: CMTime(value: 1, timescale: 1_000_000), toleranceAfter: CMTime(value: 1, timescale: 1_000_000), completionHandler: { _ in
|
|
|
-// cShowHUB(superView: nil, msg: "end seek: \(self.assetPlayer?.currentItem?.currentTime().seconds ?? 0)")
|
|
|
-// })
|
|
|
+ currentPlayRecordIndex = -1
|
|
|
+ hadPrepareToPlayRecord = false
|
|
|
// 暂停状态
|
|
|
playBtn.isSelected = (itemModels[currItemModelIndex].mediaType == .IMAGE && itemModels[currItemModelIndex].voiceStickers.count <= 0)
|
|
|
}
|