Fix some keyboard shortcuts in mini player

This commit is contained in:
PrestonN 2019-03-31 17:34:01 -04:00
parent dd3f484f20
commit 1b22d4996b
1 changed files with 12 additions and 0 deletions

View File

@ -241,6 +241,18 @@ function changeDurationByPercentage(percentage) {
videoPlayer.currentTime = videoPlayer.duration * percentage;
}
/**
* Change the duration of the current time of a video by a few seconds.
*
* @param {integer} seconds - The amount of seconds to change the video by. Integer may be positive or negative.
*
* @return {Void}
*/
function changeDurationBySeconds(seconds) {
const videoPlayer = $('.videoPlayer').get(0);
videoPlayer.currentTime = videoPlayer.currentTime + seconds;
}
/**
* Hide the mouse cursor after ~3 seconds. Used to hide the video when the user
* hovers the mouse over the video player.