A client-side JavaScript library to create a new Spotify Connect player.
The Spotify Web Playback SDK is a client-side only JavaScript library that allows
you to create a new player in Spotify Connect, stream and
control audio tracks from Spotify inside your website
application, and get metadata about the current playback.
The Web Playback SDK requires a Spotify Premium subscription
window.onSpotifyWebPlaybackSDKReady = () => {
const token = '[My Spotify Web API access token]';
const player = new Spotify.Player({
name: 'Web Playback SDK Quick Start Player',
getOAuthToken: cb => { cb(token); }
});
}
We provide a beginner’s tutorial to help you get started with the Web Playback SDK and a complete guide to lead you through the creation of a simple web app that makes a Spotify Player instance that can be controlled through Spotify Connect.
Do not forget to check the Troubleshooting section to read further about known issues and limitations.
Operating System | Browsers | Status |
---|---|---|
Mac/Windows/Linux | Chrome | ✓ Supported |
Firefox | ✓ Supported | |
Safari | ✓ Supported | |
Microsoft Edge | ✓ Supported | |
IE* | ✓ Supported |
* IE 11 or above. Must be on Windows 8.1 or above.
Operating System | Browsers | Status |
---|---|---|
Android | Firefox | ✓ Supported |
Chrome | ✓ Supported | |
iOS | Safari* | ✓ Supported |
Firefox | ✓ Supported | |
Chrome | ✓ Supported |
* iOS support has some limitations:
This SDK must not be used in commercial projects without Spotify’s prior written approval. By using Spotify developer tools, you accept our Developer Terms of Use. They contain important information about what you can and can’t do with our developer tools. We highly suggest getting familiar with our Developer Policy and Complying with Spotify’s developer policy. Please read them carefully.