+ keybinds for selecting speed

This commit is contained in:
Dominika Liberda 2021-07-07 11:33:03 +00:00
parent c43ab1657c
commit ad6dc8bc9d

View file

@ -246,6 +246,12 @@ window.addEventListener('DOMContentLoaded', (event) => {
seekRelative(10); seekRelative(10);
} else if (e.key == "f") { } else if (e.key == "f") {
toggleFullscreen(); toggleFullscreen();
} else if (e.key == ">") {
if (speedInput.selectedIndex != 6) speedInput.selectedIndex += 1;
changeSpeed();
} else if (e.key == "<") {
if (speedInput.selectedIndex != 0) speedInput.selectedIndex -= 1;
changeSpeed();
} }
} }
} }
@ -373,6 +379,7 @@ window.addEventListener('DOMContentLoaded', (event) => {
document.querySelector('.html5-video-container').addEventListener('mousemove', (e) => handleMouse("frame", e)); document.querySelector('.html5-video-container').addEventListener('mousemove', (e) => handleMouse("frame", e));
controlbar.addEventListener('mousemove', (e) => handleMouse("controls", e)); controlbar.addEventListener('mousemove', (e) => handleMouse("controls", e));
speedInput.addEventListener('change', () => changeSpeed()); speedInput.addEventListener('change', () => changeSpeed());
speedInput.selectedIndex=2;
seekAbsolute(startTime); seekAbsolute(startTime);