From 152082d3525c9627c5b1c435ffe3d05807148784 Mon Sep 17 00:00:00 2001 From: Anton Schubert Date: Fri, 22 Dec 2017 21:18:13 +0100 Subject: update clapprio and plugins --- assets/clapprio/level-selector.min.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'assets/clapprio/level-selector.min.js') diff --git a/assets/clapprio/level-selector.min.js b/assets/clapprio/level-selector.min.js index c851956..e4310dd 100644 --- a/assets/clapprio/level-selector.min.js +++ b/assets/clapprio/level-selector.min.js @@ -1,10 +1,10 @@ !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)}([/*!******************!*\ !*** ./index.js ***! \******************/ -function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=l(1),e.exports=t["default"]},/*!*********************!*\ +function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=l(/*! ./src/main.js */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;t&&this.fillLevels(e.levels)}},{key:"reload",value:function(){this.unBindEvents(),this.bindEvents(),this.bindPlaybackEvents()}},{key:"shouldRender",value:function(){if(!this.core.getCurrentContainer())return!1;var e=this.core.getCurrentPlayback();if(!e)return!1;var t=void 0!==e.currentLevel,l=!!(this.levels&&this.levels.length>1);return t&&l}},{key:"render",value:function(){if(this.shouldRender()){var e=a.Styler.getStyleFor(h["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.highlightCurrentLevel()}return this}},{key:"fillLevels",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?f:arguments[1];void 0===this.selectedLevelId&&(this.selectedLevelId=t),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||{}){e=parseInt(e,10);var t=!!this.findLevelBy(e);t&&this.changeLevelLabelBy(e,this.core.options.levelSelectorConfig.labels[e])}}},{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].label=t)})}},{key:"onLevelSelect",value:function(e){return this.selectedLevelId=parseInt(e.target.dataset.levelSelectorSelect,10),this.core.getCurrentPlayback().currentLevel==this.selectedLevelId?!1:(this.core.getCurrentPlayback().currentLevel=this.selectedLevelId,this.toggleContextMenu(),e.stopPropagation(),!1)}},{key:"onShowLevelSelectMenu",value:function(e){this.toggleContextMenu()}},{key:"hideSelectLevelMenu",value:function(){this.$(".level_selector ul").hide()}},{key:"toggleContextMenu",value:function(){this.$(".level_selector ul").toggle()}},{key:"buttonElement",value:function(){return this.$(".level_selector button")}},{key:"levelElement",value:function(e){return this.$(".level_selector ul a"+(isNaN(e)?"":'[data-level-selector-select="'+e+'"]')).parent()}},{key:"getTitle",value:function(){return(this.core.options.levelSelectorConfig||{}).title}},{key:"startLevelSwitch",value:function(){this.buttonElement().addClass("changing")}},{key:"stopLevelSwitch",value:function(){this.buttonElement().removeClass("changing")}},{key:"updateText",value:function(e){e===f?this.buttonElement().text(this.currentLevel?"AUTO ("+this.currentLevel.label+")":"AUTO"):this.buttonElement().text(this.findLevelBy(e).label)}},{key:"updateCurrentLevel",value:function(e){var t=this.findLevelBy(e.level);this.currentLevel=t?t:null,this.highlightCurrentLevel()}},{key:"highlightCurrentLevel",value:function(){this.levelElement().removeClass("current"),this.currentLevel&&this.levelElement(this.currentLevel.id).addClass("current"),this.updateText(this.selectedLevelId)}},{key:"name",get:function(){return"level_selector"}},{key:"template",get:function(){return(0,a.template)(u["default"])}},{key:"attributes",get:function(){return{"class":this.name,"data-level-selector":""}}},{key:"events",get:function(){return{"click [data-level-selector-select]":"onLevelSelect","click [data-level-selector-button]":"onShowLevelSelectMenu"}}}],[{key:"version",get:function(){return VERSION}}]),t}(a.UICorePlugin);t["default"]=d,e.exports=t["default"]},/*!*************************!*\ +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;t&&this.fillLevels(e.levels)}},{key:"reload",value:function(){this.unBindEvents(),this.bindEvents(),this.bindPlaybackEvents()}},{key:"shouldRender",value:function(){if(!this.core.getCurrentContainer())return!1;var e=this.core.getCurrentPlayback();if(!e)return!1;var t=void 0!==e.currentLevel,l=!!(this.levels&&this.levels.length>1);return t&&l}},{key:"render",value:function(){if(this.shouldRender()){var e=a.Styler.getStyleFor(h.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.highlightCurrentLevel()}return this}},{key:"fillLevels",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?f:arguments[1];void 0===this.selectedLevelId&&(this.selectedLevelId=t),this.levels=e,this.configureLevelsLabels(),this.render()}},{key:"configureLevelsLabels",value:function(){if(this.levels.forEach(function(e){e.label=e.height+"p"}),void 0!==this.core.options.levelSelectorConfig){var e=this.core.options.levelSelectorConfig.labelCallback;if(e&&"function"!=typeof e)throw new TypeError("labelCallback must be a function");var t=this.core.options.levelSelectorConfig.labels,l=t?this.core.options.levelSelectorConfig.labels:{};if(e||t){var n,o;for(var r in this.levels)n=this.levels[r],o=l[n.id],e?n.label=e(n,o):o&&(n.label=o)}}}},{key:"findLevelBy",value:function(e){var t;return this.levels.forEach(function(l){l.id===e&&(t=l)}),t}},{key:"onLevelSelect",value:function(e){return this.selectedLevelId=parseInt(e.target.dataset.levelSelectorSelect,10),this.core.getCurrentPlayback().currentLevel!=this.selectedLevelId&&(this.core.getCurrentPlayback().currentLevel=this.selectedLevelId,this.toggleContextMenu(),e.stopPropagation(),!1)}},{key:"onShowLevelSelectMenu",value:function(e){this.toggleContextMenu()}},{key:"hideSelectLevelMenu",value:function(){this.$(".level_selector ul").hide()}},{key:"toggleContextMenu",value:function(){this.$(".level_selector ul").toggle()}},{key:"buttonElement",value:function(){return this.$(".level_selector button")}},{key:"levelElement",value:function(e){return this.$(".level_selector ul a"+(isNaN(e)?"":'[data-level-selector-select="'+e+'"]')).parent()}},{key:"getTitle",value:function(){return(this.core.options.levelSelectorConfig||{}).title}},{key:"updateText",value:function(e){e===f?this.buttonElement().text(this.currentLevel?"AUTO ("+this.currentLevel.label+")":"AUTO"):this.buttonElement().text(this.findLevelBy(e).label)}},{key:"handleAdaptation",value:function(e){var t=this.findLevelBy(e.level);this.currentLevel=t?t:null,this.highlightCurrentLevel()}},{key:"highlightCurrentLevel",value:function(){var e=this;this.updateText(this.selectedLevelId),this.levelElement().removeClass("current"),this.currentLevel&&this.levelElement(this.currentLevel.id).addClass("current");var t=this.currentLevel&&this.currentLevel.language;t&&(this.levelElement().removeClass("hidden"),this.levels.forEach(function(l){l.language!=t&&e.levelElement(l.id).addClass("hidden")}))}},{key:"name",get:function(){return"level_selector"}},{key:"template",get:function(){return(0,a.template)(u.default)}},{key:"attributes",get:function(){return{class:this.name,"data-level-selector":""}}},{key:"events",get:function(){return{"click [data-level-selector-select]":"onLevelSelect","click [data-level-selector-button]":"onShowLevelSelectMenu"}}}],[{key:"version",get:function(){return VERSION}}]),t}(a.UICorePlugin);t.default=d,e.exports=t.default},/*!*************************!*\ !*** external "Clappr" ***! \*************************/ function(t,l){t.exports=e},/*!****************************************!*\ @@ -13,7 +13,7 @@ function(t,l){t.exports=e},/*!****************************************!*\ function(e,t){e.exports='\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}.level_selector[data-level-selector] li.current a{color:red}@-webkit-keyframes pulse{0%{color:#fff}50%{color:#ff0101}to{color:#b80000}}",""])},/*!**************************************!*\ +function(e,t,l){t=e.exports=l(/*! ../../~/css-loader/lib/css-base.js */5)(),t.push([e.id,".level_selector[data-level-selector]{float:right;margin-top:7px;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:12px}.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:12px}.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}.level_selector[data-level-selector] li.current a{color:red}.level_selector[data-level-selector] li.hidden{display: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