Skip to content

Commit a093eb7

Browse files
committed
- playing around with the spotify API
1 parent 9ff4a96 commit a093eb7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tools/spotify_test.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,13 @@
153153
})
154154
}).then(response => {
155155
if (response.status === 204) {
156-
const trackId = getUrlParameter('track');
157-
if (trackId) {
158-
playTrackById(trackId, token);
159-
}
156+
// Add a small delay to ensure the device is fully registered
157+
setTimeout(() => {
158+
const trackId = getUrlParameter('track');
159+
if (trackId) {
160+
playTrackById(trackId, token);
161+
}
162+
}, 1000);
160163
}
161164
});
162165
});

0 commit comments

Comments
 (0)