Playback state object returned by Spotify API

interface SpotifyPlaybackState {
    device: SpotifyDevice;
    repeat_state: string;
    shuffle_state: boolean;
    context:
        | null
        | {
            type: string;
            href: string;
            external_urls: SpotifyExternalUrls;
            uri: string;
        };
    timestamp: number;
    progress_ms: number;
    is_playing: boolean;
    item: SpotifyTrack;
    currently_playing_type: string;
    actions: { disallows: Record<string, boolean> };
}

Properties

repeat_state: string
shuffle_state: boolean
context:
    | null
    | {
        type: string;
        href: string;
        external_urls: SpotifyExternalUrls;
        uri: string;
    }
timestamp: number
progress_ms: number
is_playing: boolean
currently_playing_type: string
actions: { disallows: Record<string, boolean> }