Sets the list of recently played track IDs in the playback state.
This is used for features like backward navigation detection and
listening pattern analysis.
Parameters
recentTracks: string[]
Array of Spotify track IDs in order of recency
Returns void
Example
// Update the recent tracks list after fetching from Spotify API constrecentTracks = awaitspotifyApi.getRecentlyPlayedTracks(); consttrackIds = recentTracks.items.map(item=>item.track.id); setRecentTracks(trackIds);
Updates the recent tracks list
Sets the list of recently played track IDs in the playback state. This is used for features like backward navigation detection and listening pattern analysis.