Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Slapped this together.

    const video = document.getElementById("video");
    const skipSecs = 5;

    video.onkeydown = (e) => {
      if (e.keyCode !== 37 && e.keyCode !== 39)
        return;

      e.preventDefault();
      const time = video.currentTime;
      video.currentTime =
        e.keyCode === 37
          ? time - skipSecs
          : time + skipSecs;
    };


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: