PlaybackState

external interface PlaybackState(source)

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

Link copied to clipboard
abstract var context: PlaybackContext

Playback context

Link copied to clipboard

A simplified set of restriction controls for the track. By default, these fields will either be set to false or undefined, which indicates that the particular operation is allowed. When the field is set to true, this means that the operation is not permitted. For example, skipping_next, skipping_prev and seeking will be set to true when playing an ad track.

Link copied to clipboard
abstract var duration: Number
Link copied to clipboard
abstract var paused: Boolean

Whether the current track is paused

Link copied to clipboard
abstract var position: Number

The position_ms of the current track.

Link copied to clipboard
abstract var repeat_mode: Number

The repeat mode. No repeat mode is 0, once-repeat is 1 and full repeat is 2.

Link copied to clipboard
Link copied to clipboard
abstract var shuffle: Boolean

True if shuffled, false otherwise.

Link copied to clipboard

Playback information