Open padlocked17 opened 7 years ago
Hi @padlocked17, I didn't knew this one yet. I'll check it at the weekend and may give it a try.
@padlocked17 Is the delay noticable only on the first start of a song and / or after it was paused? Can you send me an URL with which I can reproduce this behavior?
It only occurs on the audio files first loading. I use Apple's Network Link Conditioner to test slower internet speeds and on slower connections, it takes a while to buffer the amount Apple thinks is the appropriate amount before beginning to play the audio.
I believe this is because the AVPlayer will download the whole MP3 file before starting the playback.
Alternatively you can use AVAsset.loadValuesAsynchronously
to trigger a progressive download and then inside the callback do player.replaceCurrentItem(with: …)
once the item becomes playable
.
Hi, has this been implemented? I am not able to play audio immediately.
Hello, someone could solve the delay problem when playing the song?.
Do you have news ?
I was looking for a decently solid library to start streaming MP3s from and your wrapper around AVPlayer has been awesome and saved a lot of time so far.
I've noticed with iOS 10 devices, when streaming through AVPlayer, it tends to buffer and create a noticeable lag from the time "play" is commanded and when it actually starts playing audio.
Any thoughts on adding a check for iOS 10 in the
open func play(updateNowPlayingInfo: Bool = false)
and then adding aplayImmediately(atRate: 1.0)
in there?