Skip to content

Commit 80e53ff

Browse files
committed
- playing around with the spotify API
1 parent 260567d commit 80e53ff

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

tools/spotify_test.html

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,8 @@
177177
})
178178
});
179179

180-
// If there's a track ID in the URL
181180
const trackId = getUrlParameter('track');
182181
if (trackId) {
183-
// First select the track via API
184182
try {
185183
await fetch('https://api.spotify.com/v1/me/player/play', {
186184
method: 'PUT',
@@ -192,11 +190,6 @@
192190
uris: [`spotify:track:${trackId}`]
193191
})
194192
});
195-
196-
// Then trigger the play button after 4 seconds
197-
setTimeout(() => {
198-
pauseResumeButton.click();
199-
}, 4000);
200193
} catch (error) {
201194
console.error('Error playing track:', error);
202195
}

0 commit comments

Comments
 (0)