Add keyboard shortcut for setting playback speed to 1x

pull/255/head
ElementalAlchemist 3 years ago committed by Mike Lang
parent 481b934eb8
commit f798b689a4

@ -100,6 +100,7 @@
<li>Period (.): Forward 1 frame</li>
<li>Equals (=): Increase playback speed one step</li>
<li>Hyphen (-): Decrease playback speed one step</li>
<li>Backspace: Reset playback speed to 1x</li>
<li>
Left bracket ([): Set start point for active range (indicated by arrow) to active video
time

@ -112,6 +112,7 @@
<li>Period (.): Forward 1 frame</li>
<li>Equals (=): Increase playback speed one step</li>
<li>Hyphen (-): Decrease playback speed one step</li>
<li>Backspace: Reset playback speed to 1x</li>
</ul>
</div>
</div>

@ -73,12 +73,6 @@ document.addEventListener("keypress", (event) => {
case "l":
videoElement.currentTime += 10;
break;
case "ArrowLeft":
videoElement.currentTime -= 5;
break;
case "ArrowRight":
videoElement.currentTime += 5;
break;
case ",":
videoElement.currentTime -= 1 / VIDEO_FRAMES_PER_SECOND;
break;
@ -130,6 +124,11 @@ document.addEventListener("keydown", (event) => {
case "ArrowRight":
videoElement.currentTime += 5;
break;
case "Backspace":
event.preventDefault();
videoElement.playbackRate = 1;
document.getElementById("video-controls-playback-speed").value = 1;
break;
default:
break;
}

Loading…
Cancel
Save