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

videojs-vjsdownload

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

videojs-vjsdownload - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

15

dist-test/videojs-vjsdownload.js

@@ -9,6 +9,8 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

var doccy;
if (typeof document !== 'undefined') {
module.exports = document;
doccy = document;
} else {
var doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];
doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];

@@ -18,6 +20,6 @@ if (!doccy) {

}
module.exports = doccy;
}
module.exports = doccy;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

@@ -50,3 +52,4 @@ },{"min-document":1}],3:[function(require,module,exports){

textControl: 'Download video',
name: 'downloadButton'
name: 'downloadButton',
downloadURL: null
};

@@ -100,3 +103,3 @@

window.open(p.currentSrc(), 'Download');
window.open(this.options_.downloadURL || p.currentSrc(), 'Download');
p.trigger('downloadvideo');

@@ -103,0 +106,0 @@ }

9

dist/videojs-vjsdownload.js
/**
* videojs-vjsdownload
* @version 1.0.3
* @copyright 2018 7Ds7
* @version 1.0.4
* @copyright 2019 7Ds7
* @license Apache-2.0

@@ -33,3 +33,4 @@ */

textControl: 'Download video',
name: 'downloadButton'
name: 'downloadButton',
downloadURL: null
};

@@ -83,3 +84,3 @@

window.open(p.currentSrc(), 'Download');
window.open(this.options_.downloadURL || p.currentSrc(), 'Download');
p.trigger('downloadvideo');

@@ -86,0 +87,0 @@ }

/**
* videojs-vjsdownload
* @version 1.0.3
* @copyright 2018 7Ds7
* @version 1.0.4
* @copyright 2019 7Ds7
* @license Apache-2.0
*/
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.videojsVjsdownload=e()}}(function(){return function e(t,o,n){function r(l,u){if(!o[l]){if(!t[l]){var f="function"==typeof require&&require;if(!u&&f)return f(l,!0);if(i)return i(l,!0);var a=new Error("Cannot find module '"+l+"'");throw a.code="MODULE_NOT_FOUND",a}var d=o[l]={exports:{}};t[l][0].call(d.exports,function(e){var o=t[l][1][e];return r(o||e)},d,d.exports,e,t,o,n)}return o[l].exports}for(var i="function"==typeof require&&require,l=0;l<n.length;l++)r(n[l]);return r}({1:[function(e,t,o){(function(e){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(o,"__esModule",{value:!0});var i=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),l=function(e,t,o){for(var n=!0;n;){var r=e,i=t,l=o;n=!1,null===r&&(r=Function.prototype);var u=Object.getOwnPropertyDescriptor(r,i);if(void 0!==u){if("value"in u)return u.value;var f=u.get;if(void 0===f)return;return f.call(l)}var a=Object.getPrototypeOf(r);if(null===a)return;e=a,t=i,o=l,n=!0,u=a=void 0}},u="undefined"!=typeof window?window.videojs:void 0!==e?e.videojs:null,f=function(e){return e&&e.__esModule?e:{default:e}}(u),a={beforeElement:"fullscreenToggle",textControl:"Download video",name:"downloadButton"},d=f.default.getComponent("Button"),c=function(e){function t(){n(this,t),l(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),i(t,[{key:"buildCSSClass",value:function(){return"vjs-vjsdownload "+l(Object.getPrototypeOf(t.prototype),"buildCSSClass",this).call(this)}},{key:"handleClick",value:function(){var e=this.player();window.open(e.currentSrc(),"Download"),e.trigger("downloadvideo")}}]),t}(d),s=function(e,t){var o=e.controlBar.addChild(new c(e,t),{});o.controlText(t.textControl),e.controlBar.el().insertBefore(o.el(),e.controlBar.getChild(t.beforeElement).el()),e.addClass("vjs-vjsdownload")},p=function(e){var t=this;this.ready(function(){s(t,f.default.mergeOptions(a,e))})};f.default.registerPlugin("vjsdownload",p),o.default=p,t.exports=o.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.videojsVjsdownload=e()}}(function(){return function e(t,o,n){function r(l,u){if(!o[l]){if(!t[l]){var f="function"==typeof require&&require;if(!u&&f)return f(l,!0);if(i)return i(l,!0);var a=new Error("Cannot find module '"+l+"'");throw a.code="MODULE_NOT_FOUND",a}var d=o[l]={exports:{}};t[l][0].call(d.exports,function(e){var o=t[l][1][e];return r(o||e)},d,d.exports,e,t,o,n)}return o[l].exports}for(var i="function"==typeof require&&require,l=0;l<n.length;l++)r(n[l]);return r}({1:[function(e,t,o){(function(e){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(o,"__esModule",{value:!0});var i=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),l=function(e,t,o){for(var n=!0;n;){var r=e,i=t,l=o;n=!1,null===r&&(r=Function.prototype);var u=Object.getOwnPropertyDescriptor(r,i);if(void 0!==u){if("value"in u)return u.value;var f=u.get;if(void 0===f)return;return f.call(l)}var a=Object.getPrototypeOf(r);if(null===a)return;e=a,t=i,o=l,n=!0,u=a=void 0}},u="undefined"!=typeof window?window.videojs:void 0!==e?e.videojs:null,f=function(e){return e&&e.__esModule?e:{default:e}}(u),a={beforeElement:"fullscreenToggle",textControl:"Download video",name:"downloadButton",downloadURL:null},d=f.default.getComponent("Button"),c=function(e){function t(){n(this,t),l(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return r(t,e),i(t,[{key:"buildCSSClass",value:function(){return"vjs-vjsdownload "+l(Object.getPrototypeOf(t.prototype),"buildCSSClass",this).call(this)}},{key:"handleClick",value:function(){var e=this.player();window.open(this.options_.downloadURL||e.currentSrc(),"Download"),e.trigger("downloadvideo")}}]),t}(d),s=function(e,t){var o=e.controlBar.addChild(new c(e,t),{});o.controlText(t.textControl),e.controlBar.el().insertBefore(o.el(),e.controlBar.getChild(t.beforeElement).el()),e.addClass("vjs-vjsdownload")},p=function(e){var t=this;this.ready(function(){s(t,f.default.mergeOptions(a,e))})};f.default.registerPlugin("vjsdownload",p),o.default=p,t.exports=o.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});

@@ -25,3 +25,4 @@ 'use strict';

textControl: 'Download video',
name: 'downloadButton'
name: 'downloadButton',
downloadURL: null
};

@@ -75,3 +76,3 @@

window.open(p.currentSrc(), 'Download');
window.open(this.options_.downloadURL || p.currentSrc(), 'Download');
p.trigger('downloadvideo');

@@ -78,0 +79,0 @@ }

{
"name": "videojs-vjsdownload",
"version": "1.0.3",
"version": "1.0.4",
"description": "downloads video",

@@ -85,3 +85,3 @@ "main": "es5/plugin.js",

"dependencies": {
"video.js": "^6.7.4"
"video.js": "^7.4.1"
},

@@ -88,0 +88,0 @@ "devDependencies": {

@@ -5,2 +5,10 @@ # videojs-vjsdownload

## Demo
https://7ds7.github.io/videojs-vjsdownload/
or
https://codepen.io/binaryunit/pen/BMpegv
## Usage

@@ -21,3 +29,4 @@ Include the plugin files

textControl: 'Download video',
name: 'downloadButton'
name: 'downloadButton',
downloadURL: 'https://video_url.mp4' //optional if you need a different download url than the source
}

@@ -24,0 +33,0 @@ }

@@ -7,3 +7,4 @@ import videojs from 'video.js';

textControl: 'Download video',
name: 'downloadButton'
name: 'downloadButton',
downloadURL: null
};

@@ -33,3 +34,3 @@

window.open(p.currentSrc(), 'Download');
window.open(this.options_.downloadURL || p.currentSrc(), 'Download');
p.trigger('downloadvideo');

@@ -36,0 +37,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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