Play songs with custom media player

Reply

Play songs with custom media player

ssad18
Casual Listener

My Question or Issue

I was looking at the Web Playback SDK and learned that I can play music in my browser through the desktop Spotify client. However, I want to be able to play music WITHOUT having to start it from another Spotify client. Is this possible with the SDK? Can I create my own custom media player buttons and use them to play any song based on a URI? 

1 Reply

joao__vct
Regular

Late, but answering your question: yes, it's possible to play a track on your app without have to initialize the player from another Spotify Client. Is simple: follow these instructions here  and be sure that your player is connected, use the event "ready". Once your player is ready, you will receive a device_id through the callback function. Save this device_id and use it here to make a request to play a track on your new device. 

 

tip: be sure that you have all the necessary scopes to perform these actions.

SUGGESTED POSTS