mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-04 10:04:39 +02:00
Fix track skipping on iOS (Fixes #686)
When we seek into a different chapter, we will have to reset the progress of the current one before seeking to the new one.
This commit is contained in:
parent
f89148b92e
commit
59c71b71fb
1 changed files with 4 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue