aboutsummaryrefslogtreecommitdiff
path: root/assets/voc-player/player.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/voc-player/player.js')
-rw-r--r--assets/voc-player/player.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/assets/voc-player/player.js b/assets/voc-player/player.js
index e990c45..6615d1f 100644
--- a/assets/voc-player/player.js
+++ b/assets/voc-player/player.js
@@ -1447,5 +1447,5 @@ function dc(){}function fc(){Mu?console.debug("EmeEncryptionSchemePolyfill: Alre
/*!******************************************************************************************!*\
!*** external {"amd":"clappr","commonjs":"clappr","commonjs2":"clappr","root":"Clappr"} ***!
\******************************************************************************************/
-/*! no static exports found */function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_clappr__;\n\n//# sourceURL=webpack://AudioTrackSelector/external_%7B%22amd%22:%22clappr%22,%22commonjs%22:%22clappr%22,%22commonjs2%22:%22clappr%22,%22root%22:%22Clappr%22%7D?")}}).default},module.exports=factory(__webpack_require__(0))},function(e,t,r){var n=r(5),i=r(6);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var o={insert:"head",singleton:!1},a=(n(i,o),i.locals?i.locals:{});e.exports=a},function(e,t,r){"use strict";var n,i=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},o=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),a=[];function s(e){for(var t=-1,r=0;r<a.length;r++)if(a[r].identifier===e){t=r;break}return t}function l(e,t){for(var r={},n=[],i=0;i<e.length;i++){var o=e[i],l=t.base?o[0]+t.base:o[0],u=r[l]||0,c="".concat(l," ").concat(u);r[l]=u+1;var d=s(c),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:c,updater:g(f,t),references:1}),n.push(c)}return n}function u(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var i=r.nc;i&&(n.nonce=i)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var c,d=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function f(e,t,r,n){var i=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=d(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function h(e,t,r){var n=r.css,i=r.media,o=r.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var p=null,m=0;function g(e,t){var r,n,i;if(t.singleton){var o=m++;r=p||(p=u(t)),n=f.bind(null,r,o,!1),i=f.bind(null,r,o,!0)}else r=u(t),n=h.bind(null,r,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var r=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<r.length;n++){var i=s(r[n]);a[i].references--}for(var o=l(e,t),u=0;u<r.length;u++){var c=s(r[u]);0===a[c].references&&(a[c].updater(),a.splice(c,1))}r=o}}}},function(e,t,r){(t=r(7)(!1)).push([e.i,"button.media-control-button[data-hd-indicator]{display:none !important}\n",""]),e.exports=t},function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var i=(a=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),o=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(o).concat([i]).join("\n")}var a,s,l;return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(n)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);n&&i[l[0]]||(r&&(l[2]?l[2]="".concat(r," and ").concat(l[2]):l[2]=r),t.push(l))}},t}},function(e,t,r){"use strict";r.r(t),r.d(t,"Player",(function(){return x})),r.d(t,"Mediator",(function(){return n.Mediator})),r.d(t,"Events",(function(){return n.Events})),r.d(t,"Browser",(function(){return n.Browser})),r.d(t,"PlayerInfo",(function(){return n.PlayerInfo})),r.d(t,"MediaControl",(function(){return n.MediaControl})),r.d(t,"ContainerPlugin",(function(){return n.ContainerPlugin})),r.d(t,"UIContainerPlugin",(function(){return n.UIContainerPlugin})),r.d(t,"CorePlugin",(function(){return n.CorePlugin})),r.d(t,"UICorePlugin",(function(){return n.UICorePlugin})),r.d(t,"Playback",(function(){return n.Playback})),r.d(t,"Container",(function(){return n.Container})),r.d(t,"Core",(function(){return n.Core})),r.d(t,"PlayerError",(function(){return n.PlayerError})),r.d(t,"Loader",(function(){return n.Loader})),r.d(t,"BaseObject",(function(){return n.BaseObject})),r.d(t,"UIObject",(function(){return n.UIObject})),r.d(t,"Utils",(function(){return n.Utils})),r.d(t,"BaseFlashPlayback",(function(){return n.BaseFlashPlayback})),r.d(t,"Flash",(function(){return n.Flash})),r.d(t,"FlasHLS",(function(){return n.FlasHLS})),r.d(t,"HLS",(function(){return n.HLS})),r.d(t,"HTML5Audio",(function(){return n.HTML5Audio})),r.d(t,"HTML5Video",(function(){return n.HTML5Video})),r.d(t,"HTMLImg",(function(){return n.HTMLImg})),r.d(t,"NoOp",(function(){return n.NoOp})),r.d(t,"ClickToPausePlugin",(function(){return n.ClickToPausePlugin})),r.d(t,"DVRControls",(function(){return n.DVRControls})),r.d(t,"Favicon",(function(){return n.Favicon})),r.d(t,"Log",(function(){return n.Log})),r.d(t,"Poster",(function(){return n.Poster})),r.d(t,"SpinnerThreeBouncePlugin",(function(){return n.SpinnerThreeBouncePlugin})),r.d(t,"WaterMarkPlugin",(function(){return n.WaterMarkPlugin})),r.d(t,"Styler",(function(){return n.Styler})),r.d(t,"Vendor",(function(){return n.Vendor})),r.d(t,"version",(function(){return n.version})),r.d(t,"template",(function(){return n.template})),r.d(t,"$",(function(){return n.$}));r(4);var n=r(0),i=r.n(n),o=r(1),a=r.n(o),s=r(2),l=r.n(s),u=r(3),c=r.n(u);function d(e){return(d="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})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(n,e);var t,r=(t=n,function(){var e,r=v(t);if(y()){var n=v(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return g(this,e)});function n(){var e;f(this,n);for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return(e=r.call.apply(r,[this].concat(i))).timeout=1,e.max_timeout=10,e}return p(n,[{key:"name",get:function(){return"error_plugin"}},{key:"background",get:function(){return"data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22100%22%20height%3D%22100%22%20viewBox%3D%220%200%2026.458318%2026.458333%22%3E%3Cpath%20d%3D%22M13.23.302C6.07.302.264%206.107.264%2013.267a12.965%2012.965%200%200%200%20.847%204.595c.19-.497.408-.982.682-1.438.14-.232.294-.457.396-.707.103-.25.15-.533.072-.792a1.362%201.362%200%200%200-.22-.404c-.092-.123-.192-.24-.275-.37a1.662%201.662%200%200%201-.255-1.12%201.5%201.5%200%200%201%20.58-.987c.28-.208.635-.3.985-.288a1.757%201.757%200%200%201%20.346.048c.452.11.852.393%201.148.75.368.447.584%201.01.637%201.586a3.574%203.574%200%200%201-.275%201.693c-.4.955-1.15%201.725-1.565%202.673-.338.775-.435%201.638-.39%202.483.007.077.018.155.025.234a12.965%2012.965%200%200%200%203.62%203.18%2017.63%2017.63%200%200%201-.13-2.11c.002-.56.03-1.12.085-1.675-.34-.236-.65-.51-.87-.86-.392-.62-.466-1.408-.305-2.124.16-.717.54-1.37.997-1.945a7.833%207.833%200%200%201%202.835-2.223%2010.305%2010.305%200%200%201-.09-.126%204.854%204.854%200%200%201-.702-2.176c-.06-.777.064-1.554.115-2.33.037-.543.04-1.085.07-1.627.038-.627.114-1.255.29-1.858a2.36%202.36%200%200%201%20.266-.63%201.4%201.4%200%200%201%20.594-.514c.274-.108.51-.132.776-.087.22.046.425.156.604.294.18.138.335.304.48.477a7.298%207.298%200%200%201%201.04%201.617%203.57%203.57%200%200%201%201.09%200%207.287%207.287%200%200%201%201.04-1.616%203.21%203.21%200%200%201%20.48-.476c.18-.14.383-.248.604-.295a1.268%201.268%200%200%201%20.78.086%201.402%201.402%200%200%201%20.595.517c.124.19.202.408.266.626.175.602.252%201.23.29%201.856.03.543.033%201.087.07%201.628.05.777.175%201.554.116%202.33a4.855%204.855%200%200%201-.705%202.178c-.03.05-.07.096-.103.145.247.278.598.513.898.614a1.956%201.956%200%200%200%201.05.044%201.65%201.65%200%200%200%20.533-.226%201.253%201.253%200%200%200%20.397-.418c.118-.21.166-.45.192-.687.067-.61%200-1.224-.05-1.835-.034-.396-.062-.8.027-1.187.06-.26.177-.518.373-.7a1.106%201.106%200%200%201%20.465-.255%201.312%201.312%200%200%201%20.53-.03c.38.057.736.274.948.594.12.18.194.39.238.604.044.213.06.43.072.648.04.76.04%201.522.018%202.284-.018.665-.055%201.348-.32%201.957-.343.782-1.032%201.366-1.775%201.786a7.052%207.052%200%200%201-1.588.647c.482%201.54.733%203.24.733%204.968a17.6%2017.6%200%200%201-.135%202.125%2012.964%2012.964%200%200%200%206.384-11.152c0-7.16-5.806-12.965-12.965-12.965zM9.602%2016.284v1.483a1.88%201.88%200%200%201%201.083.362%201.738%201.738%200%200%201%20.556.68c.122.27.166.576.116.868a1.493%201.493%200%200%201-.332.708%201.647%201.647%200%200%201-.635.458%201.738%201.738%200%200%201-.787.122v3.73l7.762-4.208-7.762-4.204z%22%20fill%3D%22%23999%22%2F%3E%3C%2Fsvg%3E"}}]),p(n,[{key:"bindEvents",value:function(){this.listenTo(this.container,i.a.Events.CONTAINER_ERROR,this.onError)}},{key:"hide",value:function(){this._err&&this._err.remove()}},{key:"show",value:function(){var e=i.a.$;this.hide();var t="A fatal error occured.";this.options.errorPlugin&&this.options.errorPlugin.text&&(t=this.options.errorPlugin.text),this._err=e("<div>").css({position:"absolute","z-index":"999",width:"100%",height:"100%","background-image":"url("+this.background+")","background-size":"18%","background-repeat":"no-repeat","background-color":"black","background-position":"center","text-align":"center","font-weight":"bold",color:"#eee"});var r=e("<div>").css({position:"absolute",width:"100%","padding-bottom":"5%",bottom:0}).append(e("<h2>").text(t).css({"font-size":"200%"})).append(e("<p>").text("We will be right back").css({"font-size":"120%",margin:"15px"}));this._err.append(r),this.container&&this.container.$el.prepend(this._err)}},{key:"onError",value:function(e){var t=this;if(this.container){var r=this.options.errorPlugin.onError;!r||"function"!=typeof r||r(e,(function(){t.hide(),t.container.getPlugin("click_to_pause").enable()}))?(this.show(),this.container.getPlugin("click_to_pause").disable()):console.log("skipping overlay")}}}]),n}(i.a.ContainerPlugin);function _(e){return(_="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})(e)}function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e,t){return!t||"object"!==_(t)&&"function"!=typeof t?S(e):t}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(u,e);var t,r,i,o,s=(t=u,function(){var e,r=k(t);if(w()){var n=k(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return T(this,e)});function u(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=s.call(this)).timeout=5,t.maxTimeout=15;var r=t._options=t._buildConfig(e),i=t._player=new n.Player(r);return t.attachTo=i.attachTo.bind(i),i.core&&i.core.isReady?t._addEventListeners():t.listenToOnce(i,n.Events.PLAYER_READY,t._addEventListeners.bind(S(t))),t}return r=u,(i=[{key:"_buildConfig",value:function(e){var t,r,n,i,o=[c.a,l.a,a.a,b];return e.plugins&&e.plugins.length&&(o=o.concat(e.plugins),console.log("loading plugins"),o.forEach((function(e){return console.log(e.name,e.type)}))),e.vocStream&&(r=e.vocStream,n=e.audioOnly,i="MediaSource"in window,console.log("vp9/vorbis",MediaSource.isTypeSupported('video/webm; codecs="vp9,vorbis"'),"vp9/opus",MediaSource.isTypeSupported('video/webm; codecs="vp9,opus"')),t=i&&MediaSource.isTypeSupported('video/webm; codecs="vp9,opus"')?{source:"//cdn.c3voc.de/dash/".concat(r,"/manifest.mpd")}:n||!i&&""==document.createElement("video").canPlayType("application/vnd.apple.mpegURL")?n?{source:"//cdn.c3voc.de/".concat(r,"_native.mp3"),mimeType:"audio/mp3"}:{source:"//cdn.c3voc.de/".concat(r,"_native_hd.webm"),mimeType:"video/webm"}:{source:"//cdn.c3voc.de/hls/".concat(r,"_native_hd.m3u8"),mimeType:"application/vnd.apple.mpegURL"},delete e.vocStream),Object.assign({source:t,width:"100%",height:"100%",disableErrorScreen:!0,shakaConfiguration:{abr:{defaultBandwidthEstimate:1e6},streaming:{jumpLargeGaps:!0},manifest:{dash:{defaultPresentationDelay:3,ignoreSuggestedPresentationDelay:!0}}},audioTrackSelectorConfig:{title:"Language"},levelSelectorConfig:{labelCallback:function(e,t){var r=e.videoBandwidth||e.level.bitrate;return r<=1e5?"Slides":r<=8e5?"SD":"HD"},title:"Quality"},errorPlugin:{text:"Stream offline",onError:this._handleError.bind(this)}},e,{plugins:o})}},{key:"_containerChanged",value:function(){this.stopListening(),this._addEventListeners()}},{key:"_addEventListeners",value:function(){var e=this._player.core;this._container=e.activeContainer,this.listenTo(this._player,n.Events.PLAYER_PLAY,this._handlePlay),this.listenTo(this._player,n.Events.PLAYER_STOP,this._handleStop),this.listenTo(e,n.Events.CORE_ACTIVE_CONTAINER_CHANGED,this._containerChanged),this.listenTo(this._container,n.Events.CONTAINER_STATE_BUFFERFULL,this._handleBufferFull),this.listenTo(this._container,n.Events.CONTAINER_OPTIONS_CHANGE,(function(){console.log("options changed")}))}},{key:"_getTimeout",value:function(){var e=.6*this.timeout+.4*this.timeout*Math.random();return this.timeout=Math.min(2*this.timeout,this.maxTimeout),e}},{key:"_resetTimeout",value:function(){this.timeout=5}},{key:"_handleError",value:function(e,t){this._recovery?clearTimeout(this._recovery.timeout):this._player.stop();var r=this._getTimeout();return console.log("got error",e.code,"retrying in ".concat(Math.round(r),"s")),this._recovery={clearOverlay:t,state:"restarting",timeout:setTimeout(this._waitForMedia.bind(this),1e3*r)},!0}},{key:"_handlePlay",value:function(){this._recovery&&(console.log("soft recovery: play"),this._recovery.clearOverlay(),clearTimeout(this._recovery.timeout),this._recovery=null),this._resetTimeout()}},{key:"_handleStop",value:function(e){this._recovery&&this._container&&(console.log("soft recovery: stop"),this._container.playback.play.call(this._container.playback))}},{key:"_handleBufferFull",value:function(){if(this._recovery){console.log("seeking to end for recovery");var e=Math.max(this._player.getDuration()-6,0);this._player.seek(e)}}},{key:"_handleMediaCheck",value:function(e){if(e)console.log("try playing again, media should be available"),this._player.play();else{var t=this._getTimeout();console.log("test for media failed, retrying in ~".concat(Math.round(t),"s")),setTimeout(this._waitForMedia.bind(this),1e3*t)}}},{key:"_waitForMedia",value:function(){var e=this._player.options.source;e&&e.source&&(e=e.source),"string"==typeof e?function(e,t){if(!t||"function"!=typeof t)throw new Error("Excepted function, got '".concat(t,"'"));var r=new XMLHttpRequest;r.onreadystatechange=function(){this.readyState===XMLHttpRequest.HEADERS_RECEIVED&&(200===this.status?t(!0):t(!1),r.abort())},r.open("GET",e,!0),r.send(null)}(e,this._handleMediaCheck.bind(this)):this.reset()}},{key:"reset",value:function(){console.log("performing hard reset"),this._recovery=null;var e=0==this._player.getVolume();e||this._player.mute(),this._player.configure({source:this._player.options.source,autoPlay:!0}),e||this._player.unmute()}}])&&A(r.prototype,i),o&&A(r,o),u}(n.BaseObject)}])}));
+/*! no static exports found */function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_clappr__;\n\n//# sourceURL=webpack://AudioTrackSelector/external_%7B%22amd%22:%22clappr%22,%22commonjs%22:%22clappr%22,%22commonjs2%22:%22clappr%22,%22root%22:%22Clappr%22%7D?")}}).default},module.exports=factory(__webpack_require__(0))},function(e,t,r){var n=r(5),i=r(6);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var o={insert:"head",singleton:!1},a=(n(i,o),i.locals?i.locals:{});e.exports=a},function(e,t,r){"use strict";var n,i=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},o=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),a=[];function s(e){for(var t=-1,r=0;r<a.length;r++)if(a[r].identifier===e){t=r;break}return t}function l(e,t){for(var r={},n=[],i=0;i<e.length;i++){var o=e[i],l=t.base?o[0]+t.base:o[0],u=r[l]||0,c="".concat(l," ").concat(u);r[l]=u+1;var d=s(c),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:c,updater:g(f,t),references:1}),n.push(c)}return n}function u(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var i=r.nc;i&&(n.nonce=i)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var c,d=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function f(e,t,r,n){var i=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=d(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function h(e,t,r){var n=r.css,i=r.media,o=r.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var p=null,m=0;function g(e,t){var r,n,i;if(t.singleton){var o=m++;r=p||(p=u(t)),n=f.bind(null,r,o,!1),i=f.bind(null,r,o,!0)}else r=u(t),n=h.bind(null,r,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var r=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<r.length;n++){var i=s(r[n]);a[i].references--}for(var o=l(e,t),u=0;u<r.length;u++){var c=s(r[u]);0===a[c].references&&(a[c].updater(),a.splice(c,1))}r=o}}}},function(e,t,r){(t=r(7)(!1)).push([e.i,"button.media-control-button[data-hd-indicator]{display:none !important}\n",""]),e.exports=t},function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var i=(a=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),o=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(o).concat([i]).join("\n")}var a,s,l;return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(n)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);n&&i[l[0]]||(r&&(l[2]?l[2]="".concat(r," and ").concat(l[2]):l[2]=r),t.push(l))}},t}},function(e,t,r){"use strict";r.r(t),r.d(t,"Player",(function(){return x})),r.d(t,"Mediator",(function(){return n.Mediator})),r.d(t,"Events",(function(){return n.Events})),r.d(t,"Browser",(function(){return n.Browser})),r.d(t,"PlayerInfo",(function(){return n.PlayerInfo})),r.d(t,"MediaControl",(function(){return n.MediaControl})),r.d(t,"ContainerPlugin",(function(){return n.ContainerPlugin})),r.d(t,"UIContainerPlugin",(function(){return n.UIContainerPlugin})),r.d(t,"CorePlugin",(function(){return n.CorePlugin})),r.d(t,"UICorePlugin",(function(){return n.UICorePlugin})),r.d(t,"Playback",(function(){return n.Playback})),r.d(t,"Container",(function(){return n.Container})),r.d(t,"Core",(function(){return n.Core})),r.d(t,"PlayerError",(function(){return n.PlayerError})),r.d(t,"Loader",(function(){return n.Loader})),r.d(t,"BaseObject",(function(){return n.BaseObject})),r.d(t,"UIObject",(function(){return n.UIObject})),r.d(t,"Utils",(function(){return n.Utils})),r.d(t,"BaseFlashPlayback",(function(){return n.BaseFlashPlayback})),r.d(t,"Flash",(function(){return n.Flash})),r.d(t,"FlasHLS",(function(){return n.FlasHLS})),r.d(t,"HLS",(function(){return n.HLS})),r.d(t,"HTML5Audio",(function(){return n.HTML5Audio})),r.d(t,"HTML5Video",(function(){return n.HTML5Video})),r.d(t,"HTMLImg",(function(){return n.HTMLImg})),r.d(t,"NoOp",(function(){return n.NoOp})),r.d(t,"ClickToPausePlugin",(function(){return n.ClickToPausePlugin})),r.d(t,"DVRControls",(function(){return n.DVRControls})),r.d(t,"Favicon",(function(){return n.Favicon})),r.d(t,"Log",(function(){return n.Log})),r.d(t,"Poster",(function(){return n.Poster})),r.d(t,"SpinnerThreeBouncePlugin",(function(){return n.SpinnerThreeBouncePlugin})),r.d(t,"WaterMarkPlugin",(function(){return n.WaterMarkPlugin})),r.d(t,"Styler",(function(){return n.Styler})),r.d(t,"Vendor",(function(){return n.Vendor})),r.d(t,"version",(function(){return n.version})),r.d(t,"template",(function(){return n.template})),r.d(t,"$",(function(){return n.$}));r(4);var n=r(0),i=r.n(n),o=r(1),a=r.n(o),s=r(2),l=r.n(s),u=r(3),c=r.n(u);function d(e){return(d="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})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),e}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(n,e);var t,r=(t=n,function(){var e,r=v(t);if(y()){var n=v(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return g(this,e)});function n(){var e;f(this,n);for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return(e=r.call.apply(r,[this].concat(i))).timeout=1,e.max_timeout=10,e}return p(n,[{key:"name",get:function(){return"error_plugin"}},{key:"background",get:function(){return"data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22100%22%20height%3D%22100%22%20viewBox%3D%220%200%2026.458318%2026.458333%22%3E%3Cpath%20d%3D%22M13.23.302C6.07.302.264%206.107.264%2013.267a12.965%2012.965%200%200%200%20.847%204.595c.19-.497.408-.982.682-1.438.14-.232.294-.457.396-.707.103-.25.15-.533.072-.792a1.362%201.362%200%200%200-.22-.404c-.092-.123-.192-.24-.275-.37a1.662%201.662%200%200%201-.255-1.12%201.5%201.5%200%200%201%20.58-.987c.28-.208.635-.3.985-.288a1.757%201.757%200%200%201%20.346.048c.452.11.852.393%201.148.75.368.447.584%201.01.637%201.586a3.574%203.574%200%200%201-.275%201.693c-.4.955-1.15%201.725-1.565%202.673-.338.775-.435%201.638-.39%202.483.007.077.018.155.025.234a12.965%2012.965%200%200%200%203.62%203.18%2017.63%2017.63%200%200%201-.13-2.11c.002-.56.03-1.12.085-1.675-.34-.236-.65-.51-.87-.86-.392-.62-.466-1.408-.305-2.124.16-.717.54-1.37.997-1.945a7.833%207.833%200%200%201%202.835-2.223%2010.305%2010.305%200%200%201-.09-.126%204.854%204.854%200%200%201-.702-2.176c-.06-.777.064-1.554.115-2.33.037-.543.04-1.085.07-1.627.038-.627.114-1.255.29-1.858a2.36%202.36%200%200%201%20.266-.63%201.4%201.4%200%200%201%20.594-.514c.274-.108.51-.132.776-.087.22.046.425.156.604.294.18.138.335.304.48.477a7.298%207.298%200%200%201%201.04%201.617%203.57%203.57%200%200%201%201.09%200%207.287%207.287%200%200%201%201.04-1.616%203.21%203.21%200%200%201%20.48-.476c.18-.14.383-.248.604-.295a1.268%201.268%200%200%201%20.78.086%201.402%201.402%200%200%201%20.595.517c.124.19.202.408.266.626.175.602.252%201.23.29%201.856.03.543.033%201.087.07%201.628.05.777.175%201.554.116%202.33a4.855%204.855%200%200%201-.705%202.178c-.03.05-.07.096-.103.145.247.278.598.513.898.614a1.956%201.956%200%200%200%201.05.044%201.65%201.65%200%200%200%20.533-.226%201.253%201.253%200%200%200%20.397-.418c.118-.21.166-.45.192-.687.067-.61%200-1.224-.05-1.835-.034-.396-.062-.8.027-1.187.06-.26.177-.518.373-.7a1.106%201.106%200%200%201%20.465-.255%201.312%201.312%200%200%201%20.53-.03c.38.057.736.274.948.594.12.18.194.39.238.604.044.213.06.43.072.648.04.76.04%201.522.018%202.284-.018.665-.055%201.348-.32%201.957-.343.782-1.032%201.366-1.775%201.786a7.052%207.052%200%200%201-1.588.647c.482%201.54.733%203.24.733%204.968a17.6%2017.6%200%200%201-.135%202.125%2012.964%2012.964%200%200%200%206.384-11.152c0-7.16-5.806-12.965-12.965-12.965zM9.602%2016.284v1.483a1.88%201.88%200%200%201%201.083.362%201.738%201.738%200%200%201%20.556.68c.122.27.166.576.116.868a1.493%201.493%200%200%201-.332.708%201.647%201.647%200%200%201-.635.458%201.738%201.738%200%200%201-.787.122v3.73l7.762-4.208-7.762-4.204z%22%20fill%3D%22%23999%22%2F%3E%3C%2Fsvg%3E"}}]),p(n,[{key:"bindEvents",value:function(){this.listenTo(this.container,i.a.Events.CONTAINER_ERROR,this.onError)}},{key:"hide",value:function(){this._err&&this._err.remove()}},{key:"show",value:function(){var e=i.a.$;this.hide();var t="A fatal error occured.";this.options.errorPlugin&&this.options.errorPlugin.text&&(t=this.options.errorPlugin.text),this._err=e("<div>").css({position:"absolute","z-index":"999",width:"100%",height:"100%","background-image":"url("+this.background+")","background-size":"18%","background-repeat":"no-repeat","background-color":"black","background-position":"center","text-align":"center","font-weight":"bold",color:"#eee"});var r=e("<div>").css({position:"absolute",width:"100%","padding-bottom":"5%",bottom:0}).append(e("<h2>").text(t).css({"font-size":"200%"})).append(e("<p>").text("We will be right back").css({"font-size":"120%",margin:"15px"}));this._err.append(r),this.container&&this.container.$el.prepend(this._err)}},{key:"onError",value:function(e){var t=this;if(this.container){var r=this.options.errorPlugin.onError;!r||"function"!=typeof r||r(e,(function(){t.hide(),t.container.getPlugin("click_to_pause").enable()}))?(this.show(),this.container.getPlugin("click_to_pause").disable()):console.log("skipping overlay")}}}]),n}(i.a.ContainerPlugin);function _(e){return(_="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})(e)}function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e,t){return!t||"object"!==_(t)&&"function"!=typeof t?S(e):t}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(u,e);var t,r,i,o,s=(t=u,function(){var e,r=k(t);if(w()){var n=k(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return T(this,e)});function u(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=s.call(this)).timeout=5,t.maxTimeout=15;var r=t._options=t._buildConfig(e),i=t._player=new n.Player(r);return t.attachTo=i.attachTo.bind(i),i.core&&i.core.isReady?t._addEventListeners():t.listenToOnce(i,n.Events.PLAYER_READY,t._addEventListeners.bind(S(t))),t}return r=u,(i=[{key:"_buildConfig",value:function(e){var t,r,n,i,o=[c.a,l.a,a.a,b];return e.plugins&&e.plugins.length&&(o=o.concat(e.plugins),console.log("loading plugins"),o.forEach((function(e){return console.log(e.name,e.type)}))),e.vocStream&&(r=e.vocStream,n=e.audioOnly,i="MediaSource"in window,console.log("vp9/vorbis",i&&MediaSource.isTypeSupported('video/webm; codecs="vp9,vorbis"'),"vp9/opus",i&&MediaSource.isTypeSupported('video/webm; codecs="vp9,opus"')),t=i&&MediaSource.isTypeSupported('video/webm; codecs="vp9,opus"')?{source:"//cdn.c3voc.de/dash/".concat(r,"/manifest.mpd")}:n||!i&&""==document.createElement("video").canPlayType("application/vnd.apple.mpegURL")?n?{source:"//cdn.c3voc.de/".concat(r,"_native.mp3"),mimeType:"audio/mp3"}:{source:"//cdn.c3voc.de/".concat(r,"_native_hd.webm"),mimeType:"video/webm"}:{source:"//cdn.c3voc.de/hls/".concat(r,"_native_hd.m3u8"),mimeType:"application/vnd.apple.mpegURL"},delete e.vocStream),Object.assign({source:t,width:"100%",height:"100%",disableErrorScreen:!0,shakaConfiguration:{abr:{defaultBandwidthEstimate:1e6},streaming:{jumpLargeGaps:!0},manifest:{dash:{defaultPresentationDelay:3,ignoreSuggestedPresentationDelay:!0}}},audioTrackSelectorConfig:{title:"Language"},levelSelectorConfig:{labelCallback:function(e,t){var r=e.videoBandwidth||e.level.bitrate;return r<=1e5?"Slides":r<=8e5?"SD":"HD"},title:"Quality"},errorPlugin:{text:"Stream offline",onError:this._handleError.bind(this)}},e,{plugins:o})}},{key:"_containerChanged",value:function(){this.stopListening(),this._addEventListeners()}},{key:"_addEventListeners",value:function(){var e=this._player.core;this._container=e.activeContainer,this.listenTo(this._player,n.Events.PLAYER_PLAY,this._handlePlay),this.listenTo(this._player,n.Events.PLAYER_STOP,this._handleStop),this.listenTo(e,n.Events.CORE_ACTIVE_CONTAINER_CHANGED,this._containerChanged),this.listenTo(this._container,n.Events.CONTAINER_STATE_BUFFERFULL,this._handleBufferFull),this.listenTo(this._container,n.Events.CONTAINER_OPTIONS_CHANGE,(function(){console.log("options changed")}))}},{key:"_getTimeout",value:function(){var e=.6*this.timeout+.4*this.timeout*Math.random();return this.timeout=Math.min(2*this.timeout,this.maxTimeout),e}},{key:"_resetTimeout",value:function(){this.timeout=5}},{key:"_handleError",value:function(e,t){this._recovery?clearTimeout(this._recovery.timeout):this._player.stop();var r=this._getTimeout();return console.log("got error",e.code,"retrying in ".concat(Math.round(r),"s")),this._recovery={clearOverlay:t,state:"restarting",timeout:setTimeout(this._waitForMedia.bind(this),1e3*r)},!0}},{key:"_handlePlay",value:function(){this._recovery&&(console.log("soft recovery: play"),this._recovery.clearOverlay(),clearTimeout(this._recovery.timeout),this._recovery=null),this._resetTimeout()}},{key:"_handleStop",value:function(e){this._recovery&&this._container&&(console.log("soft recovery: stop"),this._container.playback.play.call(this._container.playback))}},{key:"_handleBufferFull",value:function(){if(this._recovery){console.log("seeking to end for recovery");var e=Math.max(this._player.getDuration()-6,0);this._player.seek(e)}}},{key:"_handleMediaCheck",value:function(e){if(e)console.log("try playing again, media should be available"),this._player.play();else{var t=this._getTimeout();console.log("test for media failed, retrying in ~".concat(Math.round(t),"s")),setTimeout(this._waitForMedia.bind(this),1e3*t)}}},{key:"_waitForMedia",value:function(){var e=this._player.options.source;e&&e.source&&(e=e.source),"string"==typeof e?function(e,t){if(!t||"function"!=typeof t)throw new Error("Excepted function, got '".concat(t,"'"));var r=new XMLHttpRequest;r.onreadystatechange=function(){this.readyState===XMLHttpRequest.HEADERS_RECEIVED&&(200===this.status?t(!0):t(!1),r.abort())},r.open("GET",e,!0),r.send(null)}(e,this._handleMediaCheck.bind(this)):this.reset()}},{key:"reset",value:function(){console.log("performing hard reset"),this._recovery=null;var e=0==this._player.getVolume();e||this._player.mute(),this._player.configure({source:this._player.options.source,autoPlay:!0}),e||this._player.unmute()}}])&&A(r.prototype,i),o&&A(r,o),u}(n.BaseObject)}])}));
//# sourceMappingURL=player.js.map \ No newline at end of file