Retrieves the complete current playback state object containing
all track information, playback details, and internal tracking data.
This returns a direct reference to the state for performance reasons,
so consumers should not modify the returned object.
// Get current track information conststate = getPlaybackState(); if (state.isPlaying) { console.log(`Now playing: ${state.currentTrackName} by ${state.currentArtistName}`); }
Gets the current playback state
Retrieves the complete current playback state object containing all track information, playback details, and internal tracking data. This returns a direct reference to the state for performance reasons, so consumers should not modify the returned object.