|
@@ -1450,8 +1450,9 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
didPlayToEndTime((shouldPlayRecordIndex, recordedAudio), newItem)
|
|
|
}
|
|
|
recordPlayerTimeObserver?.invalidate()
|
|
|
- recordPlayerTimeObserver = recordPlayer?.addPeriodicTimeObserver(forInterval: CMTime(value: 1, timescale: 1000), queue: DispatchQueue.global()) { [weak self, weak recordPlayer,weak assetPlayer] time in
|
|
|
- guard let sself = self,let rPlay = recordPlayer,let aPlay = assetPlayer else {
|
|
|
+ recordPlayerTimeObserver = recordPlayer?.addPeriodicTimeObserver(forInterval: CMTime(value: 1, timescale: 1000), queue: DispatchQueue.global()) { [weak self, weak recordPlayer] time in
|
|
|
+ guard let sself = self,let rPlay = recordPlayer else {
|
|
|
+ BFLog(3, message: "sself为空")
|
|
|
return
|
|
|
}
|
|
|
BFLog(3, message: "当前播放---\(time),\(time.seconds),\(rPlay.currentItem?.currentTime().seconds ?? 0),\(rPlay.currentItem?.duration.seconds ?? 0)")
|
|
@@ -1463,8 +1464,6 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
BFLog(message: "progressTime进度\(#function)-\(progressTime.seconds)")
|
|
|
periodicTimeObserver(progressTime, newItem)
|
|
|
if (rPlay.currentItem?.currentTime().seconds ?? 0) > (rPlay.currentItem?.duration.seconds ?? 0) - 0.1 {
|
|
|
-// rPlay.volume = 0
|
|
|
-// aPlay.volume = sself.noSpeakVolume
|
|
|
didPlayToEndTime((shouldPlayRecordIndex, recordedAudio), newItem)
|
|
|
}
|
|
|
} as? NSKeyValueObservation
|