Open cpurev opened 12 months ago
You can install @types/spotify-web-playback-sdk
and it will be much more pleasant to work with the playback SDK. You would need to listen for the ready
event on your player instance:
player.addListener('ready', ({ device_id }) => {
console.log('Ready with Device ID', device_id);
});
This is a snippet from the documentation here.
@fostertheweb Does your respond supposed to answer my question at #124 ?
In official Spotify API documents there is Web Playback sdk that uses window.onSpotifyWebPlaybackSDKReady.
I tried mimicking the example but cannot quite get it working in my Next/React application. I'm wondering how would I be able to set my application as a media player? It seems that my application does not have
device_id
thus I cannot use all thePlayer
endpoints.I'm new to this. Thank you so much!