diff --git a/index.html b/index.html index 53843eb..bfcf695 100644 --- a/index.html +++ b/index.html @@ -19,9 +19,10 @@
Here are the controls:
-(You can download the music history of your current browser by clicking the history link on the player)
All the music is fetched from retrowave.ru
diff --git a/player.js b/player.js index 2e6ee02..2c7e73f 100644 --- a/player.js +++ b/player.js @@ -66,8 +66,9 @@ document.addEventListener("keyup", (event) => { const { key } = event; + console.log("key pressed", key); switch (key) { - case "x": + case " ": togglePlay(); break; case "a": @@ -80,6 +81,10 @@ case "s": volumeDown(); break; + case "n": + playNextTrack(); + break; + } }); @@ -230,6 +235,7 @@ https://retrowave.ru/${musicData.streamUrl} } function playNextTrack() { + resetHowler(); currentTracks.shift(); if (currentTracks.length <= 3) { getMusic(); @@ -247,7 +253,6 @@ https://retrowave.ru/${musicData.streamUrl} function initControls() { refreshBtn.addEventListener("click", () => { - resetHowler(); playNextTrack(); }); }