Merge pull request #964 from Sapd/seek-fix

Fix track skipping on iOS (Fixes #686)
This commit is contained in:
advplyr
2023-11-30 17:06:33 -06:00
committed by GitHub
+4
View File
@@ -371,6 +371,10 @@ class AudioPlayer: NSObject {
// Reconstruct queue if seeking to a different track
if (self.currentTrackIndex != indexOfSeek) {
// When we seek to a different track, we need to make sure to seek the old track to 0
// or we will get jumps to the old position when fading over into a new track
self.audioPlayer.seek(to: CMTime(seconds: 0, preferredTimescale: 1000))
self.currentTrackIndex = indexOfSeek
try? playbackSession.update {