We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c0b60d commit 766d9ceCopy full SHA for 766d9ce
tools/spotify_music_quiz_cards.html
@@ -339,6 +339,17 @@ <h3 class="text-lg font-semibold">${track.name}</h3>
339
});
340
341
playerInstance.addListener('ready', async ({ device_id }) => {
342
+ await fetch('https://api.spotify.com/v1/me/player', {
343
+ method: 'PUT',
344
+ headers: {
345
+ 'Authorization': `Bearer ${token}`,
346
+ 'Content-Type': 'application/json'
347
+ },
348
+ body: JSON.stringify({
349
+ device_ids: [device_id],
350
+ play: true
351
+ })
352
+ });
353
const trackId = getUrlParameter('track');
354
if (trackId) {
355
await fetch(`https://api.spotify.com/v1/me/player/play?device_id=${device_id}`, {
0 commit comments