ctucx.git: webmusic-nginx

nginx xslt-based index files optimized for music, inspired by https://git.ztn.sh/zotan/webmusic

commit 77bf0fcbd102321a228b5f7ff2e0361db5d784e1
parent d667a3a53e02293b9679364dcf949023783ae1c7
Author: Isabelle <hi@f2k1.de>
Date: Sun, 7 Mar 2021 17:44:27 +0100

webmusic.js: seeking in track with number keys
1 file changed, 14 insertions(+), 0 deletions(-)
M
webmusic.js
|
14
++++++++++++++
diff --git 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;
+
 	}
 };