webmusic.js: seeking in track with number keys

This commit is contained in:
Isabelle 2021-03-07 17:44:27 +01:00 committed by Leah (ctucx)
parent d9bed3ac47
commit acac39a90c
1 changed files with 14 additions and 0 deletions

View File

@ -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;
}
};