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

videojs-playlist-ui

Package Overview
Dependencies
Maintainers
4
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

videojs-playlist-ui - npm Package Compare versions

Comparing version 2.3.2 to 2.3.3

10

dist/videojs-playlist-ui.js

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

/*! videojs-playlist-ui - v2.3.2 - 2017-02-10
/*! videojs-playlist-ui - v2.3.3 - 2017-03-24
* Copyright (c) 2017 Brightcove; Licensed Apache-2.0 */

@@ -151,4 +151,4 @@

value: function addPlayIcon_() {
videojs.addClass(this.thumbnail, "vjs-icon-play");
videojs.removeClass(this.thumbnail, "vjs-playlist-now-playing");
dom.addClass(this.thumbnail, "vjs-icon-play");
dom.removeClass(this.thumbnail, "vjs-playlist-now-playing");
}

@@ -162,5 +162,5 @@ },

videojs.removeClass(this.thumbnail, "vjs-icon-play");
dom.removeClass(this.thumbnail, "vjs-icon-play");
if (this.hasClass("vjs-selected")) {
videojs.addClass(this.thumbnail, "vjs-playlist-now-playing");
dom.addClass(this.thumbnail, "vjs-playlist-now-playing");
}

@@ -167,0 +167,0 @@ }

@@ -1,3 +0,3 @@

/*! videojs-playlist-ui - v2.3.2 - 2017-02-10
/*! videojs-playlist-ui - v2.3.3 - 2017-03-24
* Copyright (c) 2017 Brightcove; Licensed Apache-2.0 */
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(){(function(a){"use strict";var b=function(a){return a&&a.__esModule?a["default"]:a},c=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),d=function t(a,b,c){var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:t(e,b,c)}if("value"in d&&d.writable)return d.value;var f=d.get;return void 0===f?void 0:f.call(c)},e=function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(a.__proto__=b)},f=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},g=b("undefined"!=typeof window?window.videojs:"undefined"!=typeof a?a.videojs:null),h=g.dom||g,i=g.registerPlugin||g.plugin,j=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},k=function(){var a=document.createElement("x");return a.style.cssText="pointer-events:auto","auto"===a.style.pointerEvents}(),l={className:"vjs-playlist",playOnSelect:!1,supportsCssPointerEvents:k},m=function(a){a.addClass("vjs-selected")},n=function(a){a.removeClass("vjs-selected"),a.thumbnail&&h.removeClass(a.thumbnail,"vjs-playlist-now-playing")},o=function(a){if(!a){var b=document.createElement("div");return b.className="vjs-playlist-thumbnail",b}var c=document.createElement("picture");if(c.className="vjs-playlist-thumbnail","string"==typeof a){var d=document.createElement("img");d.src=a,c.appendChild(d)}else{for(var e=0;e<a.length-1;e++){var f=a[e],g=document.createElement("source");for(var h in f)g[h]=f[h];c.appendChild(g)}var i=a[a.length-1],d=document.createElement("img");for(var h in i)d[h]=i[h];c.appendChild(d)}return c},p=g.getComponent("Component"),q=function(a){function b(a,c,e){if(f(this,b),!c.item)throw new Error("Cannot construct a PlaylistMenuItem without an item option");d(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,a,c),this.item=c.item,this.playOnSelect=e.playOnSelect,this.emitTapEvents(),this.on(["click","tap"],this.switchPlaylistItem_),this.on("keydown",this.handleKeyDown_),this.on(["focus","mouseover"],this.addPlayIcon_),this.on(["blur","mouseout"],this.removePlayIcon_)}return e(b,a),c(b,{handleKeyDown_:{value:function(a){(13===a.which||32===a.which)&&this.switchPlaylistItem_()}},switchPlaylistItem_:{value:function(){this.player_.playlist.currentItem(j(this.player_.playlist(),this.item)),this.playOnSelect&&this.player_.play()}},addPlayIcon_:{value:function(){g.addClass(this.thumbnail,"vjs-icon-play"),g.removeClass(this.thumbnail,"vjs-playlist-now-playing")}},removePlayIcon_:{value:function(){document.activeElement!==this.el()&&(g.removeClass(this.thumbnail,"vjs-icon-play"),this.hasClass("vjs-selected")&&g.addClass(this.thumbnail,"vjs-playlist-now-playing"))}},createEl:{value:function(){var a=document.createElement("li"),b=this.options_.item;if(a.className="vjs-playlist-item",a.setAttribute("tabIndex",0),this.thumbnail=o(b.thumbnail),a.appendChild(this.thumbnail),b.duration){var c=document.createElement("time"),d=g.formatTime(b.duration);c.className="vjs-playlist-duration",c.setAttribute("datetime","PT0H0M"+b.duration+"S"),c.appendChild(document.createTextNode(d)),a.appendChild(c)}var e=document.createElement("cite"),f=b.name||this.localize("Untitled Video");if(e.className="vjs-playlist-name",e.appendChild(document.createTextNode(f)),e.setAttribute("title",f),a.appendChild(e),b.description){var h=document.createElement("p");h.className="vjs-playlist-description",h.appendChild(document.createTextNode(b.description)),h.setAttribute("title",b.description),a.appendChild(h)}return a}}}),b}(p),r=function(a){function b(a,c){var e=this;if(f(this,b),!a.playlist)throw new Error("videojs-playlist is required for the playlist component");d(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,a,c),this.items=[],c.supportsCssPointerEvents&&this.addClass("vjs-csspointerevents"),this.createPlaylist_(),g.browser.TOUCH_ENABLED||this.addClass("vjs-mouse"),a.on(["loadstart","playlistchange"],function(){e.update()}),a.on("adstart",function(){e.addClass("vjs-ad-playing")}),a.on("adend",function(){a.ended()?a.one("ended",function(){e.removeClass("vjs-ad-playing")}):e.removeClass("vjs-ad-playing")})}return e(b,a),c(b,{createEl:{value:function(){var a=this.options_;if(a.el)return a.el;var b=document.createElement("ol");return b.className=a.className,a.el=b,b}},createPlaylist_:{value:function(){for(var a=this.player_.playlist()||[],b=0;b<this.items.length;b++)this.removeChild(this.items[b]);this.items.length=0;var c=this.el_.querySelector(".vjs-playlist-ad-overlay");c&&c.parentNode.removeChild(c);for(var b=0;b<a.length;b++){var d=new q(this.player_,{item:a[b]},this.options_);this.items.push(d),this.addChild(d)}c=document.createElement("li"),c.className="vjs-playlist-ad-overlay",this.el_.appendChild(c);var e=this.player_.playlist.currentItem();if(this.items.length&&e>=0){m(this.items[e]);var f=this.items[e].$(".vjs-playlist-thumbnail");f&&h.addClass(f,"vjs-playlist-now-playing")}}},update:{value:function(){var a=this.player_.playlist();if(this.items.length!==a.length)return void this.createPlaylist_();for(var b=0;b<this.items.length;b++)if(this.items[b].item!==a[b])return void this.createPlaylist_();for(var c=this.player_.playlist.currentItem(),b=0;b<this.items.length;b++){var d=this.items[b];b===c?(m(d),document.activeElement!==d.el()&&h.addClass(d.thumbnail,"vjs-playlist-now-playing")):n(d)}}}}),b}(p),s=function(a){var b=this,c=void 0,d=void 0;if(!b.playlist)throw new Error("videojs-playlist is required for the playlist component");"undefined"!=typeof HTMLElement&&a instanceof HTMLElement||a&&1===a.nodeType?(d=a,c=g.mergeOptions(l)):(c=g.mergeOptions(l,a),d=document.querySelector("."+c.className)),c.el=d,b.playlistMenu=new r(b,c)};g.registerComponent("PlaylistMenu",r),g.registerComponent("PlaylistMenuItem",q),i("playlistUi",s)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(){(function(a){"use strict";var b=function(a){return a&&a.__esModule?a["default"]:a},c=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),d=function t(a,b,c){var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:t(e,b,c)}if("value"in d&&d.writable)return d.value;var f=d.get;return void 0===f?void 0:f.call(c)},e=function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(a.__proto__=b)},f=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},g=b("undefined"!=typeof window?window.videojs:"undefined"!=typeof a?a.videojs:null),h=g.dom||g,i=g.registerPlugin||g.plugin,j=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},k=function(){var a=document.createElement("x");return a.style.cssText="pointer-events:auto","auto"===a.style.pointerEvents}(),l={className:"vjs-playlist",playOnSelect:!1,supportsCssPointerEvents:k},m=function(a){a.addClass("vjs-selected")},n=function(a){a.removeClass("vjs-selected"),a.thumbnail&&h.removeClass(a.thumbnail,"vjs-playlist-now-playing")},o=function(a){if(!a){var b=document.createElement("div");return b.className="vjs-playlist-thumbnail",b}var c=document.createElement("picture");if(c.className="vjs-playlist-thumbnail","string"==typeof a){var d=document.createElement("img");d.src=a,c.appendChild(d)}else{for(var e=0;e<a.length-1;e++){var f=a[e],g=document.createElement("source");for(var h in f)g[h]=f[h];c.appendChild(g)}var i=a[a.length-1],d=document.createElement("img");for(var h in i)d[h]=i[h];c.appendChild(d)}return c},p=g.getComponent("Component"),q=function(a){function b(a,c,e){if(f(this,b),!c.item)throw new Error("Cannot construct a PlaylistMenuItem without an item option");d(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,a,c),this.item=c.item,this.playOnSelect=e.playOnSelect,this.emitTapEvents(),this.on(["click","tap"],this.switchPlaylistItem_),this.on("keydown",this.handleKeyDown_),this.on(["focus","mouseover"],this.addPlayIcon_),this.on(["blur","mouseout"],this.removePlayIcon_)}return e(b,a),c(b,{handleKeyDown_:{value:function(a){(13===a.which||32===a.which)&&this.switchPlaylistItem_()}},switchPlaylistItem_:{value:function(){this.player_.playlist.currentItem(j(this.player_.playlist(),this.item)),this.playOnSelect&&this.player_.play()}},addPlayIcon_:{value:function(){h.addClass(this.thumbnail,"vjs-icon-play"),h.removeClass(this.thumbnail,"vjs-playlist-now-playing")}},removePlayIcon_:{value:function(){document.activeElement!==this.el()&&(h.removeClass(this.thumbnail,"vjs-icon-play"),this.hasClass("vjs-selected")&&h.addClass(this.thumbnail,"vjs-playlist-now-playing"))}},createEl:{value:function(){var a=document.createElement("li"),b=this.options_.item;if(a.className="vjs-playlist-item",a.setAttribute("tabIndex",0),this.thumbnail=o(b.thumbnail),a.appendChild(this.thumbnail),b.duration){var c=document.createElement("time"),d=g.formatTime(b.duration);c.className="vjs-playlist-duration",c.setAttribute("datetime","PT0H0M"+b.duration+"S"),c.appendChild(document.createTextNode(d)),a.appendChild(c)}var e=document.createElement("cite"),f=b.name||this.localize("Untitled Video");if(e.className="vjs-playlist-name",e.appendChild(document.createTextNode(f)),e.setAttribute("title",f),a.appendChild(e),b.description){var h=document.createElement("p");h.className="vjs-playlist-description",h.appendChild(document.createTextNode(b.description)),h.setAttribute("title",b.description),a.appendChild(h)}return a}}}),b}(p),r=function(a){function b(a,c){var e=this;if(f(this,b),!a.playlist)throw new Error("videojs-playlist is required for the playlist component");d(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,a,c),this.items=[],c.supportsCssPointerEvents&&this.addClass("vjs-csspointerevents"),this.createPlaylist_(),g.browser.TOUCH_ENABLED||this.addClass("vjs-mouse"),a.on(["loadstart","playlistchange"],function(){e.update()}),a.on("adstart",function(){e.addClass("vjs-ad-playing")}),a.on("adend",function(){a.ended()?a.one("ended",function(){e.removeClass("vjs-ad-playing")}):e.removeClass("vjs-ad-playing")})}return e(b,a),c(b,{createEl:{value:function(){var a=this.options_;if(a.el)return a.el;var b=document.createElement("ol");return b.className=a.className,a.el=b,b}},createPlaylist_:{value:function(){for(var a=this.player_.playlist()||[],b=0;b<this.items.length;b++)this.removeChild(this.items[b]);this.items.length=0;var c=this.el_.querySelector(".vjs-playlist-ad-overlay");c&&c.parentNode.removeChild(c);for(var b=0;b<a.length;b++){var d=new q(this.player_,{item:a[b]},this.options_);this.items.push(d),this.addChild(d)}c=document.createElement("li"),c.className="vjs-playlist-ad-overlay",this.el_.appendChild(c);var e=this.player_.playlist.currentItem();if(this.items.length&&e>=0){m(this.items[e]);var f=this.items[e].$(".vjs-playlist-thumbnail");f&&h.addClass(f,"vjs-playlist-now-playing")}}},update:{value:function(){var a=this.player_.playlist();if(this.items.length!==a.length)return void this.createPlaylist_();for(var b=0;b<this.items.length;b++)if(this.items[b].item!==a[b])return void this.createPlaylist_();for(var c=this.player_.playlist.currentItem(),b=0;b<this.items.length;b++){var d=this.items[b];b===c?(m(d),document.activeElement!==d.el()&&h.addClass(d.thumbnail,"vjs-playlist-now-playing")):n(d)}}}}),b}(p),s=function(a){var b=this,c=void 0,d=void 0;if(!b.playlist)throw new Error("videojs-playlist is required for the playlist component");"undefined"!=typeof HTMLElement&&a instanceof HTMLElement||a&&1===a.nodeType?(d=a,c=g.mergeOptions(l)):(c=g.mergeOptions(l,a),d=document.querySelector("."+c.className)),c.el=d,b.playlistMenu=new r(b,c)};g.registerComponent("PlaylistMenu",r),g.registerComponent("PlaylistMenuItem",q),i("playlistUi",s)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);

@@ -148,4 +148,4 @@ /*! videojs-playlist-ui - v0.0.0 - 2015-3-12

value: function addPlayIcon_() {
_videoJs2['default'].addClass(this.thumbnail, 'vjs-icon-play');
_videoJs2['default'].removeClass(this.thumbnail, 'vjs-playlist-now-playing');
dom.addClass(this.thumbnail, 'vjs-icon-play');
dom.removeClass(this.thumbnail, 'vjs-playlist-now-playing');
}

@@ -159,5 +159,5 @@ }, {

_videoJs2['default'].removeClass(this.thumbnail, 'vjs-icon-play');
dom.removeClass(this.thumbnail, 'vjs-icon-play');
if (this.hasClass('vjs-selected')) {
_videoJs2['default'].addClass(this.thumbnail, 'vjs-playlist-now-playing');
dom.addClass(this.thumbnail, 'vjs-playlist-now-playing');
}

@@ -164,0 +164,0 @@ }

@@ -128,4 +128,4 @@ /*! videojs-playlist-ui - v0.0.0 - 2015-3-12

addPlayIcon_() {
videojs.addClass(this.thumbnail, 'vjs-icon-play');
videojs.removeClass(this.thumbnail, 'vjs-playlist-now-playing');
dom.addClass(this.thumbnail, 'vjs-icon-play');
dom.removeClass(this.thumbnail, 'vjs-playlist-now-playing');
}

@@ -138,5 +138,5 @@

videojs.removeClass(this.thumbnail, 'vjs-icon-play');
dom.removeClass(this.thumbnail, 'vjs-icon-play');
if (this.hasClass('vjs-selected')) {
videojs.addClass(this.thumbnail, 'vjs-playlist-now-playing');
dom.addClass(this.thumbnail, 'vjs-playlist-now-playing');
}

@@ -143,0 +143,0 @@ }

{
"name": "videojs-playlist-ui",
"version": "2.3.2",
"version": "2.3.3",
"author": "Brightcove",

@@ -5,0 +5,0 @@ "description": "A playlist video picker for video.js",

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