From 0c1d1b0b37f7c4941fd03ff817c0b235522763c3 Mon Sep 17 00:00:00 2001 From: Matt Rice Date: Thu, 7 Aug 2025 14:19:34 -0400 Subject: [PATCH] fix(playback): start playback after initial seek --- Sources/SwiftAudioEx/AVPlayerWrapper/AVPlayerWrapper.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/SwiftAudioEx/AVPlayerWrapper/AVPlayerWrapper.swift b/Sources/SwiftAudioEx/AVPlayerWrapper/AVPlayerWrapper.swift index a7b168e..fa4e124 100755 --- a/Sources/SwiftAudioEx/AVPlayerWrapper/AVPlayerWrapper.swift +++ b/Sources/SwiftAudioEx/AVPlayerWrapper/AVPlayerWrapper.swift @@ -299,12 +299,13 @@ class AVPlayerWrapper: AVPlayerWrapperProtocol { item.preferredForwardBufferDuration = self.bufferDuration self.avPlayer.replaceCurrentItem(with: item) self.startObservingAVPlayer(item: item) - self.applyAVPlayerRate() if let initialTime = self.timeToSeekToAfterLoading { self.timeToSeekToAfterLoading = nil self.seek(to: initialTime) } + + self.applyAVPlayerRate() } }) }