Skip to content

Commit 766d9ce

Browse files
committed
- revert to previous implementation
1 parent 4c0b60d commit 766d9ce

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tools/spotify_music_quiz_cards.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,17 @@ <h3 class="text-lg font-semibold">${track.name}</h3>
339339
});
340340

341341
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+
});
342353
const trackId = getUrlParameter('track');
343354
if (trackId) {
344355
await fetch(`https://api.spotify.com/v1/me/player/play?device_id=${device_id}`, {

0 commit comments

Comments
 (0)