naveedgol / music-web-player

Web player for Apple Music
https://naveedgol.github.io/music-web-player/
GNU General Public License v3.0
923 stars 110 forks source link

Preload Up Next Songs #55

Open mrnoisytiger opened 5 years ago

mrnoisytiger commented 5 years ago

It would be great if there was the ability to preload up-next songs when the current song is ending. That way, it would transition smoother and not have a few second gap between the songs.

naveedgol commented 5 years ago

While I observe this myself, I can't do much to address at MusicKit doesn't expose preload functionality.

SASFMONTOYA commented 5 years ago

Yes, Apple Music for Android works similar. The only difference that I see is in Music (iOS), I think that it use the cache, to cache the songs, to avoid this delay at change the songs or simply, dowloading them in the memory of device, I really don't know but they can be possibilities.

Vertana commented 5 years ago

@naveedgol Is this possible by looking at what is the next audio URL in the queue and then begin downloading that audio stream to localstorage and when the next song goes to play, check to see if it exists in localstorage first?