summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsabelle <hi@f2k1.de>2021-03-07 17:44:27 +0100
committerIsabelle <hi@f2k1.de>2021-03-07 17:44:27 +0100
commit77bf0fcbd102321a228b5f7ff2e0361db5d784e1 (patch)
tree3799054aca80c9a0611f72fd240467560267c9a4
parentd667a3a53e02293b9679364dcf949023783ae1c7 (diff)
downloadwebmusic-nginx-77bf0fcbd102321a228b5f7ff2e0361db5d784e1.tar.gz
webmusic-nginx-77bf0fcbd102321a228b5f7ff2e0361db5d784e1.tar.bz2
webmusic-nginx-77bf0fcbd102321a228b5f7ff2e0361db5d784e1.zip
webmusic.js: seeking in track with number keys
-rw-r--r--webmusic.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/webmusic.js b/webmusic.js
index ba6bff6..931fbc5 100644
--- a/webmusic.js
+++ b/webmusic.js
@@ -58,6 +58,20 @@ const handleKeyEvent = (event) => {
case 'Escape':
document.getElementById('back').click();
break;
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ audioPlayer.currentTime = audioPlayer.duration / 100 * (event.key * 10);
+ break;
+
}
};