Loading tracks in the player

465 Views Asked by At

I'm looking for a way to load tracks in the Deezer player w/o playing then, especially when something is already playing.

http://developers.deezer.com/sdk/javascript/loadtracks#tracks simply shows how to play tracks

Or should I use something in the callback that prevents playing, but keeps playing what's currently running?

1

There are 1 best solutions below

0
On

You can deactivate autoplay by setting a boolean as a parameter, for example DZ.player.playTracks([3135556, 1152226], false).

Another thing that would be of your interest: you can add songs to the player queue with DZ.player.addToQueue([list of track IDs]).