|
@@ -2290,6 +2290,7 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //视频模式使用
|
|
|
func setAudioPlay(item: AVPlayerItem?) {
|
|
|
BFLog(message: "设置播放器item:\(String(describing: item))")
|
|
|
guard let item = item else {
|
|
@@ -2707,28 +2708,9 @@ public extension BFRecordScreenController {
|
|
|
/// 播放录音
|
|
|
/// - Parameter time: <#time description#>
|
|
|
func startPlayRecord(time: CMTime) {
|
|
|
- // 播放对应的录音音频
|
|
|
- if currMediaType == .Image {
|
|
|
- if itemModels[currItemModelIndex].materialDuraion.seconds <= 0 {
|
|
|
- playBtn.isSelected = true
|
|
|
- playBtn.isHidden = true
|
|
|
- return
|
|
|
- }
|
|
|
- isNormalPlaying = true
|
|
|
- // 当开始播放时重置录音播放起始时间
|
|
|
- recordStartPlayTime = currentAssetProgress
|
|
|
- currenStartPlayTime = CMTime.zero
|
|
|
- }
|
|
|
-
|
|
|
// 音
|
|
|
- playRecord(at: time, periodicTimeObserver: { [weak self] currentT, _ in
|
|
|
-
|
|
|
- guard let wself = self else { return }
|
|
|
-
|
|
|
- BFLog(1, message: "播放录音进度:\(currentT.seconds)")
|
|
|
- if wself.currMediaType == .Image, wself.isNormalPlaying {
|
|
|
- wself.imageRecordProgress(progress: CMTimeGetSeconds(currentT))
|
|
|
- }
|
|
|
+ playRecord(at: time, periodicTimeObserver: { _, _ in
|
|
|
+
|
|
|
}, didPlayToEndTime: { [weak self] recordInfo, currentItem in
|
|
|
|
|
|
guard let wself = self else { return }
|