CurrentlyPlayingObject

data class CurrentlyPlayingObject(context: SpotifyContext?, timestamp: Long, progressMs: Int?, isPlaying: Boolean, track: Track?, currentlyPlayingTypeString: String, actions: PlaybackActions)

Information about the currently playing track and context

Parameters

context

A Context Object. Can be null.

timestamp

Unix Millisecond Timestamp when data was fetched

progressMs

Progress into the currently playing track. Can be null.

isPlaying

If something is currently playing.

track

The currently playing track. Can be null.

actions

Allows to update the user interface based on which playback actions are available within the current context

Constructors

CurrentlyPlayingObject
Link copied to clipboard
common
fun CurrentlyPlayingObject(context: SpotifyContext? = null, timestamp: Long, progressMs: Int? = null, isPlaying: Boolean, track: Track? = null, currentlyPlayingTypeString: String, actions: PlaybackActions)
A Context Object.

Properties

actions
Link copied to clipboard
common
val actions: PlaybackActions
Allows to update the user interface based on which playback actions are available within the current context
context
Link copied to clipboard
common
val context: SpotifyContext? = null
A Context Object.
currentlyPlayingType
Link copied to clipboard
common
val currentlyPlayingType: CurrentlyPlayingType
The object type of the currently playing item.
isPlaying
Link copied to clipboard
common
val isPlaying: Boolean
If something is currently playing.
progressMs
Link copied to clipboard
common
val progressMs: Int? = null
Progress into the currently playing track.
timestamp
Link copied to clipboard
common
val timestamp: Long
Unix Millisecond Timestamp when data was fetched
track
Link copied to clipboard
common
val track: Track? = null
The currently playing track.

Sources

common source
Link copied to clipboard