spotifywebapipython.models.playerplaystate
Spotify Web API PlayerPlayState object.
Information about the user's current playback state, including track or episode, progress, and active device.
Initializes a new instance of the class.
Arguments:
- root (dict): Spotify Web API JSON response in dictionary format, used to load object attributes; otherwise, None to not load attributes.
Allows to update the user interface based on which playback actions are available within the current context.
The object type of the currently playing item, or null if nothing is playing.
If not null, it can be one of track, episode, ad or unknown.
The device music source. This value is device manufacturer specific. For example, a Sonos source will contain values like "UNKNOWN", "SPOTIFY_CONNECT", etc.
This is a helper property, and is not part of the Spotify Web API specification.
True if playstate was built from a device playstate; otherwise, false if playstate was built from a Spotify Web API playstate.
True if Spotify playstate returned an empty response; otherwise, false.
Note that for Sonos devices, the Spotify Web API reports an empty playstate since the SoCo API is actually controlling player.
This is a helper property, and is not part of the Spotify Web API specification.
True if the player device volume is zero (muted) OR there is no device; otherwise, false.
True if repeat play (one or all) is enabled; otherwise, False.
The RepeatState property contains the actual repeat setting.
The currently playing track or episode; can be null.
Will be of type Track, Episode, or null.
The type of the currently playing episode; can be null.
This value will be null if the Item property value is null.
If not null, it can be one of audiobook or podcast.
Note that this is not a Spotify Web API property; it is loaded from our API so that the type of episode can be determined programatically (e.g. audiobook or podcast).