videojs-hls-source-selector
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -37,2 +37,11 @@ 'use strict'; | ||
// hack for plugin idempodency... prevents duplicate menubuttons from being inserted into the player if multiple player.hlsSourceSelector() functions called. | ||
if (player.videojs_hls_source_selector_initialized == 'undefined' || player.videojs_hls_source_selector_initialized == true) { | ||
console.log("player.videojs_hls_source_selector_initialized == true"); | ||
return; | ||
} else { | ||
console.log("player.videojs_hls_source_selector_initialized == false"); | ||
player.videojs_hls_source_selector_initialized = true; | ||
} | ||
var qualityLevels = player.qualityLevels(); | ||
@@ -39,0 +48,0 @@ console.log("player.techName_:" + player.techName_); |
/*! | ||
* @name videojs-hls-source-selector | ||
* @version 0.0.3 | ||
* @version 0.0.4 | ||
* @author Justin Fujita <justin@pivotshare.com> | ||
@@ -43,2 +43,11 @@ * @license MIT | ||
// hack for plugin idempodency... prevents duplicate menubuttons from being inserted into the player if multiple player.hlsSourceSelector() functions called. | ||
if (player.videojs_hls_source_selector_initialized == 'undefined' || player.videojs_hls_source_selector_initialized == true) { | ||
console.log("player.videojs_hls_source_selector_initialized == true"); | ||
return; | ||
} else { | ||
console.log("player.videojs_hls_source_selector_initialized == false"); | ||
player.videojs_hls_source_selector_initialized = true; | ||
} | ||
var qualityLevels = player.qualityLevels(); | ||
@@ -211,3 +220,3 @@ console.log("player.techName_:" + player.techName_); | ||
// Include the version number. | ||
hlsSourceSelector.VERSION = '0.0.3'; | ||
hlsSourceSelector.VERSION = '0.0.4'; | ||
@@ -214,0 +223,0 @@ module.exports = hlsSourceSelector; |
/*! | ||
* @name videojs-hls-source-selector | ||
* @version 0.0.3 | ||
* @version 0.0.4 | ||
* @author Justin Fujita <justin@pivotshare.com> | ||
* @license MIT | ||
*/ | ||
!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.videojsHlsSourceSelector=e()}}(function(){return function e(t,l,o){function n(s,a){if(!l[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var r=new Error("Cannot find module '"+s+"'");throw r.code="MODULE_NOT_FOUND",r}var d=l[s]={exports:{}};t[s][0].call(d.exports,function(e){var l=t[s][1][e];return n(l||e)},d,d.exports,e,t,l,o)}return l[s].exports}for(var i="function"==typeof require&&require,s=0;s<o.length;s++)n(o[s]);return n}({1:[function(e,t,l){(function(e){"use strict";var l="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},o=function(e){return e&&"object"===(void 0===e?"undefined":l(e))&&"default"in e?e.default:e}("undefined"!=typeof window?window.videojs:void 0!==e?e.videojs:null),n={},i=o.registerPlugin||o.plugin,s=function(e,t){e.addClass("vjs-hls-source-selector"),console.log("videojs-hls-source-selector initialized!");var l=e.qualityLevels();if(console.log("player.techName_:"+e.techName_),"Html5"!=e.techName_)return!1;e.on(["loadedmetadata"],function(n){if(console.warn("VIDEOJS loadedmetadata event"),t&&t.default)if(console.log("options.default: "+t.default),console.log("player.qualityLevels(): "),console.log(e.qualityLevels()),console.log("player.qualityLevels().length: "),console.log(e.qualityLevels().length),"low"==t.default)for(var s=0;s<e.qualityLevels().length;s++)e.qualityLevels()[s].enabled=0==s;else if(t.default="high")for(var s=0;s<e.qualityLevels().length;s++)s==e.qualityLevels().length-1?e.qualityLevels()[s].enabled=!0:e.qualityLevels()[s].enabled=!1;var a=o.getComponent("MenuButton"),u=o.extend(a,{constructor:function(){this.label=document.createElement("span"),t.label="Quality",a.apply(this,arguments),this.el().setAttribute("aria-label","Quality"),this.controlText("Quality");var e=document.createElement("span");o.addClass(e,"vjs-menu-icon"),this.el().appendChild(e),l.on(["change","addqualitylevel"],o.bind(this,this.update))}});u.prototype.update=function(){return a.prototype.update.call(this)},u.prototype.createItems=function(){for(var t=[],l=(e.qualityLevels,0);l<e.qualityLevels().length;l++){console.log(e.qualityLevels()[l].id),console.log(e.qualityLevels()[l]);var o=""+l;e.qualityLevels()[l].height?o=e.qualityLevels()[l].height:e.qualityLevels()[l].bitrate&&(o=Math.floor(e.qualityLevels()[l].bitrate/1e3)+" kbps"),t.push(new i(this.player_,{label:o,index:l,selected:l===(!!e.qualityLevels.selectedIndex&&o)}))}return e.qualityLevels().length>1&&t.push(new i(this.player_,{label:"Auto",index:e.qualityLevels().length,selected:!1})),t},u.prototype.buildCSSClass=function(){return a.prototype.buildCSSClass.call(this)+"vjs-hls-source-selector-button"},o.registerComponent("ResolutionButton",u),e.getChild("controlBar").addChild("ResolutionButton",{})});var n=o.getComponent("MenuItem"),i=o.extend(n,{constructor:function(e,t){t.selectable=!0,n.call(this,e,t),l.on("change",o.bind(this,this.update)),e.on("resolutionchange",o.bind(this,this.update))}});i.prototype.handleClick=function(e){n.prototype.handleClick.call(this,e),console.log("Change quality to "+this.options_.label),console.log("qualityLevels: "),console.log(this.player_.qualityLevels()),this.selected_=!0,this.selected(!0);for(var t=0;t<this.player_.qualityLevels().length;t++)this.options_.index==this.player_.qualityLevels().length?this.player_.qualityLevels()[t].enabled=!0:t==this.options_.index?this.player_.qualityLevels()[t].enabled=!0:this.player_.qualityLevels()[t].enabled=!1},i.prototype.update=function(){var e=this.player_.qualityLevels().selectedIndex;console.log(this.options_.index+" == "+e),console.log("menuItem.index === qualityLevels().selectedIndex"),this.selected(this.options_.index==e),this.selected_=this.options_.index===e},n.registerComponent("ResolutionMenuItem",i)},a=function(e){var t=this;this.ready(function(){s(t,o.mergeOptions(n,e))})};i("hlsSourceSelector",a),a.VERSION="0.0.3",t.exports=a}).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.videojsHlsSourceSelector=e()}}(function(){return function e(t,l,o){function i(s,a){if(!l[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(n)return n(s,!0);var r=new Error("Cannot find module '"+s+"'");throw r.code="MODULE_NOT_FOUND",r}var d=l[s]={exports:{}};t[s][0].call(d.exports,function(e){var l=t[s][1][e];return i(l||e)},d,d.exports,e,t,l,o)}return l[s].exports}for(var n="function"==typeof require&&require,s=0;s<o.length;s++)i(o[s]);return i}({1:[function(e,t,l){(function(e){"use strict";var l="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},o=function(e){return e&&"object"===(void 0===e?"undefined":l(e))&&"default"in e?e.default:e}("undefined"!=typeof window?window.videojs:void 0!==e?e.videojs:null),i={},n=o.registerPlugin||o.plugin,s=function(e,t){if(e.addClass("vjs-hls-source-selector"),console.log("videojs-hls-source-selector initialized!"),"undefined"==e.videojs_hls_source_selector_initialized||1==e.videojs_hls_source_selector_initialized)return void console.log("player.videojs_hls_source_selector_initialized == true");console.log("player.videojs_hls_source_selector_initialized == false"),e.videojs_hls_source_selector_initialized=!0;var l=e.qualityLevels();if(console.log("player.techName_:"+e.techName_),"Html5"!=e.techName_)return!1;e.on(["loadedmetadata"],function(i){if(console.warn("VIDEOJS loadedmetadata event"),t&&t.default)if(console.log("options.default: "+t.default),console.log("player.qualityLevels(): "),console.log(e.qualityLevels()),console.log("player.qualityLevels().length: "),console.log(e.qualityLevels().length),"low"==t.default)for(var s=0;s<e.qualityLevels().length;s++)e.qualityLevels()[s].enabled=0==s;else if(t.default="high")for(var s=0;s<e.qualityLevels().length;s++)s==e.qualityLevels().length-1?e.qualityLevels()[s].enabled=!0:e.qualityLevels()[s].enabled=!1;var a=o.getComponent("MenuButton"),u=o.extend(a,{constructor:function(){this.label=document.createElement("span"),t.label="Quality",a.apply(this,arguments),this.el().setAttribute("aria-label","Quality"),this.controlText("Quality");var e=document.createElement("span");o.addClass(e,"vjs-menu-icon"),this.el().appendChild(e),l.on(["change","addqualitylevel"],o.bind(this,this.update))}});u.prototype.update=function(){return a.prototype.update.call(this)},u.prototype.createItems=function(){for(var t=[],l=(e.qualityLevels,0);l<e.qualityLevels().length;l++){console.log(e.qualityLevels()[l].id),console.log(e.qualityLevels()[l]);var o=""+l;e.qualityLevels()[l].height?o=e.qualityLevels()[l].height:e.qualityLevels()[l].bitrate&&(o=Math.floor(e.qualityLevels()[l].bitrate/1e3)+" kbps"),t.push(new n(this.player_,{label:o,index:l,selected:l===(!!e.qualityLevels.selectedIndex&&o)}))}return e.qualityLevels().length>1&&t.push(new n(this.player_,{label:"Auto",index:e.qualityLevels().length,selected:!1})),t},u.prototype.buildCSSClass=function(){return a.prototype.buildCSSClass.call(this)+"vjs-hls-source-selector-button"},o.registerComponent("ResolutionButton",u),e.getChild("controlBar").addChild("ResolutionButton",{})});var i=o.getComponent("MenuItem"),n=o.extend(i,{constructor:function(e,t){t.selectable=!0,i.call(this,e,t),l.on("change",o.bind(this,this.update)),e.on("resolutionchange",o.bind(this,this.update))}});n.prototype.handleClick=function(e){i.prototype.handleClick.call(this,e),console.log("Change quality to "+this.options_.label),console.log("qualityLevels: "),console.log(this.player_.qualityLevels()),this.selected_=!0,this.selected(!0);for(var t=0;t<this.player_.qualityLevels().length;t++)this.options_.index==this.player_.qualityLevels().length?this.player_.qualityLevels()[t].enabled=!0:t==this.options_.index?this.player_.qualityLevels()[t].enabled=!0:this.player_.qualityLevels()[t].enabled=!1},n.prototype.update=function(){var e=this.player_.qualityLevels().selectedIndex;console.log(this.options_.index+" == "+e),console.log("menuItem.index === qualityLevels().selectedIndex"),this.selected(this.options_.index==e),this.selected_=this.options_.index===e},i.registerComponent("ResolutionMenuItem",n)},a=function(e){var t=this;this.ready(function(){s(t,o.mergeOptions(i,e))})};n("hlsSourceSelector",a),a.VERSION="0.0.4",t.exports=a}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}); | ||
//# sourceMappingURL=videojs-hls-source-selector.min.js.map |
/*! | ||
* @name videojs-hls-source-selector | ||
* @version 0.0.3 | ||
* @version 0.0.4 | ||
* @author Justin Fujita <justin@pivotshare.com> | ||
@@ -43,2 +43,11 @@ * @license MIT | ||
// hack for plugin idempodency... prevents duplicate menubuttons from being inserted into the player if multiple player.hlsSourceSelector() functions called. | ||
if (player.videojs_hls_source_selector_initialized == 'undefined' || player.videojs_hls_source_selector_initialized == true) { | ||
console.log("player.videojs_hls_source_selector_initialized == true"); | ||
return; | ||
} else { | ||
console.log("player.videojs_hls_source_selector_initialized == false"); | ||
player.videojs_hls_source_selector_initialized = true; | ||
} | ||
var qualityLevels = player.qualityLevels(); | ||
@@ -211,3 +220,3 @@ console.log("player.techName_:" + player.techName_); | ||
// Include the version number. | ||
hlsSourceSelector.VERSION = '0.0.3'; | ||
hlsSourceSelector.VERSION = '0.0.4'; | ||
@@ -214,0 +223,0 @@ module.exports = hlsSourceSelector; |
/*! | ||
* @name videojs-hls-source-selector | ||
* @version 0.0.3 | ||
* @version 0.0.4 | ||
* @author Justin Fujita <justin@pivotshare.com> | ||
* @license MIT | ||
*/ | ||
!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.videojsHlsSourceSelector=e()}}(function(){return function e(t,l,o){function n(s,a){if(!l[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var r=new Error("Cannot find module '"+s+"'");throw r.code="MODULE_NOT_FOUND",r}var d=l[s]={exports:{}};t[s][0].call(d.exports,function(e){var l=t[s][1][e];return n(l||e)},d,d.exports,e,t,l,o)}return l[s].exports}for(var i="function"==typeof require&&require,s=0;s<o.length;s++)n(o[s]);return n}({1:[function(e,t,l){(function(e){"use strict";var l="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},o=function(e){return e&&"object"===(void 0===e?"undefined":l(e))&&"default"in e?e.default:e}("undefined"!=typeof window?window.videojs:void 0!==e?e.videojs:null),n={},i=o.registerPlugin||o.plugin,s=function(e,t){e.addClass("vjs-hls-source-selector"),console.log("videojs-hls-source-selector initialized!");var l=e.qualityLevels();if(console.log("player.techName_:"+e.techName_),"Html5"!=e.techName_)return!1;e.on(["loadedmetadata"],function(n){if(console.warn("VIDEOJS loadedmetadata event"),t&&t.default)if(console.log("options.default: "+t.default),console.log("player.qualityLevels(): "),console.log(e.qualityLevels()),console.log("player.qualityLevels().length: "),console.log(e.qualityLevels().length),"low"==t.default)for(var s=0;s<e.qualityLevels().length;s++)e.qualityLevels()[s].enabled=0==s;else if(t.default="high")for(var s=0;s<e.qualityLevels().length;s++)s==e.qualityLevels().length-1?e.qualityLevels()[s].enabled=!0:e.qualityLevels()[s].enabled=!1;var a=o.getComponent("MenuButton"),u=o.extend(a,{constructor:function(){this.label=document.createElement("span"),t.label="Quality",a.apply(this,arguments),this.el().setAttribute("aria-label","Quality"),this.controlText("Quality");var e=document.createElement("span");o.addClass(e,"vjs-menu-icon"),this.el().appendChild(e),l.on(["change","addqualitylevel"],o.bind(this,this.update))}});u.prototype.update=function(){return a.prototype.update.call(this)},u.prototype.createItems=function(){for(var t=[],l=(e.qualityLevels,0);l<e.qualityLevels().length;l++){console.log(e.qualityLevels()[l].id),console.log(e.qualityLevels()[l]);var o=""+l;e.qualityLevels()[l].height?o=e.qualityLevels()[l].height:e.qualityLevels()[l].bitrate&&(o=Math.floor(e.qualityLevels()[l].bitrate/1e3)+" kbps"),t.push(new i(this.player_,{label:o,index:l,selected:l===(!!e.qualityLevels.selectedIndex&&o)}))}return e.qualityLevels().length>1&&t.push(new i(this.player_,{label:"Auto",index:e.qualityLevels().length,selected:!1})),t},u.prototype.buildCSSClass=function(){return a.prototype.buildCSSClass.call(this)+"vjs-hls-source-selector-button"},o.registerComponent("ResolutionButton",u),e.getChild("controlBar").addChild("ResolutionButton",{})});var n=o.getComponent("MenuItem"),i=o.extend(n,{constructor:function(e,t){t.selectable=!0,n.call(this,e,t),l.on("change",o.bind(this,this.update)),e.on("resolutionchange",o.bind(this,this.update))}});i.prototype.handleClick=function(e){n.prototype.handleClick.call(this,e),console.log("Change quality to "+this.options_.label),console.log("qualityLevels: "),console.log(this.player_.qualityLevels()),this.selected_=!0,this.selected(!0);for(var t=0;t<this.player_.qualityLevels().length;t++)this.options_.index==this.player_.qualityLevels().length?this.player_.qualityLevels()[t].enabled=!0:t==this.options_.index?this.player_.qualityLevels()[t].enabled=!0:this.player_.qualityLevels()[t].enabled=!1},i.prototype.update=function(){var e=this.player_.qualityLevels().selectedIndex;console.log(this.options_.index+" == "+e),console.log("menuItem.index === qualityLevels().selectedIndex"),this.selected(this.options_.index==e),this.selected_=this.options_.index===e},n.registerComponent("ResolutionMenuItem",i)},a=function(e){var t=this;this.ready(function(){s(t,o.mergeOptions(n,e))})};i("hlsSourceSelector",a),a.VERSION="0.0.3",t.exports=a}).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.videojsHlsSourceSelector=e()}}(function(){return function e(t,l,o){function i(s,a){if(!l[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(n)return n(s,!0);var r=new Error("Cannot find module '"+s+"'");throw r.code="MODULE_NOT_FOUND",r}var d=l[s]={exports:{}};t[s][0].call(d.exports,function(e){var l=t[s][1][e];return i(l||e)},d,d.exports,e,t,l,o)}return l[s].exports}for(var n="function"==typeof require&&require,s=0;s<o.length;s++)i(o[s]);return i}({1:[function(e,t,l){(function(e){"use strict";var l="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},o=function(e){return e&&"object"===(void 0===e?"undefined":l(e))&&"default"in e?e.default:e}("undefined"!=typeof window?window.videojs:void 0!==e?e.videojs:null),i={},n=o.registerPlugin||o.plugin,s=function(e,t){if(e.addClass("vjs-hls-source-selector"),console.log("videojs-hls-source-selector initialized!"),"undefined"==e.videojs_hls_source_selector_initialized||1==e.videojs_hls_source_selector_initialized)return void console.log("player.videojs_hls_source_selector_initialized == true");console.log("player.videojs_hls_source_selector_initialized == false"),e.videojs_hls_source_selector_initialized=!0;var l=e.qualityLevels();if(console.log("player.techName_:"+e.techName_),"Html5"!=e.techName_)return!1;e.on(["loadedmetadata"],function(i){if(console.warn("VIDEOJS loadedmetadata event"),t&&t.default)if(console.log("options.default: "+t.default),console.log("player.qualityLevels(): "),console.log(e.qualityLevels()),console.log("player.qualityLevels().length: "),console.log(e.qualityLevels().length),"low"==t.default)for(var s=0;s<e.qualityLevels().length;s++)e.qualityLevels()[s].enabled=0==s;else if(t.default="high")for(var s=0;s<e.qualityLevels().length;s++)s==e.qualityLevels().length-1?e.qualityLevels()[s].enabled=!0:e.qualityLevels()[s].enabled=!1;var a=o.getComponent("MenuButton"),u=o.extend(a,{constructor:function(){this.label=document.createElement("span"),t.label="Quality",a.apply(this,arguments),this.el().setAttribute("aria-label","Quality"),this.controlText("Quality");var e=document.createElement("span");o.addClass(e,"vjs-menu-icon"),this.el().appendChild(e),l.on(["change","addqualitylevel"],o.bind(this,this.update))}});u.prototype.update=function(){return a.prototype.update.call(this)},u.prototype.createItems=function(){for(var t=[],l=(e.qualityLevels,0);l<e.qualityLevels().length;l++){console.log(e.qualityLevels()[l].id),console.log(e.qualityLevels()[l]);var o=""+l;e.qualityLevels()[l].height?o=e.qualityLevels()[l].height:e.qualityLevels()[l].bitrate&&(o=Math.floor(e.qualityLevels()[l].bitrate/1e3)+" kbps"),t.push(new n(this.player_,{label:o,index:l,selected:l===(!!e.qualityLevels.selectedIndex&&o)}))}return e.qualityLevels().length>1&&t.push(new n(this.player_,{label:"Auto",index:e.qualityLevels().length,selected:!1})),t},u.prototype.buildCSSClass=function(){return a.prototype.buildCSSClass.call(this)+"vjs-hls-source-selector-button"},o.registerComponent("ResolutionButton",u),e.getChild("controlBar").addChild("ResolutionButton",{})});var i=o.getComponent("MenuItem"),n=o.extend(i,{constructor:function(e,t){t.selectable=!0,i.call(this,e,t),l.on("change",o.bind(this,this.update)),e.on("resolutionchange",o.bind(this,this.update))}});n.prototype.handleClick=function(e){i.prototype.handleClick.call(this,e),console.log("Change quality to "+this.options_.label),console.log("qualityLevels: "),console.log(this.player_.qualityLevels()),this.selected_=!0,this.selected(!0);for(var t=0;t<this.player_.qualityLevels().length;t++)this.options_.index==this.player_.qualityLevels().length?this.player_.qualityLevels()[t].enabled=!0:t==this.options_.index?this.player_.qualityLevels()[t].enabled=!0:this.player_.qualityLevels()[t].enabled=!1},n.prototype.update=function(){var e=this.player_.qualityLevels().selectedIndex;console.log(this.options_.index+" == "+e),console.log("menuItem.index === qualityLevels().selectedIndex"),this.selected(this.options_.index==e),this.selected_=this.options_.index===e},i.registerComponent("ResolutionMenuItem",n)},a=function(e){var t=this;this.ready(function(){s(t,o.mergeOptions(i,e))})};n("hlsSourceSelector",a),a.VERSION="0.0.4",t.exports=a}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}); |
{ | ||
"name": "videojs-hls-source-selector", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "VideoJS plugin that leverages videojs-contrib-quality-levels plugin to offer manual user-selectable level selection options for adaptive hls streams. ", | ||
@@ -5,0 +5,0 @@ "main": "build/es5/index.js", |
@@ -26,2 +26,14 @@ import videojs from 'video.js'; | ||
console.log("videojs-hls-source-selector initialized!"); | ||
// hack for plugin idempodency... prevents duplicate menubuttons from being inserted into the player if multiple player.hlsSourceSelector() functions called. | ||
if(player.videojs_hls_source_selector_initialized == 'undefined' || player.videojs_hls_source_selector_initialized == true) | ||
{ | ||
console.log("player.videojs_hls_source_selector_initialized == true"); | ||
return; | ||
} | ||
else | ||
{ | ||
console.log("player.videojs_hls_source_selector_initialized == false") | ||
player.videojs_hls_source_selector_initialized = true; | ||
} | ||
@@ -28,0 +40,0 @@ var qualityLevels = player.qualityLevels(); |
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
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
1116053
1457