|
@@ -40,10 +40,12 @@ class PQSelecteMusicView: UIView {
|
|
|
PQNotification.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: avPlayer.currentItem, queue: .main) { [weak self] notify in
|
|
|
BFLog(message: "AVPlayerItemDidPlayToEndTime = \(notify)")
|
|
|
avPlayer.seek(to: CMTime(value: CMTimeValue((self?.currentPlayData?.startTime ?? 0) * 1000), timescale: CMTimeScale(playerTimescale)))
|
|
|
-
|
|
|
- self?.currentPlayData?.voiceStatue = .isPause
|
|
|
-
|
|
|
- self?.selectMusicCollection.reloadData()
|
|
|
+
|
|
|
+ if(self?.currentPlayData?.voiceStatue == .isPlaying){
|
|
|
+ self?.currentPlayData?.voiceStatue = .isPause
|
|
|
+ self?.selectMusicCollection.reloadData()
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
// PQNotification.addObserver(forName: .AVPlayerItemNewErrorLogEntry, object: avPlayer.currentItem, queue: .main) { notify in
|
|
|
// BFLog(message: "AVPlayerItemNewErrorLogEntry = \(notify)")
|