CurrentlyPlayingContext

data class CurrentlyPlayingContext(timestamp: Long, device: Device, progressMs: Int?, isPlaying: Boolean, track: Track?, shuffleState: Boolean, repeatStateString: String, context: SpotifyContext?)

Information about the current playback

Parameters

timestamp

Unix Millisecond Timestamp when data was fetched

device

The device that is currently active

progressMs

Progress into the currently playing track. Can be null (e.g. If private session is enabled this will be null).

isPlaying

If something is currently playing.

track

The currently playing track. Can be null (e.g. If private session is enabled this will be null).

context

A Context Object. Can be null (e.g. If private session is enabled this will be null). Note: this will likely be null when playing the first track in a playlist or show context.

shuffleState

If shuffle is on or off

Constructors

CurrentlyPlayingContext
Link copied to clipboard
common
fun CurrentlyPlayingContext(timestamp: Long, device: Device, progressMs: Int? = null, isPlaying: Boolean, track: Track? = null, shuffleState: Boolean, repeatStateString: String, context: SpotifyContext? = null)
Unix Millisecond Timestamp when data was fetched

Functions

component1
Link copied to clipboard
common
operator fun component1(): Long
component2
Link copied to clipboard
common
operator fun component2(): Device
component3
Link copied to clipboard
common
operator fun component3(): Int?
component4
Link copied to clipboard
common
operator fun component4(): Boolean
component5
Link copied to clipboard
common
operator fun component5(): Track?
component6
Link copied to clipboard
common
operator fun component6(): Boolean
component7
Link copied to clipboard
common
operator fun component7(): String
component8
Link copied to clipboard
common
operator fun component8(): SpotifyContext?
copy
Link copied to clipboard
common
fun copy(timestamp: Long, device: Device, progressMs: Int? = null, isPlaying: Boolean, track: Track? = null, shuffleState: Boolean, repeatStateString: String, context: SpotifyContext? = null): CurrentlyPlayingContext
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

context
Link copied to clipboard
common
val context: SpotifyContext? = null
A Context Object.
device
Link copied to clipboard
common
val device: Device
The device that is currently active
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.
repeatState
Link copied to clipboard
common
val repeatState: ClientPlayerApi.PlayerRepeatState
If and how the playback is repeating
repeatStateString
Link copied to clipboard
common
val repeatStateString: String
shuffleState
Link copied to clipboard
common
val shuffleState: Boolean
If shuffle is on or off
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

(source)
Link copied to clipboard