Fix shiftKey for player hotkeys

This commit is contained in:
Omar Roth 2019-04-19 09:20:41 -05:00
parent 0372ff0c2c
commit eac0a52f10

View file

@ -99,7 +99,7 @@ var player = videojs("player", options, function() {
return e.which === 74; return e.which === 74;
}, },
handler: function(player, options, e) { handler: function(player, options, e) {
player.currentTime(player.currentTime() - 5); player.currentTime(player.currentTime() - 10);
} }
}, },
// Go forward 5 seconds // Go forward 5 seconds
@ -108,13 +108,13 @@ var player = videojs("player", options, function() {
return e.which === 76; return e.which === 76;
}, },
handler: function(player, options, e) { handler: function(player, options, e) {
player.currentTime(player.currentTime() + 5); player.currentTime(player.currentTime() + 10);
} }
}, },
// Increase speed // Increase speed
increase_speed: { increase_speed: {
key: function(e) { key: function(e) {
return e.which === 190; return (e.which === 190 && e.shiftKey);
}, },
handler: function(player, _, e) { handler: function(player, _, e) {
size = options.playbackRates.length; size = options.playbackRates.length;
@ -125,7 +125,7 @@ var player = videojs("player", options, function() {
// Decrease speed // Decrease speed
decrease_speed: { decrease_speed: {
key: function(e) { key: function(e) {
return e.which === 188; return (e.which === 188 && e.shiftKey);
}, },
handler: function(player, _, e) { handler: function(player, _, e) {
size = options.playbackRates.length; size = options.playbackRates.length;