Skip to content

Commit 99f165f

Browse files
committed
- testing around at the speed of sound
1 parent f4f14cc commit 99f165f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/spotify_music_quiz_cards.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,14 @@ <h3 class="text-lg font-semibold">${track.name}</h3>
379379
refreshAuth();
380380
});
381381

382+
playerInstance.addListener('player_state_changed', state => {
383+
console.log('player_state_changed', state);
384+
if (state) {
385+
isPlaying = !state.paused;
386+
updateButtonIcon();
387+
}
388+
});
389+
382390
document.getElementById('pauseResumeButton').onclick = togglePauseResume;
383391
playerInstance.connect();
384392
}

0 commit comments

Comments
 (0)