Re: Security angle
Well, there is the problem then. It could rotate the track numbers on a server or similar. Just give the speaker a token of some sort, and it does not need to even know what it's requesting from the server... Phone says "request the *next* song", no need to number it on the speaker.
My current speakers don't die when asking to play from spotify, and I'm pretty certain it's got more than 64k songs even! (But that's because it's a blutooth only speaker. ;) ).