Player
The main constructor for initializing the Web Playback SDK. It should contain an object with the player name, volume and access token.
Parameters
The options to instantiate this Player
Functions
Some browsers prevent autoplay of media by ensuring that all playback is triggered by synchronous event-paths originating from user interaction such as a click. This event allows you to manually activate the element if action is deferred or done in a separate execution context than the user action.
Create a new event listener under event event of type ErrorListener in the Web Playback SDK. Alias for Spotify.Player#on.
Create a new event listener under event event of type PlaybackStateListener in the Web Playback SDK. Alias for Spotify.Player#on.
Create a new event listener under event event of type PlaybackPlayerListener in the Web Playback SDK. Alias for Spotify.Player#on.
Closes the current session our Web Playback SDK has with Spotify.
Collect metadata on local playback.
Create a new event listener under event event of type ErrorListener in the Web Playback SDK.
Create a new event listener under event event of type PlaybackStateListener in the Web Playback SDK.
Create a new event listener under event event of type PlaybackPlayerListener in the Web Playback SDK.
Switch to the previous track in local playback.
Remove all event listeners registered under a specific event type in the Web Playback SDK. Please use SpotifyWebPlaybackEvent.spotifyId to get web playback events' spotify ids
Remove a specific ErrorListener registered under event type event in the Web Playback SDK.
Remove a specific PlaybackStateListener registered under event type event in the Web Playback SDK. Please use SpotifyWebPlaybackEvent.spotifyId to get web playback events' spotify ids
Remove a specific PlaybackPlayerListener registered under event type event in the Web Playback SDK. Please use SpotifyWebPlaybackEvent.spotifyId to get web playback events' spotify ids
Resume/pause the local playback.