Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

videojs-hotkeys

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

videojs-hotkeys - npm Package Compare versions

Comparing version 0.2.7 to 0.2.8

build/videojs.hotkeys.min.js

2

package.json
{
"name": "videojs-hotkeys",
"version": "0.2.7",
"version": "0.2.8",
"description": "Adds more hotkey support to video.js",

@@ -5,0 +5,0 @@ "main": "videojs.hotkeys.min.js",

@@ -12,18 +12,4 @@ /*

window['videojs_hotkeys'] = { version: "0.2.7" };
window['videojs_hotkeys'] = { version: "0.2.8" };
// Copies properties from one or more objects onto an original.
var extend = function(obj /*, arg1, arg2, ... */ ) {
var arg, i, k;
for (i = 1; i < arguments.length; i++) {
arg = arguments[i];
for (k in arg) {
if (arg.hasOwnProperty(k)) {
obj[k] = arg[k];
}
}
}
return obj;
};
var hotkeys = function(options) {

@@ -41,3 +27,5 @@ var player = this;

options = extend({}, def_options, options || {});
// Use built-in merge function from Video.js v5.0+ or v4.4.0+
var mergeOptions = videojs.mergeOptions || videojs.util.mergeOptions;
options = mergeOptions(def_options, options || {});

@@ -65,3 +53,2 @@ var volumeStep = options.volumeStep;

// Fix allowing the YouTube plugin to have hotkey support.
var ifblocker = player.el().querySelector('.iframeblocker');

@@ -68,0 +55,0 @@ if (ifblocker && ifblocker.style.display === '') {

@@ -1,2 +0,2 @@

/* videojs-hotkeys v0.2.7 - https://github.com/ctd1500/videojs-hotkeys */
!function(a,b){"use strict";a.videojs_hotkeys={version:"0.2.7"};var c=function(a){var b,c,d;for(c=1;c<arguments.length;c++){b=arguments[c];for(d in b)b.hasOwnProperty(d)&&(a[d]=b[d])}return a},d=function(a){var b=this,d={volumeStep:.1,seekStep:5,enableMute:!0,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1};a=c({},d,a||{});var e=a.volumeStep,f=a.seekStep,g=a.enableMute,h=a.enableFullscreen,i=a.enableNumbers,j=a.enableJogStyle,k=a.alwaysCaptureHotkeys;b.el().hasAttribute("tabIndex")||b.el().setAttribute("tabIndex","-1"),k&&b.one("play",function(){b.el().focus()}),b.on("play",function(){var a=b.el().querySelector(".iframeblocker");a&&""===a.style.display&&(a.style.display="block",a.style.bottom="39px")});var l=function(a){var c,d=a.which;if(b.controls()){var l=document.activeElement;if(k||l==b.el()||l==b.el().querySelector(".vjs-tech")||l==b.el().querySelector(".vjs-control-bar")||l==b.el().querySelector(".iframeblocker"))switch(d){case 32:a.preventDefault(),k&&a.stopPropagation(),b.paused()?b.play():b.pause();break;case 37:a.preventDefault(),c=b.currentTime()-f,b.currentTime()<=f&&(c=0),b.currentTime(c);break;case 39:a.preventDefault(),b.currentTime(b.currentTime()+f);break;case 40:a.preventDefault(),j?(c=b.currentTime()-1,b.currentTime()<=1&&(c=0),b.currentTime(c)):b.volume(b.volume()-e);break;case 38:a.preventDefault(),j?b.currentTime(b.currentTime()+1):b.volume(b.volume()+e);break;case 77:g&&(b.muted()?b.muted(!1):b.muted(!0));break;case 70:h&&(b.isFullscreen()?b.exitFullscreen():b.requestFullscreen());break;default:if((d>47&&59>d||d>95&&106>d)&&i){var m=48;d>95&&(m=96);var n=d-m;a.preventDefault(),b.currentTime(b.duration()*n*.1)}}}},m=function(a){if(b.controls()){var c=a.relatedTarget||a.toElement||document.activeElement;(c==b.el()||c==b.el().querySelector(".vjs-tech")||c==b.el().querySelector(".iframeblocker"))&&h&&(b.isFullscreen()?b.exitFullscreen():b.requestFullscreen())}};return b.on("keydown",l),b.on("dblclick",m),this};b.plugin("hotkeys",d)}(window,window.videojs);
/* videojs-hotkeys v0.2.8 - https://github.com/ctd1500/videojs-hotkeys */
!function(a,b){"use strict";a.videojs_hotkeys={version:"0.2.8"};var c=function(a){var c=this,d={volumeStep:.1,seekStep:5,enableMute:!0,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1},e=b.mergeOptions||b.util.mergeOptions;a=e(d,a||{});var f=a.volumeStep,g=a.seekStep,h=a.enableMute,i=a.enableFullscreen,j=a.enableNumbers,k=a.enableJogStyle,l=a.alwaysCaptureHotkeys;c.el().hasAttribute("tabIndex")||c.el().setAttribute("tabIndex","-1"),l&&c.one("play",function(){c.el().focus()}),c.on("play",function(){var a=c.el().querySelector(".iframeblocker");a&&""===a.style.display&&(a.style.display="block",a.style.bottom="39px")});var m=function(a){var b,d=a.which;if(c.controls()){var e=document.activeElement;if(l||e==c.el()||e==c.el().querySelector(".vjs-tech")||e==c.el().querySelector(".vjs-control-bar")||e==c.el().querySelector(".iframeblocker"))switch(d){case 32:a.preventDefault(),l&&a.stopPropagation(),c.paused()?c.play():c.pause();break;case 37:a.preventDefault(),b=c.currentTime()-g,c.currentTime()<=g&&(b=0),c.currentTime(b);break;case 39:a.preventDefault(),c.currentTime(c.currentTime()+g);break;case 40:a.preventDefault(),k?(b=c.currentTime()-1,c.currentTime()<=1&&(b=0),c.currentTime(b)):c.volume(c.volume()-f);break;case 38:a.preventDefault(),k?c.currentTime(c.currentTime()+1):c.volume(c.volume()+f);break;case 77:h&&(c.muted()?c.muted(!1):c.muted(!0));break;case 70:i&&(c.isFullscreen()?c.exitFullscreen():c.requestFullscreen());break;default:if((d>47&&59>d||d>95&&106>d)&&j){var m=48;d>95&&(m=96);var n=d-m;a.preventDefault(),c.currentTime(c.duration()*n*.1)}}}},n=function(a){if(c.controls()){var b=a.relatedTarget||a.toElement||document.activeElement;(b==c.el()||b==c.el().querySelector(".vjs-tech")||b==c.el().querySelector(".iframeblocker"))&&i&&(c.isFullscreen()?c.exitFullscreen():c.requestFullscreen())}};return c.on("keydown",m),c.on("dblclick",n),this};b.plugin("hotkeys",c)}(window,window.videojs);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc