Skip to content

Commit

Permalink
Release 0.2.18
Browse files Browse the repository at this point in the history
  • Loading branch information
ctd1500 committed Apr 13, 2017
1 parent 977ad17 commit 20af0a7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "videojs-hotkeys",
"version": "0.2.17",
"version": "0.2.18",
"description": "Adds more hotkey support to video.js",
"main": "videojs.hotkeys.min.js",
"author": "Chris Dougherty",
Expand Down
18 changes: 13 additions & 5 deletions videojs.hotkeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

})(window, function(window, videojs) {
"use strict";
window['videojs_hotkeys'] = { version: "0.2.17" };
window['videojs_hotkeys'] = { version: "0.2.18" };

var hotkeys = function(options) {
var player = this;
Expand Down Expand Up @@ -141,22 +141,30 @@
case cRewind: // Seek Backward
var wasPlaying = !player.paused();
ePreventDefault();
if (wasPlaying) player.pause();
if (wasPlaying) {
player.pause();
}
curTime = player.currentTime() - seekStep;
// The flash player tech will allow you to seek into negative
// numbers and break the seekbar, so try to prevent that.
if (player.currentTime() <= seekStep) {
curTime = 0;
}
player.currentTime(curTime);
if (wasPlaying) player.play();
if (wasPlaying) {
player.play();
}
break;
case cForward: // Seek Forward
var wasPlaying = !player.paused();
ePreventDefault();
if (wasPlaying) player.pause();
if (wasPlaying) {
player.pause();
}
player.currentTime(player.currentTime() + seekStep);
if (wasPlaying) player.play();
if (wasPlaying) {
player.play();
}
break;

// Volume control with the up/down arrow keys
Expand Down
4 changes: 2 additions & 2 deletions videojs.hotkeys.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 20af0a7

Please sign in to comment.