Open buddax2 opened 8 years ago
I've run across this issue as well. In fact, it seems that jukeboxDidLoadItem() gets called twice for a single play sometimes. This complicates the possibility of counting the number of times a song as played (which might be a nice enhancement all on it's own).
Any news of getting to know if song is buffering?
@RajChanchal from what I could find the best way to tell whether it is buffering or actually playing is to monitor the jukeboxPlaybackProgressDidChange method in the JukeboxDelegate. If the song is buffering then the jukebox.currentItem.currentTime parameter in that method will have the value 0. Once the song starts playing audibly that value increases.
@mattwritescode You are right about the value being 0. I had already put a check on it. So, it is not a problem when starting a song and showing user some loader that it is loading. Problem is, when due to slow internet it buffers in between. User should be shown some loader when it's buffering. But to show that, I must be knowing when its buffer goes empty. I think, I made you clear what I meant. Thanks by the way for the great lib.
@RajChanchal I am facing the exactly same issue. Did you find any solution?
Is it possible to get notified when online stream started to play? As I understand the buffering state is missing. So I get the .playing state right after I call player?.play() but it took a few seconds to start playing audio.