From 7522da441b7d38f7751aaf27dcc54905da1092fb Mon Sep 17 00:00:00 2001 From: Leandro Moreira Date: Fri, 4 Dec 2015 18:48:51 -0200 Subject: [PATCH] bump up vesion --- dist/level-selector.min.js | 20 +++++++++++++++++++- dist/level-selector.min.js.map | 2 +- package.json | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/dist/level-selector.min.js b/dist/level-selector.min.js index 4cf873b..a72efda 100644 --- a/dist/level-selector.min.js +++ b/dist/level-selector.min.js @@ -1,2 +1,20 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("Clappr")):"function"==typeof define&&define.amd?define(["Clappr"],t):"object"==typeof exports?exports.LevelSelector=t(require("Clappr")):e.LevelSelector=t(e.Clappr)}(this,function(e){return function(e){function t(n){if(l[n])return l[n].exports;var o=l[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var l={};return t.m=e,t.c=l,t.p="<%=baseUrl%>/",t(0)}([function(e,t,l){"use strict";e.exports=l(1)},function(e,t,l){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}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)}var s=function(){function e(e,t){for(var l=0;lAuto'},function(e,t,l){t=e.exports=l(5)(),t.push([e.id,".level_selector[data-level-selector]{float:right;margin-top:5px;position:relative}.level_selector[data-level-selector] button{background-color:transparent;color:#fff;font-family:Roboto,Open Sans,Arial,sans-serif;-webkit-font-smoothing:antialiased;border:none;font-size:10px}.level_selector[data-level-selector] button:hover{color:#c9c9c9}.level_selector[data-level-selector] button.changing{-webkit-animation:pulse .5s infinite alternate}.level_selector[data-level-selector]>ul{list-style-type:none;position:absolute;bottom:25px;border:1px solid #000;display:none;background-color:#e6e6e6}.level_selector[data-level-selector] li{font-size:10px}.level_selector[data-level-selector] li[data-title]{background-color:#c3c2c2;padding:5px}.level_selector[data-level-selector] li a{color:#444;padding:2px 10px;display:block;text-decoration:none}.level_selector[data-level-selector] li a:hover{background-color:#555;color:#fff}.level_selector[data-level-selector] li a:hover a{color:#fff;text-decoration:none}@-webkit-keyframes pulse{0%{color:#fff}50%{color:#ff0101}to{color:#b80000}}",""])},function(e,t){"use strict";e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t/",t(0)}([/*!******************!*\ + !*** ./index.js ***! + \******************/ +function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=l(1),e.exports=t["default"]},/*!*********************!*\ + !*** ./src/main.js ***! + \*********************/ +function(e,t,l){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(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(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var l=0;l0;e&&this.fillLevels(this.core.getCurrentPlayback().levels)}},{key:"unBindEvents",value:function(){this.stopListening(this.core.mediaControl,a.Events.MEDIACONTROL_CONTAINERCHANGED),this.stopListening(this.core.mediaControl,a.Events.MEDIACONTROL_RENDERED),this.stopListening(this.core.getCurrentPlayback(),a.Events.PLAYBACK_LEVELS_AVAILABLE),this.stopListening(this.core.getCurrentPlayback(),a.Events.PLAYBACK_LEVEL_SWITCH_START),this.stopListening(this.core.getCurrentPlayback(),a.Events.PLAYBACK_LEVEL_SWITCH_END)}},{key:"reload",value:function(){this.unBindEvents(),this.init(),this.bindEvents()}},{key:"shouldRender",value:function(){if(!this.core.getCurrentPlayback())return!1;var e=!!this.core.getCurrentPlayback().currentLevel,t=!!(this.core.getCurrentPlayback().levels&&this.core.getCurrentPlayback().levels.length>0);return e&&t}},{key:"render",value:function(){if(this.shouldRender()){var e=a.Styler.getStyleFor(f["default"],{baseUrl:this.core.options.baseUrl});this.$el.html(this.template({levels:this.levels,title:this.getTitle()})),this.$el.append(e),this.core.mediaControl.$(".media-control-right-panel").append(this.el),this.updateText(this.selectedLevelId)}return this}},{key:"fillLevels",value:function(e){this.levels=e,this.configureLevelsLabels(),this.render()}},{key:"configureLevelsLabels",value:function(){if(void 0!==this.core.options.levelSelectorConfig)for(var e in this.core.options.levelSelectorConfig.labels||{}){var t=!!this.findLevelBy(e);t&&this.changeLevelLabelBy(e,this.core.options.levelSelectorConfig.labels[labelId])}}},{key:"findLevelBy",value:function(e){var t;return this.levels.forEach(function(l){l.id===e&&(t=l)}),t}},{key:"changeLevelLabelBy",value:function(e,t){var l=this;this.levels.forEach(function(n,o){n.id===e&&(l.levels[o]=t)})}},{key:"onLevelSelect",value:function(e){return this.selectedLevelId=parseInt(e.target.dataset.levelSelectorSelect,10),this.core.getCurrentPlayback().currentLevel=this.selectedLevelId,this.toggleContextMenu(),this.render(),e.stopPropagation(),!1}},{key:"onShowLevelSelectMenu",value:function(e){this.toggleContextMenu()}},{key:"toggleContextMenu",value:function(){this.$(".level_selector ul").toggle()}},{key:"buttonElement",value:function(){return this.$(".level_selector button")}},{key:"startAnimation",value:function(){this.buttonElement().addClass("changing")}},{key:"stopAnimation",value:function(){this.buttonElement().removeClass("changing")}},{key:"getTitle",value:function(){return(this.core.options.levelSelectorConfig||{}).title}},{key:"updateText",value:function(e){this.buttonElement().text(e===h?"AUTO":this.findLevelBy(e).label)}}]),t}(a.UICorePlugin);t["default"]=d,e.exports=t["default"]},/*!*************************!*\ + !*** external "Clappr" ***! + \*************************/ +function(t,l){t.exports=e},/*!****************************************!*\ + !*** ./src/public/level-selector.html ***! + \****************************************/ +function(e,t){e.exports='\n
    \n <% if (title) { %>\n
  • <%= title %>
  • \n <% }; %>\n
  • AUTO
  • \n <% for (var i = 0; i < levels.length; i++) { %>\n
  • <%= levels[i].label %>
  • \n <% }; %>\n
\n'},/*!*******************************!*\ + !*** ./src/public/style.scss ***! + \*******************************/ +function(e,t,l){t=e.exports=l(5)(),t.push([e.id,".level_selector[data-level-selector]{float:right;margin-top:5px;position:relative}.level_selector[data-level-selector] button{background-color:transparent;color:#fff;font-family:Roboto,Open Sans,Arial,sans-serif;-webkit-font-smoothing:antialiased;border:none;font-size:10px}.level_selector[data-level-selector] button:hover{color:#c9c9c9}.level_selector[data-level-selector] button.changing{-webkit-animation:pulse .5s infinite alternate}.level_selector[data-level-selector]>ul{list-style-type:none;position:absolute;bottom:25px;border:1px solid #000;display:none;background-color:#e6e6e6}.level_selector[data-level-selector] li{font-size:10px}.level_selector[data-level-selector] li[data-title]{background-color:#c3c2c2;padding:5px}.level_selector[data-level-selector] li a{color:#444;padding:2px 10px;display:block;text-decoration:none}.level_selector[data-level-selector] li a:hover{background-color:#555;color:#fff}.level_selector[data-level-selector] li a:hover a{color:#fff;text-decoration:none}@-webkit-keyframes pulse{0%{color:#fff}50%{color:#ff0101}to{color:#b80000}}",""])},/*!**************************************!*\ + !*** ./~/css-loader/lib/css-base.js ***! + \**************************************/ +function(e,t){"use strict";e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/*!******************!*\\\n !*** ./index.js ***!\n \\******************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./src/main.js */ 1);\n\n/***/ },\n/* 1 */\n/*!*********************!*\\\n !*** ./src/main.js ***!\n \\*********************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\t\n\tvar _Clappr = __webpack_require__(/*! Clappr */ 2);\n\t\n\tvar _levelSelector = __webpack_require__(/*! ./public/level-selector.html */ 3);\n\t\n\tvar _levelSelector2 = _interopRequireDefault(_levelSelector);\n\t\n\tvar _style = __webpack_require__(/*! ./public/style.scss */ 4);\n\t\n\tvar _style2 = _interopRequireDefault(_style);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar LevelSelector = (function (_UICorePlugin) {\n\t _inherits(LevelSelector, _UICorePlugin);\n\t\n\t _createClass(LevelSelector, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'level_selector';\n\t }\n\t }, {\n\t key: 'template',\n\t get: function get() {\n\t return (0, _Clappr.template)(_levelSelector2.default);\n\t }\n\t }, {\n\t key: 'attributes',\n\t get: function get() {\n\t return {\n\t 'class': this.name,\n\t 'data-level-selector': ''\n\t };\n\t }\n\t }, {\n\t key: 'events',\n\t get: function get() {\n\t return {\n\t 'click [data-level-selector-select]': 'onLevelSelect',\n\t 'click [data-level-selector-button]': 'onShowLevelSelectMenu'\n\t };\n\t }\n\t }], [{\n\t key: 'version',\n\t get: function get() {\n\t return (\"0.1.1\");\n\t }\n\t }]);\n\t\n\t function LevelSelector(core) {\n\t _classCallCheck(this, LevelSelector);\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(LevelSelector).call(this, core));\n\t\n\t _this.init();\n\t _this.render();\n\t return _this;\n\t }\n\t\n\t _createClass(LevelSelector, [{\n\t key: 'init',\n\t value: function init() {\n\t this.levels = {};\n\t this.auto_level = true;\n\t this.selected_level = -1;\n\t }\n\t }, {\n\t key: 'reload',\n\t value: function reload() {\n\t this.unBindEvents();\n\t this.init();\n\t this.bindEvents();\n\t }\n\t }, {\n\t key: 'bindEvents',\n\t value: function bindEvents() {\n\t var _this2 = this;\n\t\n\t this.listenTo(this.core.mediaControl, _Clappr.Events.MEDIACONTROL_CONTAINERCHANGED, this.reload);\n\t this.listenTo(this.core.mediaControl, _Clappr.Events.MEDIACONTROL_RENDERED, this.render);\n\t this.listenToOnce(this.getPlayback(), _Clappr.Events.PLAYBACK_FRAGMENT_LOADED, this.onFragmentLoaded);\n\t this.listenTo(this.getContainer(), _Clappr.Events.CONTAINER_BITRATE, function (bitrate) {\n\t return _this2.onLevelChanged(bitrate.level);\n\t });\n\t }\n\t }, {\n\t key: 'unBindEvents',\n\t value: function unBindEvents() {\n\t this.stopListening(this.core.mediaControl, _Clappr.Events.MEDIACONTROL_CONTAINERCHANGED);\n\t this.stopListening(this.core.mediaControl, _Clappr.Events.MEDIACONTROL_RENDERED);\n\t this.stopListening(this.getContainer(), _Clappr.Events.CONTAINER_BITRATE);\n\t }\n\t }, {\n\t key: 'render',\n\t value: function render() {\n\t if (this.isEnabled()) {\n\t this.$el.html(this.template({ 'levels': this.levels, 'current_level': 0, 'title': this.getTitle() }));\n\t var style = _Clappr.Styler.getStyleFor(_style2.default, { baseUrl: this.core.options.baseUrl });\n\t this.$el.append(style);\n\t this.core.mediaControl.$el.find('.media-control-right-panel').append(this.el);\n\t this.updateText(this.currentLevel);\n\t return this;\n\t }\n\t }\n\t }, {\n\t key: 'isEnabled',\n\t value: function isEnabled() {\n\t return this.levels;\n\t }\n\t }, {\n\t key: 'onFragmentLoaded',\n\t value: function onFragmentLoaded() {\n\t this.levels = this.getContainer().playback.levels;\n\t\n\t for (var i in this.levels) {\n\t var bitrate = this.levels[i].bitrate;\n\t if (bitrate) {\n\t this.levels[i].label = this.getDisplayText(bitrate);\n\t }\n\t }\n\t\n\t this.render();\n\t }\n\t }, {\n\t key: 'onLevelChanged',\n\t value: function onLevelChanged(level) {\n\t if (level !== undefined) {\n\t this.currentLevel = level;\n\t this.updateText(level);\n\t if (this.auto_level || this.selectedIsCurrent(level)) {\n\t this.stopAnimation();\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'onLevelSelect',\n\t value: function onLevelSelect(event) {\n\t this.selected_level = parseInt(event.target.dataset.levelSelectorSelect, 10);\n\t this.auto_level = this.selected_level === -1;\n\t this.setLevel(this.selected_level);\n\t this.toggleContextMenu();\n\t if (this.auto_level || this.selectedIsCurrent()) {\n\t this.updateText(this.selected_level);\n\t } else {\n\t this.startAnimation();\n\t this.updateText(this.selected_level);\n\t }\n\t event.stopPropagation();\n\t return false;\n\t }\n\t }, {\n\t key: 'onShowLevelSelectMenu',\n\t value: function onShowLevelSelectMenu(event) {\n\t this.toggleContextMenu();\n\t }\n\t }, {\n\t key: 'toggleContextMenu',\n\t value: function toggleContextMenu() {\n\t this.$el.find('.level_selector ul').toggle();\n\t }\n\t }, {\n\t key: 'getContainer',\n\t value: function getContainer() {\n\t return this.core.getCurrentContainer();\n\t }\n\t }, {\n\t key: 'getPlayback',\n\t value: function getPlayback() {\n\t if (this.getContainer()) {\n\t return this.getContainer().playback;\n\t }\n\t return null;\n\t }\n\t }, {\n\t key: 'getCurrentLevel',\n\t value: function getCurrentLevel() {\n\t return this.currentLevel = this.currentLevel || this.getPlayback().currentLevel;\n\t }\n\t }, {\n\t key: 'setLevel',\n\t value: function setLevel(level) {\n\t this.getPlayback().currentLevel = level;\n\t }\n\t }, {\n\t key: 'buttonElement',\n\t value: function buttonElement() {\n\t return this.$el.find('.level_selector button');\n\t }\n\t }, {\n\t key: 'startAnimation',\n\t value: function startAnimation() {\n\t this.buttonElement().addClass('changing');\n\t }\n\t }, {\n\t key: 'stopAnimation',\n\t value: function stopAnimation() {\n\t this.buttonElement().removeClass('changing');\n\t }\n\t }, {\n\t key: 'selectedIsCurrent',\n\t value: function selectedIsCurrent() {\n\t var currentLevel = arguments.length <= 0 || arguments[0] === undefined ? this.getCurrentLevel() : arguments[0];\n\t\n\t return this.selected_level === currentLevel;\n\t }\n\t }, {\n\t key: 'getTitle',\n\t value: function getTitle() {\n\t var pluginOptions = this.core.options.levelSelectorConfig || {};\n\t return pluginOptions.title;\n\t }\n\t }, {\n\t key: 'getDisplayText',\n\t value: function getDisplayText(bitrate) {\n\t var bitrate_kbps = Math.floor(bitrate / 1000);\n\t var pluginOptions = this.core.options.levelSelectorConfig || {};\n\t var levels = pluginOptions.labels || {};\n\t\n\t return levels[bitrate_kbps] || bitrate_kbps + 'kbps';\n\t }\n\t }, {\n\t key: 'updateText',\n\t value: function updateText(level) {\n\t if (level === undefined || level === -1) {\n\t level = this.getCurrentLevel();\n\t }\n\t if (this.levels[level]) {\n\t var display_text = this.levels[level].label;\n\t\n\t if (this.auto_level) {\n\t display_text = 'AUTO (' + display_text + ')';\n\t }\n\t this.buttonElement().text(display_text);\n\t }\n\t }\n\t }]);\n\t\n\t return LevelSelector;\n\t})(_Clappr.UICorePlugin);\n\t\n\tmodule.exports = window.LevelSelector = LevelSelector;\n\n/***/ },\n/* 2 */\n/*!*************************!*\\\n !*** external \"Clappr\" ***!\n \\*************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n/***/ },\n/* 3 */\n/*!****************************************!*\\\n !*** ./src/public/level-selector.html ***!\n \\****************************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"\";\n\n/***/ },\n/* 4 */\n/*!*******************************!*\\\n !*** ./src/public/style.scss ***!\n \\*******************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\texports = module.exports = __webpack_require__(/*! ./../../~/css-loader/lib/css-base.js */ 5)();\n\t// imports\n\t\n\t\n\t// module\n\texports.push([module.id, \".level_selector[data-level-selector]{float:right;margin-top:5px;position:relative}.level_selector[data-level-selector] button{background-color:transparent;color:#fff;font-family:Roboto,Open Sans,Arial,sans-serif;-webkit-font-smoothing:antialiased;border:none;font-size:10px}.level_selector[data-level-selector] button:hover{color:#c9c9c9}.level_selector[data-level-selector] button.changing{-webkit-animation:pulse .5s infinite alternate}.level_selector[data-level-selector]>ul{list-style-type:none;position:absolute;bottom:25px;border:1px solid #000;display:none;background-color:#e6e6e6}.level_selector[data-level-selector] li{font-size:10px}.level_selector[data-level-selector] li[data-title]{background-color:#c3c2c2;padding:5px}.level_selector[data-level-selector] li a{color:#444;padding:2px 10px;display:block;text-decoration:none}.level_selector[data-level-selector] li a:hover{background-color:#555;color:#fff}.level_selector[data-level-selector] li a:hover a{color:#fff;text-decoration:none}@-webkit-keyframes pulse{0%{color:#fff}50%{color:#ff0101}to{color:#b80000}}\", \"\"]);\n\t\n\t// exports\n\n\n/***/ },\n/* 5 */\n/*!**************************************!*\\\n !*** ./~/css-loader/lib/css-base.js ***!\n \\**************************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\t/*\r\n\t\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\t\tAuthor Tobias Koppers @sokra\r\n\t*/\n\t// css base code, injected by the css-loader\n\tmodule.exports = function () {\n\t\tvar list = [];\n\t\n\t\t// return the list of modules as css string\n\t\tlist.toString = function toString() {\n\t\t\tvar result = [];\n\t\t\tfor (var i = 0; i < this.length; i++) {\n\t\t\t\tvar item = this[i];\n\t\t\t\tif (item[2]) {\n\t\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\n\t\t\t\t} else {\n\t\t\t\t\tresult.push(item[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result.join(\"\");\n\t\t};\n\t\n\t\t// import a list of modules into the list\n\t\tlist.i = function (modules, mediaQuery) {\n\t\t\tif (typeof modules === \"string\") modules = [[null, modules, \"\"]];\n\t\t\tvar alreadyImportedModules = {};\n\t\t\tfor (var i = 0; i < this.length; i++) {\n\t\t\t\tvar id = this[i][0];\n\t\t\t\tif (typeof id === \"number\") alreadyImportedModules[id] = true;\n\t\t\t}\n\t\t\tfor (i = 0; i < modules.length; i++) {\n\t\t\t\tvar item = modules[i];\n\t\t\t\t// skip already imported module\n\t\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\t\tif (typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\t\tif (mediaQuery && !item[2]) {\n\t\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t\t} else if (mediaQuery) {\n\t\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t\t}\n\t\t\t\t\tlist.push(item);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn list;\n\t};\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** level-selector.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"<%=baseUrl%>/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap b53dfa5f028f87ba32c5\n **/","module.exports = require('./src/main.js')\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","import {Events, Styler, UICorePlugin, template} from 'Clappr'\nimport pluginHtml from './public/level-selector.html'\nimport pluginStyle from './public/style.scss'\n\nclass LevelSelector extends UICorePlugin {\n\n static get version() { return VERSION }\n\n get name() { return 'level_selector' }\n get template() { return template(pluginHtml) }\n\n get attributes() {\n return {\n 'class': this.name,\n 'data-level-selector': ''\n }\n }\n\n get events() {\n return {\n 'click [data-level-selector-select]': 'onLevelSelect',\n 'click [data-level-selector-button]': 'onShowLevelSelectMenu'\n }\n }\n\n constructor(core) {\n super(core)\n this.init()\n this.render()\n }\n\n init() {\n this.levels = {}\n this.auto_level = true\n this.selected_level = -1\n }\n\n reload() {\n this.unBindEvents()\n this.init()\n this.bindEvents()\n }\n\n bindEvents() {\n this.listenTo(this.core.mediaControl, Events.MEDIACONTROL_CONTAINERCHANGED, this.reload)\n this.listenTo(this.core.mediaControl, Events.MEDIACONTROL_RENDERED, this.render)\n this.listenToOnce(this.getPlayback(), Events.PLAYBACK_FRAGMENT_LOADED, this.onFragmentLoaded)\n this.listenTo(this.getContainer(), Events.CONTAINER_BITRATE, (bitrate) => this.onLevelChanged(bitrate.level))\n }\n\n unBindEvents() {\n this.stopListening(this.core.mediaControl, Events.MEDIACONTROL_CONTAINERCHANGED)\n this.stopListening(this.core.mediaControl, Events.MEDIACONTROL_RENDERED)\n this.stopListening(this.getContainer(), Events.CONTAINER_BITRATE)\n }\n\n render() {\n if (this.isEnabled()) {\n this.$el.html(this.template({'levels':this.levels, 'current_level': 0, 'title': this.getTitle()}))\n var style = Styler.getStyleFor(pluginStyle, {baseUrl: this.core.options.baseUrl})\n this.$el.append(style)\n this.core.mediaControl.$el.find('.media-control-right-panel').append(this.el)\n this.updateText(this.currentLevel)\n return this\n }\n }\n\n isEnabled() {\n return this.levels\n }\n\n onFragmentLoaded() {\n this.levels = this.getContainer().playback.levels\n\n for (var i in this.levels) {\n var bitrate = this.levels[i].bitrate\n if (bitrate) {\n this.levels[i].label = this.getDisplayText(bitrate)\n }\n }\n\n this.render()\n }\n\n onLevelChanged(level) {\n if (level !== undefined) {\n this.currentLevel = level\n this.updateText(level)\n if (this.auto_level || this.selectedIsCurrent(level)) {\n this.stopAnimation()\n }\n }\n }\n\n onLevelSelect(event) {\n this.selected_level = parseInt(event.target.dataset.levelSelectorSelect, 10)\n this.auto_level = (this.selected_level === -1)\n this.setLevel(this.selected_level)\n this.toggleContextMenu()\n if (this.auto_level || this.selectedIsCurrent()) {\n this.updateText(this.selected_level)\n } else {\n this.startAnimation()\n this.updateText(this.selected_level)\n }\n event.stopPropagation()\n return false\n }\n\n onShowLevelSelectMenu(event) {\n this.toggleContextMenu()\n }\n\n toggleContextMenu() {\n this.$el.find('.level_selector ul').toggle()\n }\n\n getContainer() {\n return this.core.getCurrentContainer()\n }\n\n getPlayback() {\n if (this.getContainer()) {\n return this.getContainer().playback\n }\n return null\n }\n\n getCurrentLevel() {\n return this.currentLevel = (this.currentLevel || this.getPlayback().currentLevel)\n }\n\n setLevel(level) {\n this.getPlayback().currentLevel = level\n }\n\n buttonElement() {\n return this.$el.find('.level_selector button')\n }\n\n startAnimation() {\n this.buttonElement().addClass('changing')\n }\n\n stopAnimation() {\n this.buttonElement().removeClass('changing')\n }\n\n selectedIsCurrent(currentLevel = this.getCurrentLevel()) {\n return (this.selected_level === currentLevel)\n }\n\n getTitle() {\n var pluginOptions = this.core.options.levelSelectorConfig || {}\n return pluginOptions.title\n }\n\n getDisplayText(bitrate) {\n var bitrate_kbps = Math.floor(bitrate / 1000)\n var pluginOptions = this.core.options.levelSelectorConfig || {}\n var levels = pluginOptions.labels || {}\n\n return levels[bitrate_kbps] || bitrate_kbps + 'kbps'\n }\n\n updateText(level) {\n if (level === undefined || level === -1) {\n level = this.getCurrentLevel()\n }\n if (this.levels[level]) {\n var display_text = this.levels[level].label\n\n if (this.auto_level) {\n display_text = 'AUTO (' + display_text + ')'\n }\n this.buttonElement().text(display_text)\n }\n }\n}\n\nmodule.exports = window.LevelSelector = LevelSelector\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main.js\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"Clappr\"\n ** module id = 2\n ** module chunks = 0\n **/","module.exports = \"\";\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/public/level-selector.html\n ** module id = 3\n ** module chunks = 0\n **/","exports = module.exports = require(\"./../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".level_selector[data-level-selector]{float:right;margin-top:5px;position:relative}.level_selector[data-level-selector] button{background-color:transparent;color:#fff;font-family:Roboto,Open Sans,Arial,sans-serif;-webkit-font-smoothing:antialiased;border:none;font-size:10px}.level_selector[data-level-selector] button:hover{color:#c9c9c9}.level_selector[data-level-selector] button.changing{-webkit-animation:pulse .5s infinite alternate}.level_selector[data-level-selector]>ul{list-style-type:none;position:absolute;bottom:25px;border:1px solid #000;display:none;background-color:#e6e6e6}.level_selector[data-level-selector] li{font-size:10px}.level_selector[data-level-selector] li[data-title]{background-color:#c3c2c2;padding:5px}.level_selector[data-level-selector] li a{color:#444;padding:2px 10px;display:block;text-decoration:none}.level_selector[data-level-selector] li a:hover{background-color:#555;color:#fff}.level_selector[data-level-selector] li a:hover a{color:#fff;text-decoration:none}@-webkit-keyframes pulse{0%{color:#fff}50%{color:#ff0101}to{color:#b80000}}\", \"\"]);\n\n// exports\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/public/style.scss\n ** module id = 4\n ** module chunks = 0\n **/","/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\n// css base code, injected by the css-loader\r\nmodule.exports = function() {\r\n\tvar list = [];\r\n\r\n\t// return the list of modules as css string\r\n\tlist.toString = function toString() {\r\n\t\tvar result = [];\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar item = this[i];\r\n\t\t\tif(item[2]) {\r\n\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\r\n\t\t\t} else {\r\n\t\t\t\tresult.push(item[1]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result.join(\"\");\r\n\t};\r\n\r\n\t// import a list of modules into the list\r\n\tlist.i = function(modules, mediaQuery) {\r\n\t\tif(typeof modules === \"string\")\r\n\t\t\tmodules = [[null, modules, \"\"]];\r\n\t\tvar alreadyImportedModules = {};\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar id = this[i][0];\r\n\t\t\tif(typeof id === \"number\")\r\n\t\t\t\talreadyImportedModules[id] = true;\r\n\t\t}\r\n\t\tfor(i = 0; i < modules.length; i++) {\r\n\t\t\tvar item = modules[i];\r\n\t\t\t// skip already imported module\r\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\r\n\t\t\t// when a module is imported multiple times with different media queries.\r\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\r\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\r\n\t\t\t\tif(mediaQuery && !item[2]) {\r\n\t\t\t\t\titem[2] = mediaQuery;\r\n\t\t\t\t} else if(mediaQuery) {\r\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\r\n\t\t\t\t}\r\n\t\t\t\tlist.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\treturn list;\r\n};\r\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/css-loader/lib/css-base.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///level-selector.min.js","webpack:///webpack/bootstrap 57a044006e866779c4a7","webpack:///./index.js","webpack:///./src/main.js","webpack:///external \"Clappr\"","webpack:///./src/public/level-selector.html","webpack:///./src/public/style.scss","webpack:///./~/css-loader/lib/css-base.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_2__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","Object","defineProperty","value","_interopRequireDefault","obj","__esModule","default","_classCallCheck","instance","Constructor","TypeError","_inherits","subClass","superClass","prototype","create","constructor","enumerable","writable","configurable","setPrototypeOf","__proto__","_createClass","defineProperties","target","props","i","length","descriptor","key","protoProps","staticProps","_get","_x","_x2","_x3","_again","object","property","receiver","Function","desc","getOwnPropertyDescriptor","undefined","getter","get","parent","getPrototypeOf","_Clappr","_publicLevelSelectorHtml","_publicLevelSelectorHtml2","_publicStyleScss","_publicStyleScss2","AUTO","LevelSelector","_UICorePlugin","core","init","render","template","class","name","data-level-selector","click [data-level-selector-select]","click [data-level-selector-button]","VERSION","levels","selectedLevelId","listenTo","mediaControl","Events","MEDIACONTROL_CONTAINERCHANGED","reload","MEDIACONTROL_RENDERED","getCurrentPlayback","PLAYBACK_LEVELS_AVAILABLE","fillLevels","PLAYBACK_LEVEL_SWITCH_START","startAnimation","PLAYBACK_LEVEL_SWITCH_END","stopAnimation","playbackLevelsAvaialbeWasTriggered","stopListening","unBindEvents","bindEvents","respondsToCurrentLevel","currentLevel","hasLevels","shouldRender","style","Styler","getStyleFor","baseUrl","options","$el","html","title","getTitle","append","$","el","updateText","configureLevelsLabels","levelSelectorConfig","levelId","labels","thereIsLevel","findLevelBy","changeLevelLabelBy","labelId","foundLevel","forEach","level","newLabel","_this","index","event","parseInt","dataset","levelSelectorSelect","toggleContextMenu","stopPropagation","toggle","buttonElement","addClass","removeClass","text","label","UICorePlugin","push","list","toString","result","item","join","mediaQuery","alreadyImportedModules"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,WACA,kBAAAC,gBAAAC,IACAD,QAAA,UAAAJ,GACA,gBAAAC,SACAA,QAAA,cAAAD,EAAAG,QAAA,WAEAJ,EAAA,cAAAC,EAAAD,EAAA,SACCO,KAAA,SAAAC,GACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAT,OAGA,IAAAC,GAAAS,EAAAD,IACAT,WACAW,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAZ,EAAAD,QAAAC,IAAAD,QAAAQ,GAGAP,EAAAW,QAAA,EAGAX,EAAAD,QAvBA,GAAAU,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,gBAGAR,EAAA;;;ADmBM,SAASP,EAAQD,EAASQ,GAE/B,YAAaS,QAAOC,eAAelB,EAAQ,cAAcmB,OAAM,IAAOnB,EAAQ,WE3DhEQ,EAAQ,GAAgBP,EAAAD,UAAA;;;AFkEjC,SAASC,EAAQD,EAASQ,GAE/B,YAAmqC,SAASY,GAAuBC,GAAK,MAAOA,IAAOA,EAAIC,WAAWD,GAAKE,UAAUF,GAAM,QAASG,GAAgBC,EAASC,GAAa,KAAKD,YAAoBC,IAAc,KAAM,IAAIC,WAAU,qCAAuC,QAASC,GAAUC,EAASC,GAAY,GAAyB,kBAAfA,IAA4C,OAAfA,EAAqB,KAAM,IA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eof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"Clappr\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"Clappr\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"LevelSelector\"] = factory(require(\"Clappr\"));\n\telse\n\t\troot[\"LevelSelector\"] = factory(root[\"Clappr\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"Clappr\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"Clappr\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"LevelSelector\"] = factory(require(\"Clappr\"));\n\telse\n\t\troot[\"LevelSelector\"] = factory(root[\"Clappr\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"<%=baseUrl%>/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/*!******************!*\\\n !*** ./index.js ***!\n \\******************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';Object.defineProperty(exports,'__esModule',{value:true});exports['default'] = __webpack_require__(/*! ./src/main.js */ 1);module.exports = exports['default'];\n\n/***/ },\n/* 1 */\n/*!*********************!*\\\n !*** ./src/main.js ***!\n \\*********************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _createClass=(function(){function defineProperties(target,props){for(var i=0;i < props.length;i++) {var descriptor=props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if('value' in descriptor)descriptor.writable = true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();var _get=function get(_x,_x2,_x3){var _again=true;_function: while(_again) {var object=_x,property=_x2,receiver=_x3;_again = false;if(object === null)object = Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc === undefined){var parent=Object.getPrototypeOf(object);if(parent === null){return undefined;}else {_x = parent;_x2 = property;_x3 = receiver;_again = true;desc = parent = undefined;continue _function;}}else if('value' in desc){return desc.value;}else {var getter=desc.get;if(getter === undefined){return undefined;}return getter.call(receiver);}}};function _interopRequireDefault(obj){return obj && obj.__esModule?obj:{'default':obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError('Cannot call a class as a function');}}function _inherits(subClass,superClass){if(typeof superClass !== 'function' && superClass !== null){throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);}subClass.prototype = Object.create(superClass && superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__ = superClass;}var _Clappr=__webpack_require__(/*! Clappr */ 2);var _publicLevelSelectorHtml=__webpack_require__(/*! ./public/level-selector.html */ 3);var _publicLevelSelectorHtml2=_interopRequireDefault(_publicLevelSelectorHtml);var _publicStyleScss=__webpack_require__(/*! ./public/style.scss */ 4);var _publicStyleScss2=_interopRequireDefault(_publicStyleScss);var AUTO=-1;var LevelSelector=(function(_UICorePlugin){_inherits(LevelSelector,_UICorePlugin);_createClass(LevelSelector,[{key:'name',get:function get(){return 'level_selector';}},{key:'template',get:function get(){return (0,_Clappr.template)(_publicLevelSelectorHtml2['default']);}},{key:'attributes',get:function get(){return {'class':this.name,'data-level-selector':''};}},{key:'events',get:function get(){return {'click [data-level-selector-select]':'onLevelSelect','click [data-level-selector-button]':'onShowLevelSelectMenu'};}}],[{key:'version',get:function get(){return VERSION;}}]);function LevelSelector(core){_classCallCheck(this,LevelSelector);_get(Object.getPrototypeOf(LevelSelector.prototype),'constructor',this).call(this,core);this.init();this.render();}_createClass(LevelSelector,[{key:'init',value:function init(){this.levels = [];this.selectedLevelId = AUTO;}},{key:'bindEvents',value:function bindEvents(){this.listenTo(this.core.mediaControl,_Clappr.Events.MEDIACONTROL_CONTAINERCHANGED,this.reload);this.listenTo(this.core.mediaControl,_Clappr.Events.MEDIACONTROL_RENDERED,this.render);this.listenTo(this.core.getCurrentPlayback(),_Clappr.Events.PLAYBACK_LEVELS_AVAILABLE,this.fillLevels);this.listenTo(this.core.getCurrentPlayback(),_Clappr.Events.PLAYBACK_LEVEL_SWITCH_START,this.startAnimation);this.listenTo(this.core.getCurrentPlayback(),_Clappr.Events.PLAYBACK_LEVEL_SWITCH_END,this.stopAnimation);var playbackLevelsAvaialbeWasTriggered=this.core.getCurrentPlayback().levels && this.core.getCurrentPlayback().levels.length > 0;playbackLevelsAvaialbeWasTriggered && this.fillLevels(this.core.getCurrentPlayback().levels);}},{key:'unBindEvents',value:function unBindEvents(){this.stopListening(this.core.mediaControl,_Clappr.Events.MEDIACONTROL_CONTAINERCHANGED);this.stopListening(this.core.mediaControl,_Clappr.Events.MEDIACONTROL_RENDERED);this.stopListening(this.core.getCurrentPlayback(),_Clappr.Events.PLAYBACK_LEVELS_AVAILABLE);this.stopListening(this.core.getCurrentPlayback(),_Clappr.Events.PLAYBACK_LEVEL_SWITCH_START);this.stopListening(this.core.getCurrentPlayback(),_Clappr.Events.PLAYBACK_LEVEL_SWITCH_END);}},{key:'reload',value:function reload(){this.unBindEvents();this.init();this.bindEvents();}},{key:'shouldRender',value:function shouldRender(){if(!this.core.getCurrentPlayback())return false;var respondsToCurrentLevel=!!this.core.getCurrentPlayback().currentLevel;var hasLevels=!!(this.core.getCurrentPlayback().levels && this.core.getCurrentPlayback().levels.length > 0);return respondsToCurrentLevel && hasLevels;}},{key:'render',value:function render(){if(this.shouldRender()){var style=_Clappr.Styler.getStyleFor(_publicStyleScss2['default'],{baseUrl:this.core.options.baseUrl});this.$el.html(this.template({'levels':this.levels,'title':this.getTitle()}));this.$el.append(style);this.core.mediaControl.$('.media-control-right-panel').append(this.el);this.updateText(this.selectedLevelId);}return this;}},{key:'fillLevels',value:function fillLevels(levels){this.levels = levels;this.configureLevelsLabels();this.render();}},{key:'configureLevelsLabels',value:function configureLevelsLabels(){if(this.core.options.levelSelectorConfig === undefined)return;for(var levelId in this.core.options.levelSelectorConfig.labels || {}) {var thereIsLevel=!!this.findLevelBy(levelId);thereIsLevel && this.changeLevelLabelBy(levelId,this.core.options.levelSelectorConfig.labels[labelId]);}}},{key:'findLevelBy',value:function findLevelBy(id){var foundLevel;this.levels.forEach(function(level){if(level.id === id){foundLevel = level;}});return foundLevel;}},{key:'changeLevelLabelBy',value:function changeLevelLabelBy(id,newLabel){var _this=this;this.levels.forEach(function(level,index){if(level.id === id){_this.levels[index] = newLabel;}});}},{key:'onLevelSelect',value:function onLevelSelect(event){this.selectedLevelId = parseInt(event.target.dataset.levelSelectorSelect,10);this.core.getCurrentPlayback().currentLevel = this.selectedLevelId;this.toggleContextMenu();this.render();event.stopPropagation();return false;}},{key:'onShowLevelSelectMenu',value:function onShowLevelSelectMenu(event){this.toggleContextMenu();}},{key:'toggleContextMenu',value:function toggleContextMenu(){this.$('.level_selector ul').toggle();}},{key:'buttonElement',value:function buttonElement(){return this.$('.level_selector button');}},{key:'startAnimation',value:function startAnimation(){this.buttonElement().addClass('changing');}},{key:'stopAnimation',value:function stopAnimation(){this.buttonElement().removeClass('changing');}},{key:'getTitle',value:function getTitle(){return (this.core.options.levelSelectorConfig || {}).title;}},{key:'updateText',value:function updateText(level){this.buttonElement().text(level === AUTO?'AUTO':this.findLevelBy(level).label);}}]);return LevelSelector;})(_Clappr.UICorePlugin);exports['default'] = LevelSelector;module.exports = exports['default'];\n\n/***/ },\n/* 2 */\n/*!*************************!*\\\n !*** external \"Clappr\" ***!\n \\*************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n/***/ },\n/* 3 */\n/*!****************************************!*\\\n !*** ./src/public/level-selector.html ***!\n \\****************************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"\\n
    \\n <% if (title) { %>\\n
  • <%= title %>
  • \\n <% }; %>\\n
  • AUTO
  • \\n <% for (var i = 0; i < levels.length; i++) { %>\\n
  • \\\"><%= levels[i].label %>
  • \\n <% }; %>\\n
\\n\";\n\n/***/ },\n/* 4 */\n/*!*******************************!*\\\n !*** ./src/public/style.scss ***!\n \\*******************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\texports = module.exports = __webpack_require__(/*! ./../../~/css-loader/lib/css-base.js */ 5)();\n\t// imports\n\t\n\t\n\t// module\n\texports.push([module.id, \".level_selector[data-level-selector]{float:right;margin-top:5px;position:relative}.level_selector[data-level-selector] button{background-color:transparent;color:#fff;font-family:Roboto,Open Sans,Arial,sans-serif;-webkit-font-smoothing:antialiased;border:none;font-size:10px}.level_selector[data-level-selector] button:hover{color:#c9c9c9}.level_selector[data-level-selector] button.changing{-webkit-animation:pulse .5s infinite alternate}.level_selector[data-level-selector]>ul{list-style-type:none;position:absolute;bottom:25px;border:1px solid #000;display:none;background-color:#e6e6e6}.level_selector[data-level-selector] li{font-size:10px}.level_selector[data-level-selector] li[data-title]{background-color:#c3c2c2;padding:5px}.level_selector[data-level-selector] li a{color:#444;padding:2px 10px;display:block;text-decoration:none}.level_selector[data-level-selector] li a:hover{background-color:#555;color:#fff}.level_selector[data-level-selector] li a:hover a{color:#fff;text-decoration:none}@-webkit-keyframes pulse{0%{color:#fff}50%{color:#ff0101}to{color:#b80000}}\", \"\"]);\n\t\n\t// exports\n\n\n/***/ },\n/* 5 */\n/*!**************************************!*\\\n !*** ./~/css-loader/lib/css-base.js ***!\n \\**************************************/\n/***/ function(module, exports) {\n\n\t/*\r\n\t\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\t\tAuthor Tobias Koppers @sokra\r\n\t*/ // css base code, injected by the css-loader\n\t\"use strict\";module.exports = function(){var list=[]; // return the list of modules as css string\n\tlist.toString = function toString(){var result=[];for(var i=0;i < this.length;i++) {var item=this[i];if(item[2]){result.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");}else {result.push(item[1]);}}return result.join(\"\");}; // import a list of modules into the list\n\tlist.i = function(modules,mediaQuery){if(typeof modules === \"string\")modules = [[null,modules,\"\"]];var alreadyImportedModules={};for(var i=0;i < this.length;i++) {var id=this[i][0];if(typeof id === \"number\")alreadyImportedModules[id] = true;}for(i = 0;i < modules.length;i++) {var item=modules[i]; // skip already imported module\n\t// this implementation is not 100% perfect for weird media query combinations\n\t// when a module is imported multiple times with different media queries.\n\t// I hope this will never occur (Hey this way we have smaller bundles)\n\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]){if(mediaQuery && !item[2]){item[2] = mediaQuery;}else if(mediaQuery){item[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";}list.push(item);}}};return list;};\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** level-selector.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"<%=baseUrl%>/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 57a044006e866779c4a7\n **/","export default require('./src/main.js')\n\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","import {Events, Styler, UICorePlugin, template} from 'Clappr'\nimport pluginHtml from './public/level-selector.html'\nimport pluginStyle from './public/style.scss'\n\nconst AUTO = -1\n\nexport default class LevelSelector extends UICorePlugin {\n\n static get version() { return VERSION }\n\n get name() { return 'level_selector' }\n get template() { return template(pluginHtml) }\n\n get attributes() {\n return {\n 'class': this.name,\n 'data-level-selector': ''\n }\n }\n\n get events() {\n return {\n 'click [data-level-selector-select]': 'onLevelSelect',\n 'click [data-level-selector-button]': 'onShowLevelSelectMenu'\n }\n }\n\n constructor(core) {\n super(core)\n this.init()\n this.render()\n }\n\n init() {\n this.levels = []\n this.selectedLevelId = AUTO\n }\n\n bindEvents() {\n this.listenTo(this.core.mediaControl, Events.MEDIACONTROL_CONTAINERCHANGED, this.reload)\n this.listenTo(this.core.mediaControl, Events.MEDIACONTROL_RENDERED, this.render)\n this.listenTo(this.core.getCurrentPlayback(), Events.PLAYBACK_LEVELS_AVAILABLE, this.fillLevels)\n this.listenTo(this.core.getCurrentPlayback(), Events.PLAYBACK_LEVEL_SWITCH_START, this.startAnimation)\n this.listenTo(this.core.getCurrentPlayback(), Events.PLAYBACK_LEVEL_SWITCH_END, this.stopAnimation)\n\n var playbackLevelsAvaialbeWasTriggered = this.core.getCurrentPlayback().levels && this.core.getCurrentPlayback().levels.length > 0\n playbackLevelsAvaialbeWasTriggered && this.fillLevels(this.core.getCurrentPlayback().levels)\n }\n\n unBindEvents() {\n this.stopListening(this.core.mediaControl, Events.MEDIACONTROL_CONTAINERCHANGED)\n this.stopListening(this.core.mediaControl, Events.MEDIACONTROL_RENDERED)\n this.stopListening(this.core.getCurrentPlayback(), Events.PLAYBACK_LEVELS_AVAILABLE)\n this.stopListening(this.core.getCurrentPlayback(), Events.PLAYBACK_LEVEL_SWITCH_START)\n this.stopListening(this.core.getCurrentPlayback(), Events.PLAYBACK_LEVEL_SWITCH_END)\n }\n\n reload() {\n this.unBindEvents()\n this.init()\n this.bindEvents()\n }\n\n shouldRender() {\n if (!this.core.getCurrentPlayback()) return false\n\n var respondsToCurrentLevel = !!this.core.getCurrentPlayback().currentLevel\n var hasLevels = !!(this.core.getCurrentPlayback().levels && this.core.getCurrentPlayback().levels.length > 0)\n return respondsToCurrentLevel && hasLevels\n }\n\n render() {\n if (this.shouldRender()) {\n var style = Styler.getStyleFor(pluginStyle, {baseUrl: this.core.options.baseUrl})\n\n this.$el.html(this.template({'levels':this.levels, 'title': this.getTitle()}))\n this.$el.append(style)\n this.core.mediaControl.$('.media-control-right-panel').append(this.el)\n this.updateText(this.selectedLevelId)\n }\n return this\n }\n\n fillLevels(levels) {\n this.levels = levels\n this.configureLevelsLabels()\n this.render()\n }\n\n configureLevelsLabels() {\n if (this.core.options.levelSelectorConfig === undefined) return\n\n for(var levelId in (this.core.options.levelSelectorConfig.labels || {})){\n var thereIsLevel = !!this.findLevelBy(levelId)\n thereIsLevel && this.changeLevelLabelBy(levelId, this.core.options.levelSelectorConfig.labels[labelId])\n }\n }\n\n findLevelBy(id) {\n var foundLevel\n this.levels.forEach((level) => { if (level.id === id) {foundLevel = level} })\n return foundLevel\n }\n\n changeLevelLabelBy(id, newLabel) {\n this.levels.forEach((level, index) => {\n if (level.id === id) {\n this.levels[index] = newLabel\n }\n })\n }\n\n onLevelSelect(event) {\n this.selectedLevelId = parseInt(event.target.dataset.levelSelectorSelect, 10)\n this.core.getCurrentPlayback().currentLevel = this.selectedLevelId\n\n this.toggleContextMenu()\n this.render()\n\n event.stopPropagation()\n return false\n }\n\n onShowLevelSelectMenu(event) { this.toggleContextMenu() }\n\n toggleContextMenu() { this.$('.level_selector ul').toggle() }\n\n buttonElement() { return this.$('.level_selector button') }\n\n startAnimation() { this.buttonElement().addClass('changing') }\n\n stopAnimation() { this.buttonElement().removeClass('changing') }\n\n getTitle() { return (this.core.options.levelSelectorConfig || {}).title }\n\n updateText(level) { this.buttonElement().text((level === AUTO)? 'AUTO' : this.findLevelBy(level).label) }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main.js\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"Clappr\"\n ** module id = 2\n ** module chunks = 0\n **/","module.exports = \"\\n
    \\n <% if (title) { %>\\n
  • <%= title %>
  • \\n <% }; %>\\n
  • AUTO
  • \\n <% for (var i = 0; i < levels.length; i++) { %>\\n
  • \\\"><%= levels[i].label %>
  • \\n <% }; %>\\n
\\n\";\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/public/level-selector.html\n ** module id = 3\n ** module chunks = 0\n **/","exports = module.exports = require(\"./../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".level_selector[data-level-selector]{float:right;margin-top:5px;position:relative}.level_selector[data-level-selector] button{background-color:transparent;color:#fff;font-family:Roboto,Open Sans,Arial,sans-serif;-webkit-font-smoothing:antialiased;border:none;font-size:10px}.level_selector[data-level-selector] button:hover{color:#c9c9c9}.level_selector[data-level-selector] button.changing{-webkit-animation:pulse .5s infinite alternate}.level_selector[data-level-selector]>ul{list-style-type:none;position:absolute;bottom:25px;border:1px solid #000;display:none;background-color:#e6e6e6}.level_selector[data-level-selector] li{font-size:10px}.level_selector[data-level-selector] li[data-title]{background-color:#c3c2c2;padding:5px}.level_selector[data-level-selector] li a{color:#444;padding:2px 10px;display:block;text-decoration:none}.level_selector[data-level-selector] li a:hover{background-color:#555;color:#fff}.level_selector[data-level-selector] li a:hover a{color:#fff;text-decoration:none}@-webkit-keyframes pulse{0%{color:#fff}50%{color:#ff0101}to{color:#b80000}}\", \"\"]);\n\n// exports\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/public/style.scss\n ** module id = 4\n ** module chunks = 0\n **/","/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\n// css base code, injected by the css-loader\r\nmodule.exports = function() {\r\n\tvar list = [];\r\n\r\n\t// return the list of modules as css string\r\n\tlist.toString = function toString() {\r\n\t\tvar result = [];\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar item = this[i];\r\n\t\t\tif(item[2]) {\r\n\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\r\n\t\t\t} else {\r\n\t\t\t\tresult.push(item[1]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result.join(\"\");\r\n\t};\r\n\r\n\t// import a list of modules into the list\r\n\tlist.i = function(modules, mediaQuery) {\r\n\t\tif(typeof modules === \"string\")\r\n\t\t\tmodules = [[null, modules, \"\"]];\r\n\t\tvar alreadyImportedModules = {};\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar id = this[i][0];\r\n\t\t\tif(typeof id === \"number\")\r\n\t\t\t\talreadyImportedModules[id] = true;\r\n\t\t}\r\n\t\tfor(i = 0; i < modules.length; i++) {\r\n\t\t\tvar item = modules[i];\r\n\t\t\t// skip already imported module\r\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\r\n\t\t\t// when a module is imported multiple times with different media queries.\r\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\r\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\r\n\t\t\t\tif(mediaQuery && !item[2]) {\r\n\t\t\t\t\titem[2] = mediaQuery;\r\n\t\t\t\t} else if(mediaQuery) {\r\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\r\n\t\t\t\t}\r\n\t\t\t\tlist.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\treturn list;\r\n};\r\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/css-loader/lib/css-base.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/package.json b/package.json index 3f955a6..7562b9f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "level-selector", "description": "A simple plugin for Clappr that adds support to manually select level on multi-bitrate streams.", - "version": "0.1.2", + "version": "0.1.3", "license": "MIT", "repository": "clappr/clappr-level-selector-plugin", "main": "index.js",