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

videojs-playlist

Package Overview
Dependencies
Maintainers
58
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

videojs-playlist - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1

7

CHANGELOG.md

@@ -0,1 +1,8 @@

<a name="4.2.1"></a>
## [4.2.1](https://github.com/brightcove/videojs-playlist/compare/v4.2.0...v4.2.1) (2018-06-13)
### Features
* Expose the version of the plugin at the `VERSION` property. ([#94](https://github.com/brightcove/videojs-playlist/issues/94)) ([d71dec1](https://github.com/brightcove/videojs-playlist/commit/d71dec1))
<a name="4.2.0"></a>

@@ -2,0 +9,0 @@ # [4.2.0](https://github.com/brightcove/videojs-playlist/compare/v4.1.1...v4.2.0) (2018-01-25)

12

dist/videojs-playlist.cjs.js

@@ -132,3 +132,9 @@ 'use strict';

if (replay) {
player.play();
var playPromise = player.play();
// silence error when a pause interrupts a play request
// on browsers which return a promise
if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') {
playPromise.then(null, function (e) {});
}
}

@@ -857,2 +863,4 @@

var version = "4.2.1";
// Video.js 5/6 cross-compatible.

@@ -877,2 +885,4 @@ var registerPlugin = videojs.registerPlugin || videojs.plugin;

plugin.VERSION = version;
module.exports = plugin;

@@ -128,3 +128,9 @@ import videojs from 'video.js';

if (replay) {
player.play();
var playPromise = player.play();
// silence error when a pause interrupts a play request
// on browsers which return a promise
if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') {
playPromise.then(null, function (e) {});
}
}

@@ -853,2 +859,4 @@

var version = "4.2.1";
// Video.js 5/6 cross-compatible.

@@ -873,2 +881,4 @@ var registerPlugin = videojs.registerPlugin || videojs.plugin;

plugin.VERSION = version;
export default plugin;
/**
* videojs-playlist
* @version 4.2.0
* @version 4.2.1
* @copyright 2018 Brightcove, Inc.

@@ -140,3 +140,9 @@ * @license Apache-2.0

if (replay) {
player.play();
var playPromise = player.play();
// silence error when a pause interrupts a play request
// on browsers which return a promise
if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') {
playPromise.then(null, function (e) {});
}
}

@@ -865,2 +871,4 @@

var version = "4.2.1";
// Video.js 5/6 cross-compatible.

@@ -885,4 +893,6 @@ var registerPlugin = videojs.registerPlugin || videojs.plugin;

plugin.VERSION = version;
return plugin;
})));

4

dist/videojs-playlist.min.js
/**
* videojs-playlist
* @version 4.2.0
* @version 4.2.1
* @copyright 2018 Brightcove, Inc.
* @license Apache-2.0
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],t):e.videojsPlaylist=t(e.videojs)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;var t=function(e){var t=e.playlist.autoadvance_;t.timeout&&e.clearTimeout(t.timeout),t.trigger&&e.off("ended",t.trigger),t.timeout=null,t.trigger=null},r=function l(e,r){var n;(t(e),"number"==typeof(n=r)&&!isNaN(n)&&n>=0&&n<Infinity)?(e.playlist.autoadvance_.delay=r,e.playlist.autoadvance_.trigger=function(){var n=function(){return l(e,r)};e.one("play",n),e.playlist.autoadvance_.timeout=e.setTimeout(function(){t(e),e.off("play",n),e.playlist.next()},1e3*r)},e.one("ended",e.playlist.autoadvance_.trigger)):e.playlist.autoadvance_.delay=null},n=function(e,t){var n=!e.paused()||e.ended();return e.trigger("beforeplaylistitem",t),e.poster(t.poster||""),e.src(t.sources),function(e){for(var t=e.remoteTextTracks(),r=t&&t.length||0;r--;)e.removeRemoteTextTrack(t[r])}(e),e.ready(function(){(t.textTracks||[]).forEach(e.addRemoteTextTrack.bind(e)),e.trigger("playlistitem",t),n&&e.play(),r(e,e.playlist.autoadvance_.delay)}),e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=(function(){function e(e){this.value=e}function t(t){var r,n;function o(r,n){try{var u=t[r](n),a=u.value;a instanceof e?Promise.resolve(a.value).then(function(e){o("next",e)},function(e){o("throw",e)}):i(u.done?"return":"normal",u.value)}catch(l){i("throw",l)}}function i(e,t){switch(e){case"return":r.resolve({value:t,done:!0});break;case"throw":r.reject(t);break;default:r.resolve({value:t,done:!1})}(r=r.next)?o(r.key,r.arg):n=null}this._invoke=function(e,t){return new Promise(function(i,u){var a={key:e,arg:t,resolve:i,reject:u,next:null};n?n=n.next=a:(r=n=a,o(e,t))})},"function"!=typeof t["return"]&&(this["return"]=undefined)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype["throw"]=function(e){return this._invoke("throw",e)},t.prototype["return"]=function(e){return this._invoke("return",e)}}(),function(e,t){for(var r=0;r<e.length;r++){var n=e[r].sources;if(Array.isArray(n))for(var i=0;i<n.length;i++){var u=n[i];if(u&&(c=void 0,f=void 0,c=a=u,f=l=t,"object"===(void 0===a?"undefined":o(a))&&(c=a.src),"object"===(void 0===l?"undefined":o(l))&&(f=l.src),/^\/\//.test(c)&&(f=f.slice(f.indexOf("//"))),/^\/\//.test(f)&&(c=c.slice(c.indexOf("//"))),c===f))return r}}var a,l,c,f;return-1}),u=function(e){for(var t=-1,r=e.length-1;++t<e.length;){var n=t+Math.floor(Math.random()*(r-t+1)),o=e[n];e[n]=e[t],e[t]=o}return e};var a=function(o,a){!function(o,a){var l=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0,c=null,f=!1,s=o.playlist=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;if(f)throw new Error("do not call playlist() during a playlist change");if(Array.isArray(e)){var r=Array.isArray(c)?c.slice():null;c=e.slice(),f=!0,o.trigger({type:"duringplaylistchange",nextIndex:t,nextPlaylist:c,previousIndex:s.currentIndex_,previousPlaylist:r||[]}),f=!1,-1!==t&&s.currentItem(t),r&&o.setTimeout(function(){o.trigger("playlistchange")},0)}return c.slice()};o.on("loadstart",function(){-1===s.currentItem()&&t(o)}),s.currentIndex_=-1,s.player_=o,s.autoadvance_={},s.repeat_=!1,s.currentItem=function(e){return f?s.currentIndex_:("number"==typeof e&&s.currentIndex_!==e&&e>=0&&e<c.length?(s.currentIndex_=e,n(s.player_,c[s.currentIndex_])):s.currentIndex_=s.indexOf(s.player_.currentSrc()||""),s.currentIndex_)},s.contains=function(e){return-1!==s.indexOf(e)},s.indexOf=function(e){if("string"==typeof e)return i(c,e);for(var t=Array.isArray(e)?e:e.sources,r=0;r<t.length;r++){var n=t[r];if("string"==typeof n)return i(c,n);if(n.src)return i(c,n.src)}return-1},s.currentIndex=function(){return s.currentItem()},s.lastIndex=function(){return c.length-1},s.nextIndex=function(){var e=s.currentItem();if(-1===e)return-1;var t=s.lastIndex();return s.repeat_&&e===t?0:Math.min(e+1,t)},s.previousIndex=function(){var e=s.currentItem();return-1===e?-1:s.repeat_&&0===e?s.lastIndex():Math.max(e-1,0)},s.first=function(){if(!f)return c.length?c[s.currentItem(0)]:void(s.currentIndex_=-1)},s.last=function(){if(!f)return c.length?c[s.currentItem(s.lastIndex())]:void(s.currentIndex_=-1)},s.next=function(){if(!f){var e=s.nextIndex();return e!==s.currentIndex_?c[s.currentItem(e)]:void 0}},s.previous=function(){if(!f){var e=s.previousIndex();return e!==s.currentIndex_?c[s.currentItem(e)]:void 0}},s.autoadvance=function(e){r(s.player_,e)},s.repeat=function(t){return t===undefined?s.repeat_:"boolean"==typeof t?(s.repeat_=!!t,s.repeat_):void e.log.error("videojs-playlist: Invalid value for repeat",t)},s.sort=function(e){c.length&&(c.sort(e),f||o.trigger("playlistsorted"))},s.reverse=function(){c.length&&(c.reverse(),f||o.trigger("playlistsorted"))},s.shuffle=function(){var e,t=(arguments.length>0&&arguments[0]!==undefined?arguments[0]:{}).rest,r=0,n=c;(t&&(r=s.currentIndex_+1,n=c.slice(r)),n.length<=1)||(u(n),t&&(e=c).splice.apply(e,[r,n.length].concat(n)),f||o.trigger("playlistsorted"))},Array.isArray(a)?s(a.slice(),l):c=[]}(this,o,a)};return(e.registerPlugin||e.plugin)("playlist",a),a});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],t):e.videojsPlaylist=t(e.videojs)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;var t=function(e){var t=e.playlist.autoadvance_;t.timeout&&e.clearTimeout(t.timeout),t.trigger&&e.off("ended",t.trigger),t.timeout=null,t.trigger=null},n=function l(e,n){var r;(t(e),"number"==typeof(r=n)&&!isNaN(r)&&r>=0&&r<Infinity)?(e.playlist.autoadvance_.delay=n,e.playlist.autoadvance_.trigger=function(){var r=function(){return l(e,n)};e.one("play",r),e.playlist.autoadvance_.timeout=e.setTimeout(function(){t(e),e.off("play",r),e.playlist.next()},1e3*n)},e.one("ended",e.playlist.autoadvance_.trigger)):e.playlist.autoadvance_.delay=null},r=function(e,t){var r=!e.paused()||e.ended();return e.trigger("beforeplaylistitem",t),e.poster(t.poster||""),e.src(t.sources),function(e){for(var t=e.remoteTextTracks(),n=t&&t.length||0;n--;)e.removeRemoteTextTrack(t[n])}(e),e.ready(function(){if((t.textTracks||[]).forEach(e.addRemoteTextTrack.bind(e)),e.trigger("playlistitem",t),r){var o=e.play();void 0!==o&&"function"==typeof o.then&&o.then(null,function(e){})}n(e,e.playlist.autoadvance_.delay)}),e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=(function(){function e(e){this.value=e}function t(t){var n,r;function o(n,r){try{var u=t[n](r),a=u.value;a instanceof e?Promise.resolve(a.value).then(function(e){o("next",e)},function(e){o("throw",e)}):i(u.done?"return":"normal",u.value)}catch(l){i("throw",l)}}function i(e,t){switch(e){case"return":n.resolve({value:t,done:!0});break;case"throw":n.reject(t);break;default:n.resolve({value:t,done:!1})}(n=n.next)?o(n.key,n.arg):r=null}this._invoke=function(e,t){return new Promise(function(i,u){var a={key:e,arg:t,resolve:i,reject:u,next:null};r?r=r.next=a:(n=r=a,o(e,t))})},"function"!=typeof t["return"]&&(this["return"]=undefined)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype["throw"]=function(e){return this._invoke("throw",e)},t.prototype["return"]=function(e){return this._invoke("return",e)}}(),function(e,t){for(var n=0;n<e.length;n++){var r=e[n].sources;if(Array.isArray(r))for(var i=0;i<r.length;i++){var u=r[i];if(u&&(c=void 0,f=void 0,c=a=u,f=l=t,"object"===(void 0===a?"undefined":o(a))&&(c=a.src),"object"===(void 0===l?"undefined":o(l))&&(f=l.src),/^\/\//.test(c)&&(f=f.slice(f.indexOf("//"))),/^\/\//.test(f)&&(c=c.slice(c.indexOf("//"))),c===f))return n}}var a,l,c,f;return-1}),u=function(e){for(var t=-1,n=e.length-1;++t<e.length;){var r=t+Math.floor(Math.random()*(n-t+1)),o=e[r];e[r]=e[t],e[t]=o}return e};var a=function(o,a){!function(o,a){var l=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0,c=null,f=!1,s=o.playlist=function(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;if(f)throw new Error("do not call playlist() during a playlist change");if(Array.isArray(e)){var n=Array.isArray(c)?c.slice():null;c=e.slice(),f=!0,o.trigger({type:"duringplaylistchange",nextIndex:t,nextPlaylist:c,previousIndex:s.currentIndex_,previousPlaylist:n||[]}),f=!1,-1!==t&&s.currentItem(t),n&&o.setTimeout(function(){o.trigger("playlistchange")},0)}return c.slice()};o.on("loadstart",function(){-1===s.currentItem()&&t(o)}),s.currentIndex_=-1,s.player_=o,s.autoadvance_={},s.repeat_=!1,s.currentItem=function(e){return f?s.currentIndex_:("number"==typeof e&&s.currentIndex_!==e&&e>=0&&e<c.length?(s.currentIndex_=e,r(s.player_,c[s.currentIndex_])):s.currentIndex_=s.indexOf(s.player_.currentSrc()||""),s.currentIndex_)},s.contains=function(e){return-1!==s.indexOf(e)},s.indexOf=function(e){if("string"==typeof e)return i(c,e);for(var t=Array.isArray(e)?e:e.sources,n=0;n<t.length;n++){var r=t[n];if("string"==typeof r)return i(c,r);if(r.src)return i(c,r.src)}return-1},s.currentIndex=function(){return s.currentItem()},s.lastIndex=function(){return c.length-1},s.nextIndex=function(){var e=s.currentItem();if(-1===e)return-1;var t=s.lastIndex();return s.repeat_&&e===t?0:Math.min(e+1,t)},s.previousIndex=function(){var e=s.currentItem();return-1===e?-1:s.repeat_&&0===e?s.lastIndex():Math.max(e-1,0)},s.first=function(){if(!f)return c.length?c[s.currentItem(0)]:void(s.currentIndex_=-1)},s.last=function(){if(!f)return c.length?c[s.currentItem(s.lastIndex())]:void(s.currentIndex_=-1)},s.next=function(){if(!f){var e=s.nextIndex();return e!==s.currentIndex_?c[s.currentItem(e)]:void 0}},s.previous=function(){if(!f){var e=s.previousIndex();return e!==s.currentIndex_?c[s.currentItem(e)]:void 0}},s.autoadvance=function(e){n(s.player_,e)},s.repeat=function(t){return t===undefined?s.repeat_:"boolean"==typeof t?(s.repeat_=!!t,s.repeat_):void e.log.error("videojs-playlist: Invalid value for repeat",t)},s.sort=function(e){c.length&&(c.sort(e),f||o.trigger("playlistsorted"))},s.reverse=function(){c.length&&(c.reverse(),f||o.trigger("playlistsorted"))},s.shuffle=function(){var e,t=(arguments.length>0&&arguments[0]!==undefined?arguments[0]:{}).rest,n=0,r=c;(t&&(n=s.currentIndex_+1,r=c.slice(n)),r.length<=1)||(u(r),t&&(e=c).splice.apply(e,[n,r.length].concat(r)),f||o.trigger("playlistsorted"))},Array.isArray(a)?s(a.slice(),l):c=[]}(this,o,a)};return(e.registerPlugin||e.plugin)("playlist",a),a.VERSION="4.2.1",a});
{
"name": "videojs-playlist",
"version": "4.2.0",
"version": "4.2.1",
"description": "Playlist plugin for Video.js",

@@ -5,0 +5,0 @@ "main": "dist/videojs-playlist.cjs.js",

@@ -8,2 +8,3 @@ /**

import commonjs from 'rollup-plugin-commonjs';
import json from 'rollup-plugin-json';
import multiEntry from 'rollup-plugin-multi-entry';

@@ -41,2 +42,3 @@ import resolve from 'rollup-plugin-node-resolve';

}),
json(),
commonjs({

@@ -43,0 +45,0 @@ sourceMap: false

@@ -45,3 +45,9 @@ import {setup} from './auto-advance.js';

if (replay) {
player.play();
const playPromise = player.play();
// silence error when a pause interrupts a play request
// on browsers which return a promise
if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') {
playPromise.then(null, (e) => {});
}
}

@@ -48,0 +54,0 @@

import videojs from 'video.js';
import playlistMaker from './playlist-maker';
import {version as VERSION} from '../package.json';

@@ -23,2 +24,4 @@ // Video.js 5/6 cross-compatible.

plugin.VERSION = VERSION;
export default plugin;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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