Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Mp3 take more then 10 seconds to start playing? #59

Open
tejinderpaul opened this issue Feb 4, 2017 · 4 comments
Open

Mp3 take more then 10 seconds to start playing? #59

tejinderpaul opened this issue Feb 4, 2017 · 4 comments

Comments

@tejinderpaul
Copy link

I am working on a app where I have to play an mp3 player, in iOS I used jukebox library, thanks for providing such wonderful lib.

I am facing an issue which is if I play a mp3, it take aounrd more then 10-20 seconds to start song?Anu Idea?

@almatri
Copy link

almatri commented Mar 13, 2017

The problem apparently is with iOS 10 devices only .
I fixed this by manually adding the library, and change each player.play() with this :

if #available(iOS 10.0, *) {
    player?.playImmediately(atRate: 1.0)
} else {
    player?.play()
}

http://stackoverflow.com/questions/40442265/avplayer-takes-long-time-to-start-playing/42235181#42235181

I created PR here #64

@sandeepsipl
Copy link

I'm still facing this issue on iOS 11 with Swift 3. Any idea?

@tungdx
Copy link

tungdx commented Apr 24, 2018

In class Jukebox.swift, I added below code to method startNewPlayer(...) and it works
if #available(iOS 10,*){ player?.automaticallyWaitsToMinimizeStalling = false }

@laraibmaliknew
Copy link

Any upadte on this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants