videojs-hotkeys
Advanced tools
Comparing version 0.2.9 to 0.2.10
@@ -1,3 +0,3 @@ | ||
/* videojs-hotkeys v0.2.9 - https://github.com/ctd1500/videojs-hotkeys */ | ||
!function(a,b){"function"==typeof define&&define.amd?define([],b.bind(this,a,a.videojs)):"undefined"!=typeof module&&module.exports?module.exports=b(a,a.videojs):b(a,a.videojs)}(this,function(a,b){"use strict";a.videojs_hotkeys={version:"0.2.9"};var c=function(a){function c(a){return 32===a.which}function d(a){return 37===a.which}function e(a){return 39===a.which}function f(a){return 38===a.which}function g(a){return 40===a.which}function h(a){return 77===a.which}function i(a){return 70===a.which}var j=this,k=j.el(),l={volumeStep:.1,seekStep:5,enableMute:!0,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,playPauseKey:c,rewindKey:d,forwardKey:e,volumeUpKey:f,volumeDownKey:g,muteKey:h,fullscreenKey:i,customKeys:{}};const m=1,n=2,o=3,p=4,q=5,r=6,s=7;var t=b.mergeOptions||b.util.mergeOptions;a=t(l,a||{});var u=a.volumeStep,v=a.seekStep,w=a.enableMute,x=a.enableFullscreen,y=a.enableNumbers,z=a.enableJogStyle,A=a.alwaysCaptureHotkeys;k.hasAttribute("tabIndex")||k.setAttribute("tabIndex","-1"),A&&j.one("play",function(){k.focus()}),j.on("play",function(){var a=k.querySelector(".iframeblocker");a&&""===a.style.display&&(a.style.display="block",a.style.bottom="39px")});var B=function(b){var c,d=b.which,e=b.preventDefault;if(j.controls()){var f=document.activeElement;if(A||f==k||f==k.querySelector(".vjs-tech")||f==k.querySelector(".vjs-control-bar")||f==k.querySelector(".iframeblocker"))switch(D(b,j)){case m:e(),A&&b.stopPropagation(),j.paused()?j.play():j.pause();break;case n:e(),c=j.currentTime()-v,j.currentTime()<=v&&(c=0),j.currentTime(c);break;case o:e(),j.currentTime(j.currentTime()+v);break;case q:e(),z?(c=j.currentTime()-1,j.currentTime()<=1&&(c=0),j.currentTime(c)):j.volume(j.volume()-u);break;case p:e(),z?j.currentTime(j.currentTime()+1):j.volume(j.volume()+u);break;case r:w&&j.muted(!j.muted());break;case s:x&&(j.isFullscreen()?j.exitFullscreen():j.requestFullscreen());break;default:if((d>47&&59>d||d>95&&106>d)&&y){var g=48;d>95&&(g=96);var h=d-g;e(),j.currentTime(j.duration()*h*.1)}for(var i in a.customKeys){var l=a.customKeys[i];l&&l.key&&l.handler&&l.key(b)&&(e(),l.handler(j,a))}}}},C=function(a){if(j.controls()){var b=a.relatedTarget||a.toElement||document.activeElement;(b==k||b==k.querySelector(".vjs-tech")||b==k.querySelector(".iframeblocker"))&&x&&(j.isFullscreen()?j.exitFullscreen():j.requestFullscreen())}},D=function(b,c){return a.playPauseKey(b,c)?m:a.rewindKey(b,c)?n:a.forwardKey(b,c)?o:a.volumeUpKey(b,c)?p:a.volumeDownKey(b,c)?q:a.muteKey(b,c)?r:a.fullscreenKey(b,c)?s:void 0};return j.on("keydown",B),j.on("dblclick",C),this};b.plugin("hotkeys",c)}); | ||
/* videojs-hotkeys v0.2.10 - https://github.com/ctd1500/videojs-hotkeys */ | ||
!function(a,b){"function"==typeof define&&define.amd?define([],b.bind(this,a,a.videojs)):"undefined"!=typeof module&&module.exports?module.exports=b(a,a.videojs):b(a,a.videojs)}(this,function(a,b){"use strict";a.videojs_hotkeys={version:"0.2.10"};var c=function(a){function c(a){return 32===a.which}function d(a){return 37===a.which}function e(a){return 39===a.which}function f(a){return 38===a.which}function g(a){return 40===a.which}function h(a){return 77===a.which}function i(a){return 70===a.which}var j=this,k=j.el(),l={volumeStep:.1,seekStep:5,enableMute:!0,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,playPauseKey:c,rewindKey:d,forwardKey:e,volumeUpKey:f,volumeDownKey:g,muteKey:h,fullscreenKey:i,customKeys:{}},m=1,n=2,o=3,p=4,q=5,r=6,s=7,t=b.mergeOptions||b.util.mergeOptions;a=t(l,a||{});var u=a.volumeStep,v=a.seekStep,w=a.enableMute,x=a.enableFullscreen,y=a.enableNumbers,z=a.enableJogStyle,A=a.alwaysCaptureHotkeys;k.hasAttribute("tabIndex")||k.setAttribute("tabIndex","-1"),A&&j.one("play",function(){k.focus()}),j.on("play",function(){var a=k.querySelector(".iframeblocker");a&&""===a.style.display&&(a.style.display="block",a.style.bottom="39px")});var B=function(b){var c,d=b.which,e=b.preventDefault;if(j.controls()){var f=document.activeElement;if(A||f==k||f==k.querySelector(".vjs-tech")||f==k.querySelector(".vjs-control-bar")||f==k.querySelector(".iframeblocker"))switch(D(b,j)){case m:e(),A&&b.stopPropagation(),j.paused()?j.play():j.pause();break;case n:e(),c=j.currentTime()-v,j.currentTime()<=v&&(c=0),j.currentTime(c);break;case o:e(),j.currentTime(j.currentTime()+v);break;case q:e(),z?(c=j.currentTime()-1,j.currentTime()<=1&&(c=0),j.currentTime(c)):j.volume(j.volume()-u);break;case p:e(),z?j.currentTime(j.currentTime()+1):j.volume(j.volume()+u);break;case r:w&&j.muted(!j.muted());break;case s:x&&(j.isFullscreen()?j.exitFullscreen():j.requestFullscreen());break;default:if((d>47&&59>d||d>95&&106>d)&&y){var g=48;d>95&&(g=96);var h=d-g;e(),j.currentTime(j.duration()*h*.1)}for(var i in a.customKeys){var l=a.customKeys[i];l&&l.key&&l.handler&&l.key(b)&&(e(),l.handler(j,a))}}}},C=function(a){if(j.controls()){var b=a.relatedTarget||a.toElement||document.activeElement;(b==k||b==k.querySelector(".vjs-tech")||b==k.querySelector(".iframeblocker"))&&x&&(j.isFullscreen()?j.exitFullscreen():j.requestFullscreen())}},D=function(b,c){return a.playPauseKey(b,c)?m:a.rewindKey(b,c)?n:a.forwardKey(b,c)?o:a.volumeUpKey(b,c)?p:a.volumeDownKey(b,c)?q:a.muteKey(b,c)?r:a.fullscreenKey(b,c)?s:void 0};return j.on("keydown",B),j.on("dblclick",C),this};b.plugin("hotkeys",c)}); | ||
//# sourceMappingURL=videojs.hotkeys.min.js.map |
@@ -80,3 +80,3 @@ module.exports = function(grunt) { | ||
m = m.replace(/(version: ")\d\.\d(\.\d)?(")/g, '$1' + version + '$3'); | ||
m = m.replace(/(version: ")\d+\.\d+(\.\d+)?(")/g, '$1' + version + '$3'); | ||
grunt.file.write(baseName + '.js', m); | ||
@@ -91,7 +91,7 @@ }); | ||
version = version.replace(/(\d\.\d)\.\d/, '$1'); | ||
version = version.replace(/(\d+\.\d+)\.\d+/, '$1'); | ||
rm = rm.replace(/(\/\/cdn\.sc\.gl\/videojs-hotkeys\/)\d\.\d(\.\d)?/g, '$1' + version); | ||
rm = rm.replace(/(\/\/cdn\.sc\.gl\/videojs-hotkeys\/)\d+\.\d+(\.\d+)?/g, '$1' + version); | ||
grunt.file.write('README.md', rm); | ||
}); | ||
}; |
{ | ||
"name": "videojs-hotkeys", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"description": "Adds more hotkey support to video.js", | ||
@@ -5,0 +5,0 @@ "main": "videojs.hotkeys.min.js", |
@@ -20,3 +20,3 @@ /* | ||
"use strict"; | ||
window['videojs_hotkeys'] = { version: "0.2.9" }; | ||
window['videojs_hotkeys'] = { version: "0.2.10" }; | ||
@@ -44,3 +44,3 @@ var hotkeys = function(options) { | ||
const cPlay = 1, | ||
var cPlay = 1, | ||
cRewind = 2, | ||
@@ -47,0 +47,0 @@ cForward = 3, |
@@ -1,2 +0,2 @@ | ||
/* videojs-hotkeys v0.2.9 - https://github.com/ctd1500/videojs-hotkeys */ | ||
!function(a,b){"function"==typeof define&&define.amd?define([],b.bind(this,a,a.videojs)):"undefined"!=typeof module&&module.exports?module.exports=b(a,a.videojs):b(a,a.videojs)}(this,function(a,b){"use strict";a.videojs_hotkeys={version:"0.2.9"};var c=function(a){function c(a){return 32===a.which}function d(a){return 37===a.which}function e(a){return 39===a.which}function f(a){return 38===a.which}function g(a){return 40===a.which}function h(a){return 77===a.which}function i(a){return 70===a.which}var j=this,k=j.el(),l={volumeStep:.1,seekStep:5,enableMute:!0,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,playPauseKey:c,rewindKey:d,forwardKey:e,volumeUpKey:f,volumeDownKey:g,muteKey:h,fullscreenKey:i,customKeys:{}};const m=1,n=2,o=3,p=4,q=5,r=6,s=7;var t=b.mergeOptions||b.util.mergeOptions;a=t(l,a||{});var u=a.volumeStep,v=a.seekStep,w=a.enableMute,x=a.enableFullscreen,y=a.enableNumbers,z=a.enableJogStyle,A=a.alwaysCaptureHotkeys;k.hasAttribute("tabIndex")||k.setAttribute("tabIndex","-1"),A&&j.one("play",function(){k.focus()}),j.on("play",function(){var a=k.querySelector(".iframeblocker");a&&""===a.style.display&&(a.style.display="block",a.style.bottom="39px")});var B=function(b){var c,d=b.which,e=b.preventDefault;if(j.controls()){var f=document.activeElement;if(A||f==k||f==k.querySelector(".vjs-tech")||f==k.querySelector(".vjs-control-bar")||f==k.querySelector(".iframeblocker"))switch(D(b,j)){case m:e(),A&&b.stopPropagation(),j.paused()?j.play():j.pause();break;case n:e(),c=j.currentTime()-v,j.currentTime()<=v&&(c=0),j.currentTime(c);break;case o:e(),j.currentTime(j.currentTime()+v);break;case q:e(),z?(c=j.currentTime()-1,j.currentTime()<=1&&(c=0),j.currentTime(c)):j.volume(j.volume()-u);break;case p:e(),z?j.currentTime(j.currentTime()+1):j.volume(j.volume()+u);break;case r:w&&j.muted(!j.muted());break;case s:x&&(j.isFullscreen()?j.exitFullscreen():j.requestFullscreen());break;default:if((d>47&&59>d||d>95&&106>d)&&y){var g=48;d>95&&(g=96);var h=d-g;e(),j.currentTime(j.duration()*h*.1)}for(var i in a.customKeys){var l=a.customKeys[i];l&&l.key&&l.handler&&l.key(b)&&(e(),l.handler(j,a))}}}},C=function(a){if(j.controls()){var b=a.relatedTarget||a.toElement||document.activeElement;(b==k||b==k.querySelector(".vjs-tech")||b==k.querySelector(".iframeblocker"))&&x&&(j.isFullscreen()?j.exitFullscreen():j.requestFullscreen())}},D=function(b,c){return a.playPauseKey(b,c)?m:a.rewindKey(b,c)?n:a.forwardKey(b,c)?o:a.volumeUpKey(b,c)?p:a.volumeDownKey(b,c)?q:a.muteKey(b,c)?r:a.fullscreenKey(b,c)?s:void 0};return j.on("keydown",B),j.on("dblclick",C),this};b.plugin("hotkeys",c)}); | ||
/* videojs-hotkeys v0.2.10 - https://github.com/ctd1500/videojs-hotkeys */ | ||
!function(a,b){"function"==typeof define&&define.amd?define([],b.bind(this,a,a.videojs)):"undefined"!=typeof module&&module.exports?module.exports=b(a,a.videojs):b(a,a.videojs)}(this,function(a,b){"use strict";a.videojs_hotkeys={version:"0.2.10"};var c=function(a){function c(a){return 32===a.which}function d(a){return 37===a.which}function e(a){return 39===a.which}function f(a){return 38===a.which}function g(a){return 40===a.which}function h(a){return 77===a.which}function i(a){return 70===a.which}var j=this,k=j.el(),l={volumeStep:.1,seekStep:5,enableMute:!0,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,playPauseKey:c,rewindKey:d,forwardKey:e,volumeUpKey:f,volumeDownKey:g,muteKey:h,fullscreenKey:i,customKeys:{}},m=1,n=2,o=3,p=4,q=5,r=6,s=7,t=b.mergeOptions||b.util.mergeOptions;a=t(l,a||{});var u=a.volumeStep,v=a.seekStep,w=a.enableMute,x=a.enableFullscreen,y=a.enableNumbers,z=a.enableJogStyle,A=a.alwaysCaptureHotkeys;k.hasAttribute("tabIndex")||k.setAttribute("tabIndex","-1"),A&&j.one("play",function(){k.focus()}),j.on("play",function(){var a=k.querySelector(".iframeblocker");a&&""===a.style.display&&(a.style.display="block",a.style.bottom="39px")});var B=function(b){var c,d=b.which,e=b.preventDefault;if(j.controls()){var f=document.activeElement;if(A||f==k||f==k.querySelector(".vjs-tech")||f==k.querySelector(".vjs-control-bar")||f==k.querySelector(".iframeblocker"))switch(D(b,j)){case m:e(),A&&b.stopPropagation(),j.paused()?j.play():j.pause();break;case n:e(),c=j.currentTime()-v,j.currentTime()<=v&&(c=0),j.currentTime(c);break;case o:e(),j.currentTime(j.currentTime()+v);break;case q:e(),z?(c=j.currentTime()-1,j.currentTime()<=1&&(c=0),j.currentTime(c)):j.volume(j.volume()-u);break;case p:e(),z?j.currentTime(j.currentTime()+1):j.volume(j.volume()+u);break;case r:w&&j.muted(!j.muted());break;case s:x&&(j.isFullscreen()?j.exitFullscreen():j.requestFullscreen());break;default:if((d>47&&59>d||d>95&&106>d)&&y){var g=48;d>95&&(g=96);var h=d-g;e(),j.currentTime(j.duration()*h*.1)}for(var i in a.customKeys){var l=a.customKeys[i];l&&l.key&&l.handler&&l.key(b)&&(e(),l.handler(j,a))}}}},C=function(a){if(j.controls()){var b=a.relatedTarget||a.toElement||document.activeElement;(b==k||b==k.querySelector(".vjs-tech")||b==k.querySelector(".iframeblocker"))&&x&&(j.isFullscreen()?j.exitFullscreen():j.requestFullscreen())}},D=function(b,c){return a.playPauseKey(b,c)?m:a.rewindKey(b,c)?n:a.forwardKey(b,c)?o:a.volumeUpKey(b,c)?p:a.volumeDownKey(b,c)?q:a.muteKey(b,c)?r:a.fullscreenKey(b,c)?s:void 0};return j.on("keydown",B),j.on("dblclick",C),this};b.plugin("hotkeys",c)}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28879
11
389