PlaybackState

external interface PlaybackState

This is an object that is provided every time Spotify.Player#getCurrentState is called. It contains information on context, permissions, playback state, the user’s session, and more.

Properties

context
Link copied to clipboard
js
abstract var context: PlaybackContext
Playback context
disallows
Link copied to clipboard
js
abstract var disallows: PlaybackDisallows
A simplified set of restriction controls for the track.
duration
Link copied to clipboard
js
abstract var duration: Number
paused
Link copied to clipboard
js
abstract var paused: Boolean
Whether the current track is paused
position
Link copied to clipboard
js
abstract var position: Number
The position_ms of the current track.
repeat_mode
Link copied to clipboard
js
abstract var repeat_mode: Number
The repeat mode.
restrictions
Link copied to clipboard
js
abstract var restrictions: PlaybackRestrictions
shuffle
Link copied to clipboard
js
abstract var shuffle: Boolean
True if shuffled, false otherwise.
track_window
Link copied to clipboard
js
abstract var track_window: PlaybackTrackWindow
Playback information

Sources

js source
Link copied to clipboard