streaming-website/assets/voc-player/player.umd.js

882 lines
609 KiB
JavaScript
Raw Normal View History

2023-12-29 13:58:28 +00:00
(function(ue,It){typeof exports=="object"&&typeof module<"u"?It(exports):typeof define=="function"&&define.amd?define(["exports"],It):(ue=typeof globalThis<"u"?globalThis:ue||self,It(ue.VOCPlayer={}))})(this,function(ue){"use strict";function It(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable})),t.push.apply(t,i)}return t}function ei(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?It(Object(t),!0).forEach(function(i){Pa(s,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):It(Object(t)).forEach(function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(t,i))})}return s}function Rt(s){"@babel/helpers - typeof";return Rt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rt(s)}function he(s,e){if(!(s instanceof e))throw new TypeError("Cannot call a class as a function")}function zn(s,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(s,i.key,i)}}function de(s,e,t){return e&&zn(s.prototype,e),t&&zn(s,t),Object.defineProperty(s,"prototype",{writable:!1}),s}function Pa(s,e,t){return e in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function ve(s,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(e&&e.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),e&&Li(s,e)}function nt(s){return nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nt(s)}function Li(s,e){return Li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},Li(s,e)}function Oa(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ti(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function Na(s,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ti(s)}function Ae(s){var e=Oa();return function(){var i=nt(s),n;if(e){var r=nt(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Na(this,n)}}function Fa(s,e){for(;!Object.prototype.hasOwnProperty.call(s,e)&&(s=nt(s),s!==null););return s}function Et(){return typeof Reflect<"u"&&Reflect.get?Et=Reflect.get.bind():Et=function(e,t,i){var n=Fa(e,t);if(n){var r=Object.getOwnPropertyDescriptor(n,t);return r.get?r.get.call(arguments.length<3?e:i):r.value}},Et.apply(this,arguments)}function Ii(s,e){return Ba(s)||$a(s,e)||Ri(s,e)||Ga()}function Dt(s){return Ma(s)||Ua(s)||Ri(s)||Va()}function Ma(s){if(Array.isArray(s))return Di(s)}function Ba(s){if(Array.isArray(s))return s}function Ua(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}function $a(s,e){var t=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(t!=null){var i=[],n=!0,r=!1,a,o;try{for(t=t.call(s);!(n=(a=t.next()).done)&&(i.push(a.value),!(e&&i.length===e));n=!0);}catch(l){r=!0,o=l}finally{try{!n&&t.return!=null&&t.return()}finally{if(r)throw o}}return i}}function Ri(s,e){if(s){if(typeof s=="string")return Di(s,e);var t=Object.prototype.toString.call(s).slice(8,-1);if(t==="Object"&&s.constructor&&(t=s.constructor.name),t==="Map"||t==="Set")return Array.from(s);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Di(s,e)}}function Di(s,e){(e==null||e>s.length
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ga(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jn(s,e){var t=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(!t){if(Array.isArray(s)||(t=Ri(s))||e&&s&&typeof s.length=="number"){t&&(s=t);var i=0,n=function(){};return{s:n,n:function(){return i>=s.length?{done:!0}:{done:!1,value:s[i++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,a=!1,o;return{s:function(){t=t.call(s)},n:function(){var l=t.next();return r=l.done,l},e:function(l){a=!0,o=l},f:function(){try{!r&&t.return!=null&&t.return()}finally{if(a)throw o}}}}Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(this==null)throw new TypeError('"this" is null or not defined');var t=Object(this),i=t.length>>>0;if(typeof e!="function")throw new TypeError("predicate must be a function");for(var n=arguments[1],r=0;r<i;){var a=t[r];if(e.call(n,a,r,t))return a;r++}}}),Object.entries||(Object.entries=function(s){for(var e=Object.keys(s),t=e.length,i=new Array(t);t--;)i[t]=[e[t],s[e[t]]];return i}),Object.values||(Object.values=function(s){for(var e=Object.keys(s),t=e.length,i=new Array(t);t--;)i[t]=s[e[t]];return i}),typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:function(e,t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(i[a]=r[a])}return i},writable:!0,configurable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(this==null)throw new TypeError('"this" is null or not defined');var t=Object(this),i=t.length>>>0;if(typeof e!="function")throw new TypeError("predicate must be a function");for(var n=arguments[1],r=0;r<i;){var a=t[r];if(e.call(n,a,r,t))return r;r++}return-1},configurable:!0,writable:!0});var Ka="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=",qn={mp4:Ka},ht=function(){var s,e,t,i,n=[],r=n.concat,a=n.filter,o=n.slice,l=window.document,c={},u={},h={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},d=/^\s*<(\w+|!)[^>]*>/,f=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,g=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,v=/^(?:body|html)$/i,A=/([A-Z])/g,T=["val","css","html","text","data","width","height","offset"],x=["after","prepend","before"
((__t=(`+c+`))==null?'':escapeExpr(__t))+
'`),u&&(a+=`'+
((__t=(`+u+`))==null?'':__t)+
'`),h&&(a+=`';
`+h+`
__p+='`),r=d+l.length,l}),a+=`';
`,Tt.variable||(a=`with(obj||{}){
`+a+`}
`),a=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
`+a+`return __p;
//# sourceURL=/microtemplates/source[`+po+++"]";try{i=new Function(Tt.variable||"obj","escapeExpr",a)}catch(l){throw l.source=a,l}if(t)return i(t,gr);var o=function(c){return i.call(this,c,gr)};return o.source="function("+(Tt.variable||"obj")+`){
`+a+"}",o};Ie.settings=Tt;var Se={getStyleFor:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{baseUrl:""};return Q('<style class="clappr-style"></style>').html(Ie(e.toString())(t))}},mo=/^(\S+)\s*(.*)$/,Ot=function(s){ve(t,s);var e=Ae(t);function t(i){var n;return he(this,t),n=e.call(this,i),n.cid=Ht("c"),n._ensureElement(),n.delegateEvents(),n}return de(t,[{key:"tagName",get:function(){return"div"}},{key:"events",get:function(){return{}}},{key:"attributes",get:function(){return{}}},{key:"$",value:function(n){return this.$el.find(n)}},{key:"render",value:function(){return this}},{key:"destroy",value:function(){return this.$el.remove(),this.stopListening(),this.undelegateEvents(),this}},{key:"setElement",value:function(n,r){return this.$el&&this.undelegateEvents(),this.$el=Q.zepto.isZ(n)?n:Q(n),this.el=this.$el[0],r!==!1&&this.delegateEvents(),this}},{key:"delegateEvents",value:function(n){n||(n=this.events),this.undelegateEvents();for(var r in n){var a=n[r];if(a&&a.constructor!==Function&&(a=this[n[r]]),!!a){var o=r.match(mo),l=o[1],c=o[2];l+=".delegateEvents"+this.cid,c===""?this.$el.on(l,a.bind(this)):this.$el.on(l,c,a.bind(this))}}return this}},{key:"undelegateEvents",value:function(){return this.$el.off(".delegateEvents"+this.cid),this}},{key:"_ensureElement",value:function(){if(this.el)this.setElement(this.el,!1);else{var n=Q.extend(!0,{},this.attributes);this.id&&(n.id=this.id),this.className&&(n.class=this.className);var r=Q(Pt.create(this.tagName)).attr(n);this.setElement(r,!1)}}}]),t}(st),Ve=function(s){ve(t,s);var e=Ae(t);function t(){var i,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return he(this,t),i=e.call(this,n),i.core=r,i}return de(t,[{key:"name",get:function(){return"error"}},{key:"createError",value:function(n){if(!this.core){ae.warn(this.name,"Core is not set. Error: ",n);return}this.core.trigger(p.ERROR,n)}}],[{key:"Levels",get:function(){return{FATAL:"FATAL",WARN:"WARN",INFO:"INFO"}}}]),t}(st),dt={createError:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{useCodePrefix:!0},i=this.constructor&&this.constructor.type||"",n=this.name||i,r=this.i18n||this.core&&this.core.i18n||this.container&&this.container.i18n,a="".concat(n,":").concat(e&&e.code||"unknown"),o={description:"",level:Ve.Levels.FATAL,origin:n,scope:i,raw:{}},l=Object.assign({},o,e,{code:t.useCodePrefix?a:e.code});if(r&&l.level==Ve.Levels.FATAL&&!l.UI){var c={title:r.t("default_error_title"),message:r.t("default_error_message")};l.UI=c}return this.playerError?this.playerError.createError(l):ae.warn(n,"PlayerError is not defined. Error: ",l),l}},Ne=function(s){ve(t,s);var e=Ae(t);function t(i){var n;return he(this,t),n=e.call(this,i.options),n.core=i,n.enabled=!0,n.bindEvents(),n.render(),n}return de(t,[{key:"playerError",get:function(){return this.core.playerError}},{key:"bindEvents",value:function(){}},{key:"getExternalInterface",value:function(){return{}}},{key:"enable",value:function(){this.enabled||(this.bindEvents(),this.$el.show(),this.enabled=!0)}},{key:"disable",value:function(){this.stopListening(),this.$el.hide(),this.enabled=!1}},{key:"render",value:function(){return this}}]),t}(Ot);Object.assign(Ne.prototype,dt),Ne.extend=function(s){return wt(Ne,s)},Ne.type="core";var yo=`.container[data-container] {
position: absolute;
background-color: black;
height: 100%;
width: 100%;
max-width: 100%; }
.container[data-container] .chromeless {
cursor: default; }
[data-player]:not(.nocursor) .container[data-container]:not(.chromeless).pointer-enabled {
cursor: pointer; }
`,Ui=function(s){ve(t,s);var e=Ae(t);function t(i,n,r){var a;return he(this,t),a=e.call(this,i),a._i18n=n,a.currentTime=0,a.volume=100,a.playback=i.playback,a.playerError=r,a.settings=Q.extend(!0,{},a.playback.settings),a.isReady=!1,a.mediaControlDisabled=!1,a.plugins=[a.playback],a.dblTapHandler=new sr(500),a.clickTimer=null,a.clickDelay=200,a.actionsMetadata={},a.bindEvents(),a}return de(t,[{key:"name",get:function(){return"Container"}},{key:"attributes",get:function(){return{class:"container","data-container":""}}},{key:"events",get:function(){return{click:"clicked",dblclick:"dblClicked",touchend:"dblTap",contextmenu:"onContextMenu",mouseenter:"mouseEnter",mouseleave:"mouseLeave",mouseup:"onMouseUp",mousedown:"onMouseDown"}}},{key:"ended",get:function(){return this.playback.ended}},{key:"buffering",get:function(){return this.playback.buffering}},{key:"i18n",get:function(){return this._i18n}},{key:"hasClosedCaptionsTracks",get:function(){return this.playback.hasClosedCaptionsTracks}},{key:"closedCaptionsTracks",get:function(){return this.playback.closedCaptionsTracks}},{key:"closedCaptionsTrackId",get:function(){return this.playback.closedCaptionsTrackId},set:function(n){this.playback.closedCaptionsTrackId=n}},{key:"audioTracks",get:function(){return this.playback.audioTracks}},{key:"currentAudioTrack",get:function(){return this.playback.currentAudioTrack}},{key:"bindEvents",value:function(){this.listenTo(this.playback,p.PLAYBACK_PROGRESS,this.onProgress),this.listenTo(this.playback,p.PLAYBACK_TIMEUPDATE,this.timeUpdated),this.listenTo(this.playback,p.PLAYBACK_READY,this.ready),this.listenTo(this.playback,p.PLAYBACK_BUFFERING,this.onBuffering),this.listenTo(this.playback,p.PLAYBACK_BUFFERFULL,this.bufferfull),this.listenTo(this.playback,p.PLAYBACK_SETTINGSUPDATE,this.settingsUpdate),this.listenTo(this.playback,p.PLAYBACK_LOADEDMETADATA,this.loadedMetadata),this.listenTo(this.playback,p.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinitionUpdate),this.listenTo(this.playback,p.PLAYBACK_BITRATE,this.updateBitrate),this.listenTo(this.playback,p.PLAYBACK_PLAYBACKSTATE,this.playbackStateChanged),this.listenTo(this.playback,p.PLAYBACK_DVR,this.playbackDvrStateChanged),this.listenTo(this.playback,p.PLAYBACK_MEDIACONTROL_DISABLE,this.disableMediaControl),this.listenTo(this.playback,p.PLAYBACK_MEDIACONTROL_ENABLE,this.enableMediaControl),this.listenTo(this.playback,p.PLAYBACK_SEEK,this.onSeek),this.listenTo(this.playback,p.PLAYBACK_SEEKED,this.onSeeked),this.listenTo(this.playback,p.PLAYBACK_ENDED,this.onEnded),this.listenTo(this.playback,p.PLAYBACK_PLAY,this.playing),this.listenTo(this.playback,p.PLAYBACK_PAUSE,this.paused),this.listenTo(this.playback,p.PLAYBACK_STOP,this.stopped),this.listenTo(this.playback,p.PLAYBACK_ERROR,this.error),this.listenTo(this.playback,p.PLAYBACK_SUBTITLE_AVAILABLE,this.subtitleAvailable),this.listenTo(this.playback,p.PLAYBACK_SUBTITLE_CHANGED,this.subtitleChanged),this.listenTo(this.playback,p.PLAYBACK_AUDIO_AVAILABLE,this.audioAvailable),this.listenTo(this.playback,p.PLAYBACK_AUDIO_CHANGED,this.audioChanged)}},{key:"subtitleAvailable",value:function(){this.trigger(p.CONTAINER_SUBTITLE_AVAILABLE)}},{key:"subtitleChanged",value:function(n){this.trigger(p.CONTAINER_SUBTITLE_CHANGED,n)}},{key:"audioAvailable",value:function(n){this.trigger(p.CONTAINER_AUDIO_AVAILABLE,n)}},{key:"audioChanged",value:function(n){this.trigger(p.CONTAINER_AUDIO_CHANGED,n)}},{key:"playbackStateChanged",value:function(n){this.trigger(p.CONTAINER_PLAYBACKSTATE,n)}},{key:"playbackDvrStateChanged",value:function(n){this.settings=this.playback.settings,this.dvrInUse=n,this.trigger(p.CONTAINER_PLAYBACKDVRSTATECHANGED,n)}},{key:"updateBitrate",value:function(n){this.trigger(p.CONTAINER_BITRATE,n)}},{key:"statsReport",value:function(n){this.trigger(p.CONTAINER_STATS_REPORT,n)}},{key:"getPlaybackType",value:function(){return this.playback.getPlaybackType()}},{key:"isDvrEnabled",value:function(){return!!this.playback.dvrEnabled}},{key:"isDvrInUse",value:function(){return!!this.dvrInUse}},{key:"destroy",value:function(){this.disableResiz
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transform: translate3d(0, 0, 0);
position: relative;
margin: 0;
padding: 0;
border: 0;
font-style: normal;
font-weight: normal;
text-align: center;
overflow: hidden;
font-size: 100%;
font-family: "Roboto", "Open Sans", Arial, sans-serif;
text-shadow: 0 0 0;
box-sizing: border-box; }
[data-player]:focus {
outline: 0; }
[data-player] * {
box-sizing: inherit; }
[data-player] > * {
float: none;
max-width: none; }
[data-player] > div {
display: block; }
[data-player].fullscreen {
width: 100% !important;
height: 100% !important;
top: 0;
left: 0; }
[data-player].nocursor {
cursor: none; }
.clappr-style {
display: none !important; }
`,Eo=`[data-player] div, [data-player] span, [data-player] applet, [data-player] object, [data-player] iframe,
[data-player] h1, [data-player] h2, [data-player] h3, [data-player] h4, [data-player] h5, [data-player] h6, [data-player] p, [data-player] blockquote, [data-player] pre,
[data-player] a, [data-player] abbr, [data-player] acronym, [data-player] address, [data-player] big, [data-player] cite, [data-player] code,
[data-player] del, [data-player] dfn, [data-player] em, [data-player] img, [data-player] ins, [data-player] kbd, [data-player] q, [data-player] s, [data-player] samp,
[data-player] small, [data-player] strike, [data-player] strong, [data-player] sub, [data-player] sup, [data-player] tt, [data-player] var,
[data-player] b, [data-player] u, [data-player] i, [data-player] center,
[data-player] dl, [data-player] dt, [data-player] dd, [data-player] ol, [data-player] ul, [data-player] li,
[data-player] fieldset, [data-player] form, [data-player] label, [data-player] legend,
[data-player] table, [data-player] caption, [data-player] tbody, [data-player] tfoot, [data-player] thead, [data-player] tr, [data-player] th, [data-player] td,
[data-player] article, [data-player] aside, [data-player] canvas, [data-player] details, [data-player] embed,
[data-player] figure, [data-player] figcaption, [data-player] footer, [data-player] header, [data-player] hgroup,
[data-player] menu, [data-player] nav, [data-player] output, [data-player] ruby, [data-player] section, [data-player] summary,
[data-player] time, [data-player] mark, [data-player] audio, [data-player] video {
margin: 0;
padding: 0;
border: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline; }
[data-player] table {
border-collapse: collapse;
border-spacing: 0; }
[data-player] caption, [data-player] th, [data-player] td {
text-align: left;
font-weight: normal;
vertical-align: middle; }
[data-player] q, [data-player] blockquote {
quotes: none; }
[data-player] q:before, [data-player] q:after, [data-player] blockquote:before, [data-player] blockquote:after {
content: "";
content: none; }
[data-player] a img {
border: none; }
`,$i=function(s){ve(t,s);var e=Ae(t);function t(i){var n;return he(this,t),n=e.call(this,i),n.playerError=new Ve(i,ti(n)),n.configureDomRecycler(),n.firstResize=!0,n.plugins=[],n.containers=[],n._boundFullscreenHandler=function(){return n.handleFullscreenChange()},Q(document).bind("fullscreenchange",n._boundFullscreenHandler),Q(document).bind("MSFullscreenChange",n._boundFullscreenHandler),Q(document).bind("mozfullscreenchange",n._boundFullscreenHandler),z.isMobile&&Q(window).bind("resize",function(r){n.handleWindowResize(r)}),n}return de(t,[{key:"events",get:function(){return{webkitfullscreenchange:"handleFullscreenChange",mousemove:"onMouseMove",mouseleave:"onMouseLeave"}}},{key:"attributes",get:function(){return{"data-player":"",tabindex:9999}}},{key:"isReady",get:function(){return!!this.ready}},{key:"i18n",get:function(){return this.getPlugin("strings")||{t:function(r){return r}}}},{key:"mediaControl",get:function(){return this._mediaControl||(this._mediaControl=this.getPlugin("media_control"))||this.dummyMediaControl}},{key:"dummyMediaControl",get:function(){return this._dummyMediaControl?this._dummyMediaControl:(this._dummyMediaControl=new Ne(this),this._dummyMediaControl)}},{key:"activeContainer",get:function(){return this._activeContainer},set:function(n){this._activeContainer=n,this.trigger(p.CORE_ACTIVE_CONTAINER_CHANGED,this._activeContainer)}},{key:"activePlayback",get:function(){return this.activeContainer&&this.activeContainer.playback}},{key:"activePlaybackEl",get:function(){if(this.activePlayback)return this.activePlayback.$el?this.activePlayback.$el.find("video")[0]:this.activePlayback.el}},{key:"configureDomRecycler",value:function(){var n=this.options&&this.options.playback&&this.options.playback.recycleVideo;Pt.configure({recycleVideo:n})}},{key:"createContainers",value:function(n){this.defer=Q.Deferred(),this.defer.promise(this),this.containerFactory=new vo(n,n.loader,this.i18n,this.playerError),this.prepareContainers()}},{key:"prepareContainers",value:function(){var n=this;this.containerFactory.createContainers().then(function(r){return n.setupContainers(r)}).then(function(r){return n.resolveOnContainersReady(r)})}},{key:"updateSize",value:function(){this.isFullscreen()?this.setFullscreen():this.setPlayerSize()}},{key:"setFullscreen",value:function(){z.isiOS||(this.$el.addClass("fullscreen"),this.$el.removeAttr("style"),this.previousSize={width:this.options.width,height:this.options.height},this.currentSize={width:Q(window).width(),height:Q(window).height()})}},{key:"setPlayerSize",value:function(){this.$el.removeClass("fullscreen"),this.currentSize=this.previousSize,this.previousSize={width:Q(window).width(),height:Q(window).height()},this.resize(this.currentSize)}},{key:"resize",value:function(n){!ii(n.height)&&!ii(n.width)?(this.el.style.height="".concat(n.height),this.el.style.width="".concat(n.width)):(this.el.style.height="".concat(n.height,"px"),this.el.style.width="".concat(n.width,"px")),this.previousSize={width:this.options.width,height:this.options.height},this.options.width=n.width,this.options.height=n.height,this.currentSize=n,this.triggerResize(this.currentSize)}},{key:"enableResizeObserver",value:function(){var n=this;this.disableResizeObserver();var r=function(){n.triggerResize({width:n.el.clientWidth,height:n.el.clientHeight})};this.resizeObserverInterval=setInterval(r,500)}},{key:"triggerResize",value:function(n){var r=this.firstResize||this.oldHeight!==n.height||this.oldWidth!==n.width;r&&(this.oldHeight=n.height,this.oldWidth=n.width,this.computedSize=n,this.firstResize=!1,this.trigger(p.CORE_RESIZE,n))}},{key:"disableResizeObserver",value:function(){this.resizeObserverInterval&&clearInterval(this.resizeObserverInterval),this.resizeObserverInterval=null}},{key:"resolveOnContainersReady",value:function(n){var r=this;Q.when.apply(Q,n).done(function(){r.defer.resolve(r),r.ready=!0,r.trigger(p.CORE_READY)})}},{key:"addPlugin",value:function(n){this.plugins.push(n)}},{key:"hasPlugin",value:function(n){return!!this.getPlugin(n)}},{key:"getPlugin",value:function(n){return this.plugins
<track data-html5-video-track="<%= i %>" kind="<%= tracks[i].kind %>" label="<%= tracks[i].label %>" srclang="<%= tracks[i].lang %>" src="<%= tracks[i].src %>">
<% }; %>
`,ko=`[data-html5-video] {
position: absolute;
height: 100%;
width: 100%;
display: block; }
`,Nt={mp4:["avc1.42E01E","avc1.58A01E","avc1.4D401E","avc1.64001E","mp4v.20.8","mp4v.20.240","mp4a.40.2"].map(function(s){return'video/mp4; codecs="'+s+', mp4a.40.2"'}),ogg:['video/ogg; codecs="theora, vorbis"','video/ogg; codecs="dirac"','video/ogg; codecs="theora, speex"'],"3gpp":['video/3gpp; codecs="mp4v.20.8, samr"'],webm:['video/webm; codecs="vp8, vorbis"'],mkv:['video/x-matroska; codecs="theora, vorbis"'],m3u8:["application/x-mpegurl"]};Nt.ogv=Nt.ogg,Nt["3gp"]=Nt["3gpp"];var Yt={wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]},xo=Object.keys(Yt).reduce(function(s,e){return[].concat(Dt(s),Dt(Yt[e]))},[]),yr={code:"unknown",message:"unknown"},Ge=function(s){ve(t,s);var e=Ae(t);function t(){var i;he(this,t);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];i=e.call.apply(e,[this].concat(r)),i._destroyed=!1,i._loadStarted=!1,i._isBuffering=!1,i._playheadMoving=!1,i._playheadMovingTimer=null,i._stopped=!1,i._ccTrackId=-1,i._setupSrc(i.options.src),i.options.playback||(i.options.playback=i.options||{}),i.options.playback.disableContextMenu=i.options.playback.disableContextMenu||i.options.disableVideoTagContextMenu,i._minDvrSize=i.isValidMinimumDVRSizeConfig?i.minimumDVRSizeConfig:60;var o=i.options.playback,l=o.preload||(z.isSafari?"auto":i.options.preload),c;return i.options.poster&&(typeof i.options.poster=="string"?c=i.options.poster:typeof i.options.poster.url=="string"&&(c=i.options.poster.url)),Q.extend(!0,i.el,{muted:i.options.mute,defaultMuted:i.options.mute,loop:i.options.loop,poster:c,preload:l||"metadata",crossOrigin:o.crossOrigin,"x-webkit-playsinline":o.playInline}),(o.controls||i.options.useVideoTagDefaultControls)&&i.$el.attr("controls",""),o.playInline&&i.$el.attr({playsinline:"playsinline"}),o.crossOrigin&&i.$el.attr({crossorigin:o.crossOrigin}),i.settings={default:["seekbar"]},i.settings.left=["playpause","position","duration"],i.settings.right=["fullscreen","volume","hd-indicator"],o.externalTracks&&i._setupExternalTracks(o.externalTracks),i.options.autoPlay&&i.attemptAutoPlay(),i}return de(t,[{key:"name",get:function(){return"html5_video"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"tagName",get:function(){return this.isAudioOnly?"audio":"video"}},{key:"isAudioOnly",get:function(){var n=this.options.src,r=t._mimeTypesForUrl(n,Yt,this.options.mimeType);return this.options.playback&&this.options.playback.audioOnly||this.options.audioOnly||xo.indexOf(r[0])>=0}},{key:"attributes",get:function(){return{"data-html5-video":""}}},{key:"events",get:function(){return{canplay:"_onCanPlay",canplaythrough:"_handleBufferingEvents",durationchange:"_onDurationChange",ended:"_onEnded",error:"_onError",loadeddata:"_onLoadedData",loadedmetadata:"_onLoadedMetadata",pause:"_onPause",playing:"_onPlaying",progress:"_onProgress",seeking:"_onSeeking",seeked:"_onSeeked",stalled:"_handleBufferingEvents",timeupdate:"_onTimeUpdate",waiting:"_onWaiting"}}},{key:"ended",get:function(){return this.el.ended}},{key:"buffering",get:function(){return this._isBuffering}},{key:"isLive",get:function(){return this.getPlaybackType()===se.LIVE}},{key:"dvrEnabled",get:function(){return this.getDuration()>=this._minDvrSize&&this.isLive}},{key:"minimumDVRSizeConfig",get:function(){return this.options.playback&&this.options.playback.minimumDvrSize}},{key:"isValidMinimumDVRSizeConfig",get:function(){return typeof this.minimumDVRSizeConfig<"u"&&typeof this.minimumDVRSizeConfig=="number"}},{key:"configure",value:function(n){Et(nt(t.prototype),"configure",this).call(this,n),this.el.loop=!!n.loop}},{key:"attemptAutoPlay",value:function(){var n=this;this.canAutoPlay(function(r,a){a&&ae.warn(n.name,"autoplay error.",{result:r,error:a}),r&&setTimeout(function(){return!n._destroyed&&n.play()},0)})}},{key:"canAutoPlay",value:function(n){if(this.options.disableCanAutoPlay){n(!0,null);return}var r={timeout:this.options.autoPlayTimeout||500,inline:this.options.playback.playInline||!1,muted:this.options.mute||!1};z.isMobile&&Pt.options.recycleV
max-width: 100%;
max-height: 100%; }
`,Gi=function(s){ve(t,s);var e=Ae(t);function t(i){var n;return he(this,t),n=e.call(this,i),n.el.src=i.src,n}return de(t,[{key:"name",get:function(){return"html_img"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"tagName",get:function(){return"img"}},{key:"attributes",get:function(){return{"data-html-img":""}}},{key:"events",get:function(){return{load:"_onLoad",abort:"_onError",error:"_onError"}}},{key:"getPlaybackType",value:function(){return se.NO_OP}},{key:"render",value:function(){var n=Se.getStyleFor(Co.toString(),{baseUrl:this.options.baseUrl});return this.$el.append(n[0]),this.trigger(p.PLAYBACK_READY,this.name),this}},{key:"_onLoad",value:function(){this.trigger(p.PLAYBACK_ENDED,this.name)}},{key:"_onError",value:function(n){var r=n.type==="error"?"load error":"loading aborted";this.trigger(p.PLAYBACK_ERROR,{message:r},this.name)}}]),t}(se);Gi.canPlay=function(s){return/\.(png|jpg|jpeg|gif|bmp|tiff|pgm|pnm|webp)(|\?.*)$/i.test(s)};var Lo=`<canvas data-no-op-canvas></canvas>
<p data-no-op-msg><%=message%></p><p>
</p>`,Io=`[data-no-op] {
position: absolute;
height: 100%;
width: 100%;
text-align: center; }
[data-no-op] p[data-no-op-msg] {
position: absolute;
text-align: center;
font-size: 25px;
left: 0;
right: 0;
color: white;
padding: 10px;
/* center vertically */
top: 50%;
transform: translateY(-50%);
max-height: 100%;
overflow: auto; }
[data-no-op] canvas[data-no-op-canvas] {
background-color: #777;
height: 100%;
width: 100%; }
`,vr=function(s){ve(t,s);var e=Ae(t);function t(){var i;he(this,t);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return i=e.call.apply(e,[this].concat(r)),i._noiseFrameNum=-1,i}return de(t,[{key:"name",get:function(){return"no_op"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"template",get:function(){return Ie(Lo)}},{key:"attributes",get:function(){return{"data-no-op":""}}},{key:"render",value:function(){var n=this.options.playbackNotSupportedMessage||this.i18n.t("playback_not_supported"),r=Se.getStyleFor(Io.toString(),{baseUrl:this.options.baseUrl});this.$el.append(r[0]),this.$el.html(this.template({message:n})),this.trigger(p.PLAYBACK_READY,this.name);var a=!!(this.options.poster&&this.options.poster.showForNoOp);return(this.options.autoPlay||!a)&&this._animate(),this}},{key:"_noise",value:function(){if(this._noiseFrameNum=(this._noiseFrameNum+1)%5,!this._noiseFrameNum){var n=this.context.createImageData(this.context.canvas.width,this.context.canvas.height),r;try{r=new Uint32Array(n.data.buffer)}catch{r=new Uint32Array(this.context.canvas.width*this.context.canvas.height*4);for(var a=n.data,o=0;o<a.length;o++)r[o]=a[o]}for(var l=r.length,c=Math.random()*6+4,u=0,h=0,d=0;d<l;){if(u<0){u=c*Math.random();var f=Math.pow(Math.random(),.4);h=255*f<<24}u-=1,r[d++]=h}this.context.putImageData(n,0,0)}}},{key:"_loop",value:function(){var n=this;this._stop||(this._noise(),this._animationHandle=Zn(function(){return n._loop()}))}},{key:"destroy",value:function(){this._animationHandle&&(Jn(this._animationHandle),this._stop=!0)}},{key:"_animate",value:function(){this.canvas=this.$el.find("canvas[data-no-op-canvas]")[0],this.context=this.canvas.getContext("2d"),this._loop()}}]),t}(se);vr.canPlay=function(s){return!0};var Ro=function(s){ve(t,s);var e=Ae(t);function t(i){var n;return he(this,t),n=e.call(this,i),n._initializeMessages(),n}return de(t,[{key:"name",get:function(){return"strings"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"t",value:function(n){var r=this._language(),a=this._messages.en,o=r&&this._messages[r]||a;return o[n]||a[n]||n}},{key:"_language",value:function(){return this.core.options.language||nr()}},{key:"_initializeMessages",value:function(){var n={en:{live:"live",back_to_live:"back to live",disabled:"Disabled",playback_not_supported:"Your browser does not support the playback of this video. Please try using a different browser.",default_error_title:"Could not play video.",default_error_message:"There was a problem trying to load the video."},de:{live:"Live",back_to_live:"Zurück zum Live-Video",disabled:"Deaktiviert",playback_not_supported:"Ihr Browser unterstützt das Playback Verfahren nicht. Bitte vesuchen Sie es mit einem anderen Browser.",default_error_title:"Video kann nicht abgespielt werden",default_error_message:"Es gab ein Problem beim Laden des Videos"},pt:{live:"ao vivo",back_to_live:"voltar para o ao vivo",disabled:"Desativado",playback_not_supported:"Seu navegador não supporta a reprodução deste video. Por favor, tente usar um navegador diferente.",default_error_title:"Não foi possível reproduzir o vídeo.",default_error_message:"Ocorreu um problema ao tentar carregar o vídeo."},es_am:{live:"vivo",back_to_live:"volver en vivo",disabled:"No disponible",playback_not_supported:"Su navegador no soporta la reproducción de este video. Por favor, utilice un navegador diferente.",default_error_title:"No se puede reproducir el video.",default_error_message:"Se ha producido un error al cargar el video."},es:{live:"en directo",back_to_live:"volver al directo",disabled:"No disponible",playback_not_supported:"Este navegador no es compatible para reproducir este vídeo. Utilice un navegador diferente.",default_error_title:"No se puede reproducir el vídeo.",default_error_message:"Se ha producido un problema al cargar el vídeo."},ru:{live:"прямой эфир",back_to_live:"к прямому эфиру",disabled:"Отключено",playback_not_supported:"Ваш браузер не поддерживает воспроизвед<D0B5>
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zo(s,e){if(typeof s!="object"||s===null)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var i=t.call(s,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}function Tr(s){var e=zo(s,"string");return typeof e=="symbol"?e:String(e)}function jo(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var br={exports:{}};(function(s,e){(function(t){var i=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(l,c,u){if(u=u||{},l=l.trim(),c=c.trim(),!c){if(!u.alwaysNormalize)return l;var h=o.parseURL(l);if(!h)throw new Error("Error trying to parse base URL.");return h.path=o.normalizePath(h.path),o.buildURLFromParts(h)}var d=o.parseURL(c);if(!d)throw new Error("Error trying to parse relative URL.");if(d.scheme)return u.alwaysNormalize?(d.path=o.normalizePath(d.path),o.buildURLFromParts(d)):c;var f=o.parseURL(l);if(!f)throw new Error("Error trying to parse base URL.");if(!f.netLoc&&f.path&&f.path[0]!=="/"){var g=n.exec(f.path);f.netLoc=g[1],f.path=g[2]}f.netLoc&&!f.path&&(f.path="/");var v={scheme:f.scheme,netLoc:d.netLoc,path:null,params:d.params,query:d.query,fragment:d.fragment};if(!d.netLoc&&(v.netLoc=f.netLoc,d.path[0]!=="/"))if(!d.path)v.path=f.path,d.params||(v.params=f.params,d.query||(v.query=f.query));else{var A=f.path,T=A.substring(0,A.lastIndexOf("/")+1)+d.path;v.path=o.normalizePath(T)}return v.path===null&&(v.path=u.alwaysNormalize?o.normalizePath(d.path):d.path),o.buildURLFromParts(v)},parseURL:function(l){var c=i.exec(l);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(r,"");l.length!==(l=l.replace(a,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};s.exports=o})()})(br);var Wi=br.exports;function Sr(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable})),t.push.apply(t,i)}return t}function Re(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Sr(Object(t),!0).forEach(function(i){qo(s,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):Sr(Object(t)).forEach(function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(t,i))})}return s}function qo(s,e,t){return e=Qo(e),e in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function Te(){return Te=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(s[i]=t[i])}return s},Te.apply(this,arguments)}function Xo(s,e){if(typeof s!="object"||s===null)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var i=t.call(s,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}function Qo(s){var e=Xo(s,"string");return typeof e=="symbol"?e:String(e)}const Z=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)};let y=function(s){return s.MEDIA_ATTACHING="hlsMediaAttaching",s.MEDIA_ATTACHED="hlsMediaAttached",s.MEDIA_DETACHING="hlsMediaDetaching",s.MEDIA_DETACHED="hlsMediaDetached",s.BUFFER_RESET="hlsBufferReset",s.BUFFER_CODECS="hlsBufferCodecs",s.BUFFER_CREATED="hlsBufferCreated",s.BUFFER_APPENDING="hlsBufferAppending",s.BUFFER_APPENDED="hlsBufferAppended",s.BUFFER_EOS="hlsBufferEos",s.BUFFER_FLUSHING="hlsBufferFlushing",s.BUFFER_FLUSHED="hlsBufferFlushed",s.MANIFEST
discontinuity: ${T}
trackSwitch: ${x}
contiguous: ${G}
accurateTimeOffset: ${l}
timeOffset: ${g}
initSegmentChange: ${B}`);const E=new ou(i,n,t,o,u);this.configureTransmuxer(E)}if(this.frag=r,this.part=a,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:v,chunkMeta:c,state:k},e instanceof ArrayBuffer?[e]:[]);else if(f){const E=f.push(e,v,c,k);bi(E)?(f.async=!0,E.then(N=>{this.handleTransmuxComplete(N)}).catch(N=>{this.transmuxerError(N,c,"transmuxer-interface push error")})):(f.async=!1,this.handleTransmuxComplete(E))}}flush(e){e.transmuxing.start=self.performance.now();const{transmuxer:t}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(t){let i=t.flush(e);bi(i)||t.async?(bi(i)||(i=Promise.resolve(i)),i.then(r=>{this.handleFlushResult(r,e)}).catch(r=>{this.transmuxerError(r,e,"transmuxer-interface flush error")})):this.handleFlushResult(i,e)}}transmuxerError(e,t,i){this.hls&&(this.error=e,this.hls.trigger(y.ERROR,{type:J.MEDIA_ERROR,details:w.FRAG_PARSING_ERROR,chunkMeta:t,fatal:!1,error:e,err:e,reason:i}))}handleFlushResult(e,t){e.forEach(i=>{this.handleTransmuxComplete(i)}),this.onFlush(t)}onWorkerMessage(e){const t=e.data,i=this.hls;switch(t.event){case"init":{var n;const r=(n=this.workerContext)==null?void 0:n.objectURL;r&&self.URL.revokeObjectURL(r);break}case"transmuxComplete":{this.handleTransmuxComplete(t.data);break}case"flush":{this.onFlush(t.data);break}case"workerLog":C[t.data.logType]&&C[t.data.logType](t.data.message);break;default:{t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,i.trigger(t.event,t.data);break}}}configureTransmuxer(e){const{transmuxer:t}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const uu=250,Ln=2,hu=.1,du=.05;class fu{constructor(e,t,i,n){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=i,this.hls=n}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:i,media:n,stalled:r}=this;if(n===null)return;const{currentTime:a,seeking:o}=n,l=this.seeking&&!o,c=!this.seeking&&o;if(this.seeking=o,a!==e){if(this.moved=!0,r!==null){if(this.stallReported){const T=self.performance.now()-r;C.warn(`playback not stuck anymore @${a}, after ${Math.round(T)}ms`),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if(c||l){this.stalled=null;return}if(n.paused&&!o||n.ended||n.playbackRate===0||!ge.getBuffered(n).length)return;const u=ge.bufferInfo(n,a,0),h=u.len>0,d=u.nextStart||0;if(!h&&!d)return;if(o){const T=u.len>Ln,x=!d||t&&t.start<=a||d-a>Ln&&!this.fragmentTracker.getPartialFragment(a);if(T||x)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var f;const T=Math.max(d,u.start||0)-a,x=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,P=(x==null||(f=x.details)==null?void 0:f.live)?x.details.targetduration*2:Ln,L=this.fragmentTracker.getPartialFragment(a);if(T>0&&(T<=P||L)){this._trySkipBufferHole(L);return}}const g=self.performance.now();if(r===null){this.stalled=g;return}const v=g-r;if(!o&&v>=uu&&(this._reportStall(u),!this.media))return;const A=ge.bufferInfo(n,a,i.maxBufferHole);this._tryFixBufferStall(A,v)}_tryFixBufferStall(e,t){const{config:i,fragmentTracker:n,media:r}=this;if(r===null)return;const a=r.currentTime,o=n.getPartialFragment(a);o&&(this._trySkipBufferHole(o)||!this.media)||(e.len>i.maxBufferHole||e.nextStart&&e.nextStart-a<i.maxBufferHole)&&t>i.highBufferWatchdogPeriod*1e3&&(C.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:i,stallReported:n}=this;if(!n&&i){this.stallReported=!0;const r=new Error(`Playback stalling at @${i.currentTime} due to low buffer (${JSON.stringify(e)})`);C.warn(r.message),t.trigger(y.ERROR,{type:J.MEDIA_ERROR,details:w.BUFFER_STALLED_ERROR,fatal:!1,error:r,buffer:e.len})}}_trySkipBufferHole(
Time to underbuffer: ${f.toFixed(3)} s
Estimated load time for current fragment: ${O.toFixed(3)} s
Estimated load time for down switch fragment: ${k.toFixed(3)} s
TTFB estimate: ${g}
Current BW estimate: ${Z(A)?(A/1024).toFixed(3):"Unknown"} Kb/s
New BW estimate: ${(this.bwEstimator.getEstimate()/1024).toFixed(3)} Kb/s
Aborting and switching to level ${E}`),e.loader&&(this.fragCurrent=this.partCurrent=null,e.abortRequests()),i.trigger(y.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:o}))}onFragLoaded(e,{frag:t,part:i}){const n=i?i.stats:t.stats;if(t.type===ee.MAIN&&this.bwEstimator.sampleTTFB(n.loading.first-n.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){const r=i?i.duration:t.duration,a=this.hls.levels[t.level],o=(a.loaded?a.loaded.bytes:0)+n.loaded,l=(a.loaded?a.loaded.duration:0)+r;a.loaded={bytes:o,duration:l},a.realBitrate=Math.round(8*o/l)}if(t.bitrateTest){const r={stats:n,frag:t,part:i,id:t.type};this.onFragBuffered(y.FRAG_BUFFERED,r),t.bitrateTest=!1}}}onFragBuffered(e,t){const{frag:i,part:n}=t,r=n!=null&&n.stats.loaded?n.stats:i.stats;if(r.aborted||this.ignoreFragment(i))return;const a=r.parsing.end-r.loading.start-Math.min(r.loading.first-r.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,r.loaded),r.bwEstimate=this.bwEstimator.getEstimate(),i.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==ee.MAIN||e.sn==="initSegment"}clearTimer(){self.clearInterval(this.timer)}get nextAutoLevel(){const e=this._nextAutoLevel,t=this.bwEstimator;if(e!==-1&&!t.canEstimate())return e;let i=this.getNextABRAutoLevel();if(e!==-1){const n=this.hls.levels;if(n.length>Math.max(e,i)&&n[e].loadError<=n[i].loadError)return e}return e!==-1&&(i=Math.min(e,i)),i}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:i}=this,{maxAutoLevel:n,config:r,minAutoLevel:a,media:o}=i,l=t?t.duration:e?e.duration:0,c=o&&o.playbackRate!==0?Math.abs(o.playbackRate):1,u=this.bwEstimator?this.bwEstimator.getEstimate():r.abrEwmaDefaultEstimate,h=i.mainForwardBufferInfo,d=(h?h.len:0)/c;let f=this.findBestLevel(u,a,n,d,r.abrBandWidthFactor,r.abrBandWidthUpFactor);if(f>=0)return f;C.trace(`[abr] ${d?"rebuffering expected":"buffer is empty"}, finding optimal quality level`);let g=l?Math.min(l,r.maxStarvationDelay):r.maxStarvationDelay,v=r.abrBandWidthFactor,A=r.abrBandWidthUpFactor;if(!d){const T=this.bitrateTestDelay;T&&(g=(l?Math.min(l,r.maxLoadingDelay):r.maxLoadingDelay)-T,C.trace(`[abr] bitrate test took ${Math.round(1e3*T)}ms, set first fragment max fetchDuration to ${Math.round(1e3*g)} ms`),v=A=1)}return f=this.findBestLevel(u,a,n,d+g,v,A),Math.max(f,0)}findBestLevel(e,t,i,n,r,a){var o;const{fragCurrent:l,partCurrent:c,lastLoadedFragLevel:u}=this,{levels:h}=this.hls,d=h[u],f=!!(d!=null&&(o=d.details)!=null&&o.live),g=d==null?void 0:d.codecSet,v=c?c.duration:l?l.duration:0,A=this.bwEstimator.getEstimateTTFB()/1e3;let T=t,x=-1;for(let _=i;_>=t;_--){const P=h[_];if(!P||g&&P.codecSet!==g){P&&(T=Math.min(_,T),x=Math.max(_,x));continue}x!==-1&&C.trace(`[abr] Skipped level(s) ${T}-${x} with CODECS:"${h[x].attrs.CODECS}"; not compatible with "${d.attrs.CODECS}"`);const L=P.details,G=(c?L==null?void 0:L.partTarget:L==null?void 0:L.averagetargetduration)||v;let O;_<=u?O=r*e:O=a*e;const B=h[_].maxBitrate,k=this.getTimeToLoadFrag(A,O,B*G,L===void 0);if(C.trace(`[abr] level:${_} adjustedbw-bitrate:${Math.round(O-B)} avgDuration:${G.toFixed(1)} maxFetchDuration:${n.toFixed(1)} fetchDuration:${k.toFixed(1)}`),O>B&&(k===0||!Z(k)||f&&!this.bitrateTestDelay||k<n))return _}return-1}set nextAutoLevel(e){this._nextAutoLevel=e}}class Vs{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let i;if(e.length)e.length===1?i=e[0]:i=vu(e,t);else return new Uint8Array(0);return this.reset(),i}reset(){this.chunks.length=0,this.dataLength=0}}function vu(s,e){const t=new Uint8Array(e);let i=0;for(let n=0;n<s.length;n++){const r=s[n];t.set(r,i),i+=r.length}return t}const Gs=100;class Au extends yn{constructor(e,t,i){super(e,t,i,"[audio-stream-controller]",ee.AUDIO),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=nul
`)),i}getTextAndFormat(){return this.rows}}class Xs{constructor(e,t,i){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Rn(i),this.nonDisplayedMemory=new Rn(i),this.lastOutputScreen=new Rn(i),this.currRollUpRow=this.displayedMemory.rows[qe-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=i}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[qe-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let i=0;i<e.length;i++)this.writeScreen.insertChar(e[i]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const i=Math.floor(e/2)-16,n=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=n[i]}this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;t!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=t:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t),this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputF
`)}class Bu{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new Nu,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function i(){let r=t.buffer,a=0;for(r=ia(r);a<r.length&&r[a]!=="\r"&&r[a]!==`
`;)++a;const o=r.slice(0,a);return r[a]==="\r"&&++a,r[a]===`
`&&++a,t.buffer=r.slice(a),o}function n(r){ta(r,function(a,o){},/:/)}try{let r="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;r=i();const o=r.match(/^()?WEBVTT([ \t].*)?$/);if(!(o!=null&&o[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let a=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:r=i(),t.state){case"HEADER":/:/.test(r)?n(r):r||(t.state="ID");continue;case"NOTE":r||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){t.state="NOTE";break}if(!r)continue;if(t.cue=new Dn(0,0,""),t.state="CUE",r.indexOf("-->")===-1){t.cue.id=r;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{Mu(r,t.cue,t.regionList)}catch{t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const o=r.indexOf("-->")!==-1;if(!r||o&&(a=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
`),t.cue.text+=r}continue;case"BADCUE":r||(t.state="ID")}}}catch{t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const Uu=/\r\n|\n\r|\n|\r/g,Pn=function(e,t,i=0){return e.slice(i,i+t.length)===t},$u=function(e){let t=parseInt(e.slice(-3));const i=parseInt(e.slice(-6,-4)),n=parseInt(e.slice(-9,-7)),r=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!Z(t)||!Z(i)||!Z(n)||!Z(r))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*i,t+=60*1e3*n,t+=60*60*1e3*r,t},On=function(e){let t=5381,i=e.length;for(;i;)t=t*33^e.charCodeAt(--i);return(t>>>0).toString()};function Nn(s,e,t){return On(s.toString())+On(e.toString())+On(t)}const Vu=function(e,t,i){let n=e[t],r=e[n.prevCC];if(!r||!r.new&&n.new){e.ccOffset=e.presentationOffset=n.start,n.new=!1;return}for(;(a=r)!=null&&a.new;){var a;e.ccOffset+=n.start-r.start,n.new=!1,n=r,r=e[n.prevCC]}e.presentationOffset=i};function Gu(s,e,t,i,n,r,a){const o=new Bu,l=Je(new Uint8Array(s)).trim().replace(Uu,`
`).split(`
`),c=[],u=e?Jc(e.baseTime,e.timescale):0;let h="00:00.000",d=0,f=0,g,v=!0;o.oncue=function(A){const T=t[i];let x=t.ccOffset;const _=(d-u)/9e4;if(T!=null&&T.new&&(f!==void 0?x=t.ccOffset=T.start:Vu(t,i,_)),_){if(!e){g=new Error("Missing initPTS for VTT MPEGTS");return}x=_-t.presentationOffset}const P=A.endTime-A.startTime,L=He((A.startTime+x-f)*9e4,n*9e4)/9e4;A.startTime=Math.max(L,0),A.endTime=Math.max(L+P,0);const G=A.text.trim();A.text=decodeURIComponent(encodeURIComponent(G)),A.id||(A.id=Nn(A.startTime,A.endTime,G)),A.endTime>0&&c.push(A)},o.onparsingerror=function(A){g=A},o.onflush=function(){if(g){a(g);return}r(c)},l.forEach(A=>{if(v)if(Pn(A,"X-TIMESTAMP-MAP=")){v=!1,A.slice(16).split(",").forEach(T=>{Pn(T,"LOCAL:")?h=T.slice(6):Pn(T,"MPEGTS:")&&(d=parseInt(T.slice(7)))});try{f=$u(h)/1e3}catch(T){g=T}return}else A===""&&(v=!1);o.parse(A+`
`)}),o.flush()}const Fn="stpp.ttml.im1t",na=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ra=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Ku={left:"start",center:"center",right:"end",start:"start",end:"end"};function sa(s,e,t,i){const n=oe(new Uint8Array(s),["mdat"]);if(n.length===0){i(new Error("Could not parse IMSC1 mdat"));return}const r=n.map(o=>Je(o)),a=Zc(e.baseTime,1,e.timescale);try{r.forEach(o=>t(Hu(o,a)))}catch(o){i(o)}}function Hu(s,e){const n=new DOMParser().parseFromString(s,"text/xml").getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");const r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(r).reduce((h,d)=>(h[d]=n.getAttribute(`ttp:${d}`)||r[d],h),{}),o=n.getAttribute("xml:space")!=="preserve",l=aa(Mn(n,"styling","style")),c=aa(Mn(n,"layout","region")),u=Mn(n,"body","[begin]");return[].map.call(u,h=>{const d=oa(h,o);if(!d||!h.hasAttribute("begin"))return null;const f=Un(h.getAttribute("begin"),a),g=Un(h.getAttribute("dur"),a);let v=Un(h.getAttribute("end"),a);if(f===null)throw la(h);if(v===null){if(g===null)throw la(h);v=f+g}const A=new Dn(f-e,v-e,d);A.id=Nn(A.startTime,A.endTime,A.text);const T=c[h.getAttribute("region")],x=l[h.getAttribute("style")],_=Yu(T,x,l),{textAlign:P}=_;if(P){const L=Ku[P];L&&(A.lineAlign=L),A.align=P}return Te(A,_),A}).filter(h=>h!==null)}function Mn(s,e,t){const i=s.getElementsByTagName(e)[0];return i?[].slice.call(i.querySelectorAll(t)):[]}function aa(s){return s.reduce((e,t)=>{const i=t.getAttribute("xml:id");return i&&(e[i]=t),e},{})}function oa(s,e){return[].slice.call(s.childNodes).reduce((t,i,n)=>{var r;return i.nodeName==="br"&&n?t+`
`:(r=i.childNodes)!=null&&r.length?oa(i,e):e?t+i.textContent.trim().replace(/\s+/g," "):t+i.textContent},"")}function Yu(s,e,t){const i="http://www.w3.org/ns/ttml#styling";let n=null;const r=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],a=s!=null&&s.hasAttribute("style")?s.getAttribute("style"):null;return a&&t.hasOwnProperty(a)&&(n=t[a]),r.reduce((o,l)=>{const c=Bn(e,i,l)||Bn(s,i,l)||Bn(n,i,l);return c&&(o[l]=c),o},{})}function Bn(s,e,t){return s&&s.hasAttributeNS(e,t)?s.getAttributeNS(e,t):null}function la(s){return new Error(`Could not parse ttml timestamp ${s}`)}function Un(s,e){if(!s)return null;let t=ea(s);return t===null&&(na.test(s)?t=Wu(s,e):ra.test(s)&&(t=zu(s,e))),t}function Wu(s,e){const t=na.exec(s),i=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+i/e.frameRate}function zu(s,e){const t=ra.exec(s),i=Number(t[1]);switch(t[2]){case"h":return i*3600;case"m":return i*60;case"ms":return i*1e3;case"f":return i/e.frameRate;case"t":return i/e.tickRate}return i}class ju{constructor(e){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=ca(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){const t=new Si(this,"textTrack1"),i=new Si(this,"textTrack2"),n=new Si(this,"textTrack3"),r=new Si(this,"textTrack4");this.cea608Parser1=new Qs(1,t,i),this.cea608Parser2=new Qs(3,n,r)}e.on(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(y.FRAG_LOADING,this.onFragLoading,this),e.on(y.FRAG_LOADED,this.onFragLoaded,this),e.on(y.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(y.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(y.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(y.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(y.FRAG_LOADING,this.onFragLoading,this),e.off(y.FRAG_LOADED,this.onFragLoaded,this),e.off(y.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(y.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(y.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(y.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null}addCues(e,t,i,n,r){let a=!1;for(let o=r.length;o--;){const l=r[o],c=Xu(l[0],l[1],t,i);if(c>=0&&(l[0]=Math.min(l[0],t),l[1]=Math.max(l[1],i),a=!0,c/(i-t)>.5))return}if(a||r.push([t,i]),this.config.renderTextTracksNatively){const o=this.captionsTracks[e];this.Cues.newCue(o,t,i,n)}else{const o=this.Cues.newCue(null,t,i,n);this.hls.trigger(y.CUES_PARSED,{type:"captions",cues:o,track:e})}}onInitPtsFound(e,{frag:t,id:i,initPTS:n,timescale:r}){const{unparsedVttFrags:a}=this;i==="main"&&(this.initPTS[t.cc]={baseTime:n,timescale:r}),a.lengt
} (data length: ${t&&t.byteLength})`),n.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise((t,i)=>{const n=Xi(this.config),r=e.map(Lr).filter(a=>!!a&&n.indexOf(a)!==-1);return this.getKeySystemSelectionPromise(r).then(({keySystem:a})=>{const o=Rr(a);o?t(o):i(new Error(`Unable to find format for key-system "${a}"`))}).catch(i)})}loadKey(e){const t=e.keyInfo.decryptdata,i=this.getKeyIdString(t),n=`(keyId: ${i} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${n}`);let r=this.keyIdToKeySessionPromise[i];return r||(r=this.keyIdToKeySessionPromise[i]=this.getKeySystemForKeyPromise(t).then(({keySystem:a,mediaKeys:o})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${n}`),this.attemptSetMediaKeys(a,o).then(()=>{this.throwIfDestroyed();const l=this.createMediaKeySessionContext({keySystem:a,mediaKeys:o,decryptdata:t}),c="cenc";return this.generateRequestWithPreferredKeySession(l,c,t.pssh,"playlist-key")}))),r.catch(a=>this.handleError(a))),r}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof Ye?this.hls.trigger(y.ERROR,e.data):this.hls.trigger(y.ERROR,{type:J.KEY_SYSTEM_ERROR,details:w.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),i=this.keyIdToKeySessionPromise[t];if(!i){const n=Lr(e.keyFormat),r=n?[n]:Xi(this.config);return this.attemptKeySystemAccess(r)}return i}getKeySystemSelectionPromise(e){if(e.length||(e=Xi(this.config)),e.length===0)throw new Ye({type:J.KEY_SYSTEM_ERROR,details:w.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}_onMediaEncrypted(e){const{initDataType:t,initData:i}=e;if(this.debug(`"${e.type}" event: init data type: "${t}"`),i===null)return;let n,r;if(t==="sinf"&&this.config.drmSystems[ye.FAIRPLAY]){const u=_e(new Uint8Array(i));try{const h=qi(JSON.parse(u).sinf),d=Ur(new Uint8Array(h));if(!d)return;n=d.subarray(8,24),r=ye.FAIRPLAY}catch{this.warn('Failed to parse sinf "encrypted" event message initData');return}}else{const u=Nl(i);if(u===null)return;u.version===0&&u.systemId===Ir.WIDEVINE&&u.data&&(n=u.data.subarray(8,24)),r=ul(u.systemId)}if(!r||!n)return;const a=et.hexDump(n),{keyIdToKeySessionPromise:o,mediaKeySessions:l}=this;let c=o[a];for(let u=0;u<l.length;u++){const h=l[u],d=h.decryptdata;if(d.pssh||!d.keyId)continue;const f=et.hexDump(d.keyId);if(a===f||d.uri.replace(/-/g,"").indexOf(a)!==-1){c=o[f],delete o[f],d.pssh=new Uint8Array(i),d.keyId=n,c=o[a]=c.then(()=>this.generateRequestWithPreferredKeySession(h,t,i,"encrypted-event-key-match"));break}}c||(c=o[a]=this.getKeySystemSelectionPromise([r]).then(({keySystem:u,mediaKeys:h})=>{var d;this.throwIfDestroyed();const f=new zt("ISO-23001-7",a,(d=Rr(u))!=null?d:"");return f.pssh=new Uint8Array(i),f.keyId=n,this.attemptSetMediaKeys(u,h).then(()=>{this.throwIfDestroyed();const g=this.createMediaKeySessionContext({decryptdata:f,keySystem:u,mediaKeys:h});return this.generateRequestWithPreferredKeySession(g,t,i,"encrypted-event-no-match")})})),c.catch(u=>this.handleError(u))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,t){const i=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const n=Promise.all(i).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(n),n.then(()=>{this.log(`Media-keys set for "${e}"`),i.push(n),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(r=>i.indexOf(r)===-1)})}generateRequestWithPr
viewBox="0 0 49 41.8" style="enable-background:new 0 0 49 41.8;" xml:space="preserve">
<path d="M47.1,0H3.2C1.6,0,0,1.2,0,2.8v31.5C0,35.9,1.6,37,3.2,37h11.9l3.2,1.9l4.7,2.7c0.9,0.5,2-0.1,2-1.1V37h22.1
c1.6,0,1.9-1.1,1.9-2.7V2.8C49,1.2,48.7,0,47.1,0z M7.2,18.6c0-4.8,3.5-9.3,9.9-9.3c4.8,0,7.1,2.7,7.1,2.7l-2.5,4
c0,0-1.7-1.7-4.2-1.7c-2.8,0-4.3,2.1-4.3,4.3c0,2.1,1.5,4.4,4.5,4.4c2.5,0,4.9-2.1,4.9-2.1l2.2,4.2c0,0-2.7,2.9-7.6,2.9
C10.8,27.9,7.2,23.5,7.2,18.6z M36.9,27.9c-6.4,0-9.9-4.4-9.9-9.3c0-4.8,3.5-9.3,9.9-9.3C41.7,9.3,44,12,44,12l-2.5,4
c0,0-1.7-1.7-4.2-1.7c-2.8,0-4.3,2.1-4.3,4.3c0,2.1,1.5,4.4,4.5,4.4c2.5,0,4.9-2.1,4.9-2.1l2.2,4.2C44.5,25,41.9,27.9,36.9,27.9z"/>
</svg>`,Lh=`<button type="button" class="cc-button media-control-button media-control-icon" data-cc-button aria-label="<%= ariaLabel %>"></button>
<ul>
<% if (title) { %>
<li data-title><%= title %></li>
<% }; %>
<li><a href="#" data-cc-select="-1"><%= disabledLabel %></a></li>
<% for (var i = 0; i < tracks.length; i++) { %>
<li><a href="#" data-cc-select="<%= tracks[i].id %>"><%= tracks[i].label %></a></li>
<% }; %>
</ul>
`,Ih=`.cc-controls[data-cc-controls] {
float: right;
position: relative;
display: none; }
.cc-controls[data-cc-controls].available {
display: block; }
.cc-controls[data-cc-controls] .cc-button {
padding: 6px !important; }
.cc-controls[data-cc-controls] .cc-button.enabled {
display: block;
opacity: 1.0; }
.cc-controls[data-cc-controls] .cc-button.enabled:hover {
opacity: 1.0;
text-shadow: none; }
.cc-controls[data-cc-controls] > ul {
list-style-type: none;
position: absolute;
bottom: 25px;
border: 1px solid black;
display: none;
background-color: #e6e6e6; }
.cc-controls[data-cc-controls] li {
font-size: 10px; }
.cc-controls[data-cc-controls] li[data-title] {
background-color: #c3c2c2;
padding: 5px; }
.cc-controls[data-cc-controls] li a {
color: #444;
padding: 2px 10px;
display: block;
text-decoration: none; }
.cc-controls[data-cc-controls] li a:hover {
background-color: #555;
color: white; }
.cc-controls[data-cc-controls] li a:hover a {
color: white;
text-decoration: none; }
.cc-controls[data-cc-controls] li.current a {
color: #f00; }
`,Rh=function(s){Be(t,s);var e=Ue(t);function t(i){var n;Fe(this,t),n=e.call(this,i);var r=i.options.closedCaptionsConfig;return n._title=r&&r.title?r.title:null,n._ariaLabel=r&&r.ariaLabel?r.ariaLabel:"cc-button",n._labelCb=r&&r.labelCallback&&typeof r.labelCallback=="function"?r.labelCallback:function(a){return a.name},n}return Me(t,[{key:"name",get:function(){return"closed_captions"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"template",get:function(){return Ie(Lh)}},{key:"events",get:function(){return{"click [data-cc-button]":"toggleContextMenu","click [data-cc-select]":"onTrackSelect"}}},{key:"attributes",get:function(){return{class:"cc-controls","data-cc-controls":""}}},{key:"bindEvents",value:function(){this.listenTo(this.core,p.CORE_ACTIVE_CONTAINER_CHANGED,this.containerChanged),this.listenTo(this.core.mediaControl,p.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.core.mediaControl,p.MEDIACONTROL_HIDE,this.hideContextMenu),this.bindContainerEvents()}},{key:"bindContainerEvents",value:function(){this.container=this.core.activeContainer,this.container&&(this.listenTo(this.container,p.CONTAINER_SUBTITLE_AVAILABLE,this.onSubtitleAvailable),this.listenTo(this.container,p.CONTAINER_SUBTITLE_CHANGED,this.onSubtitleChanged),this.listenTo(this.container,p.CONTAINER_STOP,this.onContainerStop))}},{key:"onContainerStop",value:function(){this.ccAvailable(!1)}},{key:"containerChanged",value:function(){this.ccAvailable(!1),this.stopListening(),this.bindEvents()}},{key:"onSubtitleAvailable",value:function(){this.renderCcButton(),this.ccAvailable(!0)}},{key:"onSubtitleChanged",value:function(n){this.setCurrentContextMenuElement(n.id)}},{key:"onTrackSelect",value:function(n){var r=parseInt(n.target.dataset.ccSelect,10);return this.container.closedCaptionsTrackId=r,this.hideContextMenu(),n.stopPropagation(),!1}},{key:"ccAvailable",value:function(n){var r=n?"addClass":"removeClass";this.$el[r]("available")}},{key:"toggleContextMenu",value:function(){this.$el.find("ul").toggle()}},{key:"hideContextMenu",value:function(){this.$el.find("ul").hide()}},{key:"contextMenuElement",value:function(n){return this.$el.find("ul a"+(isNaN(n)?"":'[data-cc-select="'+n+'"]')).parent()}},{key:"setCurrentContextMenuElement",value:function(n){if(this._trackId!==n){this.contextMenuElement().removeClass("current"),this.contextMenuElement(n).addClass("current");var r=n>-1?"addClass":"removeClass";this.$ccButton[r]("enabled"),this._trackId=n}}},{key:"renderCcButton",value:function(){for(var n=this.container?this.container.closedCaptionsTracks:[],r=0;r<n.length;r++)n[r].label=this._labelCb(n[r]);var a=Se.getStyleFor(Ih,{baseUrl:this.options.baseUrl});this.$el.html(this.template({ariaLabel:this._ariaLabel,disabledLabel:this.core.i18n.t("disabled"),title:this._title,tracks:n})),this.$ccButton=this.$el.find("button.cc-button[data-cc-button]"),this.$ccButton.append(Ch),this.$el.append(a[0])}},{key:"render",value:function(){this.renderCcButton();var n=this.core.mediaControl.$el.find("button[data-fullscreen]");return n[0]?this.$el.insertAfter(n):this.core.mediaControl.$el.find(".media-control-right-panel[data-media-control]").prepend(this.$el),this}}]),t}(Ne),Dh=`<div class="live-info"><%= live %></div>
<button type="button" class="live-button" aria-label="<%= backToLive %>"><%= backToLive %></button>
`,wh=`.dvr-controls[data-dvr-controls] {
display: inline-block;
float: left;
color: #fff;
line-height: 32px;
font-size: 10px;
font-weight: bold;
margin-left: 6px; }
.dvr-controls[data-dvr-controls] .live-info {
cursor: default;
font-family: "Roboto", "Open Sans", Arial, sans-serif;
text-transform: uppercase; }
.dvr-controls[data-dvr-controls] .live-info:before {
content: "";
display: inline-block;
position: relative;
width: 7px;
height: 7px;
border-radius: 3.5px;
margin-right: 3.5px;
background-color: #ff0101; }
.dvr-controls[data-dvr-controls] .live-info.disabled {
opacity: 0.3; }
.dvr-controls[data-dvr-controls] .live-info.disabled:before {
background-color: #fff; }
.dvr-controls[data-dvr-controls] .live-button {
cursor: pointer;
outline: none;
display: none;
border: 0;
color: #fff;
background-color: transparent;
height: 32px;
padding: 0;
opacity: 0.7;
font-family: "Roboto", "Open Sans", Arial, sans-serif;
text-transform: uppercase;
transition: all 0.1s ease; }
.dvr-controls[data-dvr-controls] .live-button:before {
content: "";
display: inline-block;
position: relative;
width: 7px;
height: 7px;
border-radius: 3.5px;
margin-right: 3.5px;
background-color: #fff; }
.dvr-controls[data-dvr-controls] .live-button:hover {
opacity: 1;
text-shadow: rgba(255, 255, 255, 0.75) 0 0 5px; }
.dvr .dvr-controls[data-dvr-controls] .live-info {
display: none; }
.dvr .dvr-controls[data-dvr-controls] .live-button {
display: block; }
.dvr.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {
background-color: #005aff; }
.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {
background-color: #ff0101; }
`,Ph=function(s){Be(t,s);var e=Ue(t);function t(i){var n;return Fe(this,t),n=e.call(this,i),n.settingsUpdate(),n}return Me(t,[{key:"template",get:function(){return Ie(Dh)}},{key:"name",get:function(){return"dvr_controls"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"events",get:function(){return{"click .live-button":"click"}}},{key:"attributes",get:function(){return{class:"dvr-controls","data-dvr-controls":""}}},{key:"bindEvents",value:function(){this.bindCoreEvents(),this.bindContainerEvents()}},{key:"bindCoreEvents",value:function(){var n=this;this.core.mediaControl.settings?(this.listenTo(this.core.mediaControl,p.MEDIACONTROL_CONTAINERCHANGED,this.containerChanged),this.listenTo(this.core.mediaControl,p.MEDIACONTROL_RENDERED,this.settingsUpdate),this.listenTo(this.core,p.CORE_OPTIONS_CHANGE,this.render)):setTimeout(function(){return n.bindCoreEvents()},100)}},{key:"bindContainerEvents",value:function(){this.core.activeContainer&&(this.listenToOnce(this.core.activeContainer,p.CONTAINER_TIMEUPDATE,this.render),this.listenTo(this.core.activeContainer,p.CONTAINER_PLAYBACKDVRSTATECHANGED,this.dvrChanged))}},{key:"containerChanged",value:function(){this.stopListening(),this.bindEvents()}},{key:"dvrChanged",value:function(n){this.core.getPlaybackType()===se.LIVE&&(this.settingsUpdate(),this.core.mediaControl.$el.addClass("live"),n?(this.core.mediaControl.$el.addClass("dvr"),this.core.mediaControl.$el.find(".media-control-indicator[data-position], .media-control-indicator[data-duration]").hide()):this.core.mediaControl.$el.removeClass("dvr"))}},{key:"click",value:function(){var n=this.core.mediaControl,r=n.container;r.isPlaying()||r.play(),n.$el.hasClass("dvr")&&r.seek(r.getDuration())}},{key:"settingsUpdate",value:function(){var n=this;this.stopListening(),this.core.mediaControl.$el.removeClass("live"),this.shouldRender()&&(this.render(),this.$el.click(function(){return n.click()})),this.bindEvents()}},{key:"shouldRender",value:function(){var n=this.core.options.useDvrControls===void 0||!!this.core.options.useDvrControls;return n&&this.core.getPlaybackType()===se.LIVE}},{key:"render",value:function(){var n=Se.getStyleFor(wh,{baseUrl:this.options.baseUrl});return this.$el.html(this.template({live:this.core.i18n.t("live"),backToLive:this.core.i18n.t("back_to_live")})),this.$el.append(n[0]),this.shouldRender()&&(this.core.mediaControl.$el.addClass("live"),this.core.mediaControl.$(".media-control-left-panel[data-media-control]").append(this.$el)),this}}]),t}(Ne),Oh=function(s){Be(t,s);var e=Ue(t);function t(){return Fe(this,t),e.apply(this,arguments)}return Me(t,[{key:"name",get:function(){return"end_video"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"bindEvents",value:function(){this.listenTo(this.core,p.CORE_ACTIVE_CONTAINER_CHANGED,this.containerChanged);var n=this.core.activeContainer;n&&(this.listenTo(n,p.CONTAINER_ENDED,this.ended),this.listenTo(n,p.CONTAINER_STOP,this.ended))}},{key:"containerChanged",value:function(){this.stopListening(),this.bindEvents()}},{key:"ended",value:function(){var n=typeof this.core.options.exitFullscreenOnEnd>"u"||this.core.options.exitFullscreenOnEnd;n&&this.core.isFullscreen()&&this.core.toggleFullscreen()}}]),t}(ot),Nh=`<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>`,Fh=`<div class="player-error-screen__content" data-error-screen>
<% if (icon) { %>
<div class="player-error-screen__icon" data-error-screen><%= icon %></div>
<% } %>
<div class="player-error-screen__title" data-error-screen><%= title %></div>
<div class="player-error-screen__message" data-error-screen><%= message %></div>
<div class="player-error-screen__code" data-error-screen>Error code: <%= code %></div>
<div class="player-error-screen__reload" data-error-screen><%= reloadIcon %></div>
</div>
`,Mh=`[data-player] .player-error-screen {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #CCCACA;
position: absolute;
top: 0;
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, 0.7);
z-index: 2000;
display: flex;
flex-direction: column;
justify-content: center; }
[data-player] .player-error-screen__content[data-error-screen] {
font-size: 14px;
color: #CCCACA;
margin-top: 45px; }
[data-player] .player-error-screen__title[data-error-screen] {
font-weight: bold;
line-height: 30px;
font-size: 18px; }
[data-player] .player-error-screen__message[data-error-screen] {
width: 90%;
margin: 0 auto; }
[data-player] .player-error-screen__code[data-error-screen] {
font-size: 13px;
margin-top: 15px; }
[data-player] .player-error-screen__reload {
cursor: pointer;
width: 30px;
margin: 15px auto 0 !important; }
`,Bh=function(s){Be(t,s);var e=Ue(t);function t(i){var n;return Fe(this,t),n=e.call(this,i),n.options.disableErrorScreen?ma(n,n.disable()):n}return Me(t,[{key:"name",get:function(){return"error_screen"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"template",get:function(){return Ie(Fh)}},{key:"container",get:function(){return this.core.getCurrentContainer()}},{key:"attributes",get:function(){return{class:"player-error-screen","data-error-screen":""}}},{key:"bindEvents",value:function(){this.listenTo(this.core,p.ERROR,this.onError),this.listenTo(this.core,p.CORE_ACTIVE_CONTAINER_CHANGED,this.onContainerChanged)}},{key:"bindReload",value:function(){this.reloadButton=this.$el.find(".player-error-screen__reload"),this.reloadButton&&this.reloadButton.on("click",this.reload.bind(this))}},{key:"reload",value:function(){var n=this;this.listenToOnce(this.core,p.CORE_READY,function(){return n.container.play()}),this.core.load(this.options.sources,this.options.mimeType),this.unbindReload()}},{key:"unbindReload",value:function(){this.reloadButton&&this.reloadButton.off("click")}},{key:"onContainerChanged",value:function(){this.err=null,this.unbindReload(),this.hide()}},{key:"onError",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.level===Ve.Levels.FATAL&&(this.err=n,this.container.disableMediaControl(),this.container.stop(),this.show())}},{key:"show",value:function(){this.render(),this.$el.show()}},{key:"hide",value:function(){this.$el.hide()}},{key:"render",value:function(){if(this.err){var n=Se.getStyleFor(Mh,{baseUrl:this.options.baseUrl});return this.$el.html(this.template({title:this.err.UI.title,message:this.err.UI.message,code:this.err.code,icon:this.err.UI.icon||"",reloadIcon:Nh})),this.$el.append(n[0]),this.core.$el.append(this.el),this.bindReload(),this}}}]),t}(Ne),xt=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill="#010101" d="M1.425.35L14.575 8l-13.15 7.65V.35z"/>
</svg>`,Kn=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M1.712 14.76H6.43V1.24H1.71v13.52zm7.86-13.52v13.52h4.716V1.24H9.573z"/>
</svg>`,Uh=Q('link[rel="shortcut icon"]'),$h=function(s){Be(t,s);var e=Ue(t);function t(i){var n;return Fe(this,t),n=e.call(this,i),n._container=null,n.configure(),n}return Me(t,[{key:"name",get:function(){return"favicon"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"oldIcon",get:function(){return Uh}},{key:"configure",value:function(){this.core.options.changeFavicon?this.enabled||(this.stopListening(this.core,p.CORE_OPTIONS_CHANGE),this.enable()):this.enabled&&(this.disable(),this.listenTo(this.core,p.CORE_OPTIONS_CHANGE,this.configure))}},{key:"bindEvents",value:function(){this.listenTo(this.core,p.CORE_OPTIONS_CHANGE,this.configure),this.listenTo(this.core,p.CORE_ACTIVE_CONTAINER_CHANGED,this.containerChanged),this.core.activeContainer&&this.containerChanged()}},{key:"containerChanged",value:function(){this._container&&this.stopListening(this._container),this._container=this.core.activeContainer,this.listenTo(this._container,p.CONTAINER_PLAY,this.setPlayIcon),this.listenTo(this._container,p.CONTAINER_PAUSE,this.setPauseIcon),this.listenTo(this._container,p.CONTAINER_STOP,this.resetIcon),this.listenTo(this._container,p.CONTAINER_ENDED,this.resetIcon),this.listenTo(this._container,p.CONTAINER_ERROR,this.resetIcon),this.resetIcon()}},{key:"disable",value:function(){Gt(vt(t.prototype),"disable",this).call(this),this.resetIcon()}},{key:"destroy",value:function(){Gt(vt(t.prototype),"destroy",this).call(this),this.resetIcon()}},{key:"createIcon",value:function(n){var r=Q("<canvas/>");r[0].width=16,r[0].height=16;var a=r[0].getContext("2d");a.fillStyle="#000";var o=Q(n).find("path").attr("d"),l=new Path2D(o);a.fill(l);var c=Q('<link rel="shortcut icon" type="image/png"/>');return c.attr("href",r[0].toDataURL("image/png")),c}},{key:"setPlayIcon",value:function(){this.playIcon||(this.playIcon=this.createIcon(xt)),this.changeIcon(this.playIcon)}},{key:"setPauseIcon",value:function(){this.pauseIcon||(this.pauseIcon=this.createIcon(Kn)),this.changeIcon(this.pauseIcon)}},{key:"resetIcon",value:function(){Q('link[rel="shortcut icon"]').remove(),Q("head").append(this.oldIcon)}},{key:"changeIcon",value:function(n){n&&(Q('link[rel="shortcut icon"]').remove(),Q("head").append(n))}}]),t}(ot),Vh=function(s){Be(t,s);var e=Ue(t);function t(i){var n;return Fe(this,t),n=e.call(this,i),n.container.options.gaAccount&&(n.account=n.container.options.gaAccount,n.trackerName=n.container.options.gaTrackerName?n.container.options.gaTrackerName+".":"Clappr.",n.domainName=n.container.options.gaDomainName,n.currentHDState=void 0,n.embedScript()),n}return Me(t,[{key:"name",get:function(){return"google_analytics"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"embedScript",value:function(){var n=this;if(window._gat)this.addEventListeners();else{var r=document.createElement("script");r.setAttribute("type","text/javascript"),r.setAttribute("async","async"),r.setAttribute("src","//www.google-analytics.com/ga.js"),r.onload=function(){return n.addEventListeners()},document.body.appendChild(r)}}},{key:"addEventListeners",value:function(){var n=this;this.container&&(this.listenTo(this.container,p.CONTAINER_READY,this.onReady),this.listenTo(this.container,p.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,p.CONTAINER_STOP,this.onStop),this.listenTo(this.container,p.CONTAINER_PAUSE,this.onPause),this.listenTo(this.container,p.CONTAINER_ENDED,this.onEnded),this.listenTo(this.container,p.CONTAINER_STATE_BUFFERING,this.onBuffering),this.listenTo(this.container,p.CONTAINER_STATE_BUFFERFULL,this.onBufferFull),this.listenTo(this.container,p.CONTAINER_ERROR,this.onError),this.listenTo(this.container,p.CONTAINER_PLAYBACKSTATE,this.onPlaybackChanged),this.listenTo(this.container,p.CONTAINER_VOLUME,function(r){return n.onVolumeChanged(r)}),this.listenTo(this.container,p.CONTAINER_SEEK,function(r){return n.onSeek(r)}),this.listenTo(this.container,p.CONTAINER_FULL_SCREEN,this.onFullscreen),this.listenTo(this.container,p.CONTAINER_HIGHDEFINITIONUPDATE,this.onHD),this.listenTo(this.container,p.CONTAINER_PLAYBACKDVRSTATECHAN
transition: none !important; }
.media-control[data-media-control] {
position: absolute;
width: 100%;
height: 100%;
z-index: 9999;
pointer-events: none; }
.media-control[data-media-control].dragging {
pointer-events: auto;
cursor: grabbing !important;
cursor: url("closed-hand.cur"), move; }
.media-control[data-media-control].dragging * {
cursor: grabbing !important;
cursor: url("closed-hand.cur"), move; }
.media-control[data-media-control] .media-control-background[data-background] {
position: absolute;
height: 40%;
width: 100%;
bottom: 0;
background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
will-change: transform, opacity;
transition: opacity 0.6s ease-out; }
.media-control[data-media-control] .media-control-icon {
line-height: 0;
letter-spacing: 0;
speak: none;
color: #fff;
opacity: 0.5;
vertical-align: middle;
text-align: left;
transition: all 0.1s ease; }
.media-control[data-media-control] .media-control-icon:hover {
color: white;
opacity: 0.75;
text-shadow: rgba(255, 255, 255, 0.8) 0 0 5px; }
.media-control[data-media-control].media-control-hide .media-control-background[data-background] {
opacity: 0; }
.media-control[data-media-control].media-control-hide .media-control-layer[data-controls] {
transform: translateY(50px); }
.media-control[data-media-control].media-control-hide .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {
opacity: 0; }
.media-control[data-media-control] .media-control-layer[data-controls] {
position: absolute;
transform: translateY(-7px);
bottom: 0;
width: 100%;
height: 32px;
font-size: 0;
vertical-align: middle;
pointer-events: auto;
transition: bottom 0.4s ease-out; }
.media-control[data-media-control] .media-control-layer[data-controls] .media-control-left-panel[data-media-control] {
position: absolute;
top: 0;
left: 4px;
height: 100%; }
.media-control[data-media-control] .media-control-layer[data-controls] .media-control-center-panel[data-media-control] {
height: 100%;
text-align: center;
line-height: 32px; }
.media-control[data-media-control] .media-control-layer[data-controls] .media-control-right-panel[data-media-control] {
position: absolute;
top: 0;
right: 4px;
height: 100%; }
.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button {
background-color: transparent;
border: 0;
margin: 0 6px;
padding: 0;
cursor: pointer;
display: inline-block;
width: 32px;
height: 100%; }
.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg {
width: 100%;
height: 22px; }
.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg path {
fill: white; }
.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button:focus {
outline: none; }
.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-play] {
float: left;
height: 100%; }
.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-pause] {
float: left;
height: 100%; }
.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-stop] {
float: left;
height: 100%; }
.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-fullscreen] {
float: right;
background-color: transparent;
border: 0;
height: 100%; }
.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator] {
background-color: transparent;
border: 0;
cursor: default;
display: none;
float: right;
height: 100%; }
.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled {
display: block;
opacity: 1.0; }
.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled:hover {
opacity: 1.0;
text-shadow: none; }
.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playpause] {
float: left; }
.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playstop] {
float: left; }
.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position], .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {
display: inline-block;
font-size: 10px;
color: white;
cursor: default;
line-height: 32px;
position: relative; }
.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position] {
margin: 0 6px 0 7px; }
.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {
color: rgba(255, 255, 255, 0.5);
margin-right: 6px; }
.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]:before {
content: "|";
margin-right: 7px; }
.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] {
position: absolute;
top: -20px;
left: 0;
display: inline-block;
vertical-align: middle;
width: 100%;
height: 25px;
cursor: pointer; }
.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] {
width: 100%;
height: 1px;
position: relative;
top: 12px;
background-color: #666666; }
.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-1[data-seekbar] {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 100%;
background-color: #c2c2c2;
transition: all 0.1s ease-out; }
.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 100%;
background-color: #005aff;
transition: all 0.1s ease-out; }
.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-hover[data-seekbar] {
opacity: 0;
position: absolute;
top: -3px;
width: 5px;
height: 7px;
background-color: rgba(255, 255, 255, 0.5);
transition: opacity 0.1s ease; }
.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {
opacity: 1; }
.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled {
cursor: default; }
.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {
opacity: 0; }
.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {
position: absolute;
transform: translateX(-50%);
top: 2px;
left: 0;
width: 20px;
height: 20px;
opacity: 1;
transition: all 0.1s ease-out; }
.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] .bar-scrubber-icon[data-seekbar] {
position: absolute;
left: 6px;
top: 6px;
width: 8px;
height: 8px;
border-radius: 10px;
box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);
background-color: white; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] {
float: right;
display: inline-block;
height: 32px;
cursor: pointer;
margin: 0 6px;
box-sizing: border-box; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] {
float: left;
bottom: 0; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] {
background-color: transparent;
border: 0;
box-sizing: content-box;
width: 32px;
height: 32px;
opacity: 0.5; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]:hover {
opacity: 0.75; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg {
height: 24px;
position: relative;
top: 3px; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg path {
fill: white; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume].muted svg {
margin-left: 2px; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] {
float: left;
position: relative;
overflow: hidden;
top: 6px;
width: 42px;
height: 18px;
padding: 3px 0;
transition: width .2s ease-out; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] {
height: 1px;
position: relative;
top: 7px;
margin: 0 3px;
background-color: #666666; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-1[data-volume] {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 100%;
background-color: #c2c2c2;
transition: all 0.1s ease-out; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-2[data-volume] {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 100%;
background-color: #005aff;
transition: all 0.1s ease-out; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-hover[data-volume] {
opacity: 0;
position: absolute;
top: -3px;
width: 5px;
height: 7px;
background-color: rgba(255, 255, 255, 0.5);
transition: opacity 0.1s ease; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] {
position: absolute;
transform: translateX(-50%);
top: 0px;
left: 0;
width: 20px;
height: 20px;
opacity: 1;
transition: all 0.1s ease-out; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] .bar-scrubber-icon[data-volume] {
position: absolute;
left: 6px;
top: 6px;
width: 8px;
height: 8px;
border-radius: 10px;
box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);
background-color: white; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume] {
float: left;
width: 4px;
padding-left: 2px;
height: 12px;
opacity: 0.5;
box-shadow: inset 2px 0 0 white;
transition: transform .2s ease-out; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume].fill {
box-shadow: inset 2px 0 0 #fff;
opacity: 1; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:nth-of-type(1) {
padding-left: 0; }
.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:hover {
transform: scaleY(1.5); }
.media-control[data-media-control].w320 .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume].volume-bar-hide {
width: 0;
height: 12px;
top: 9px;
padding: 0; }
`,Kh=`<div class="media-control-background" data-background></div>
<div class="media-control-layer" data-controls>
<% var renderBar = function(name) { %>
<div class="bar-container" data-<%= name %>>
<div class="bar-background" data-<%= name %>>
<div class="bar-fill-1" data-<%= name %>></div>
<div class="bar-fill-2" data-<%= name %>></div>
<div class="bar-hover" data-<%= name %>></div>
</div>
<div class="bar-scrubber" data-<%= name %>>
<div class="bar-scrubber-icon" data-<%= name %>></div>
</div>
</div>
<% }; %>
<% var renderSegmentedBar = function(name, segments) {
segments = segments || 10; %>
<div class="bar-container" data-<%= name %>>
<% for (var i = 0; i < segments; i++) { %>
<div class="segmented-bar-element" data-<%= name %>></div>
<% } %>
</div>
<% }; %>
<% var renderDrawer = function(name, renderContent) { %>
<div class="drawer-container" data-<%= name %>>
<div class="drawer-icon-container" data-<%= name %>>
<div class="drawer-icon media-control-icon" data-<%= name %>></div>
<span class="drawer-text" data-<%= name %>></span>
</div>
<% renderContent(name); %>
</div>
<% }; %>
<% var renderIndicator = function(name) { %>
<div class="media-control-indicator" data-<%= name %>></div>
<% }; %>
<% var renderButton = function(name) { %>
<button type="button" class="media-control-button media-control-icon" data-<%= name %> aria-label="<%= name %>"></button>
<% }; %>
<% var templates = {
bar: renderBar,
segmentedBar: renderSegmentedBar,
};
var render = function(settingsList) {
settingsList.forEach(function(setting) {
if(setting === "seekbar") {
renderBar(setting);
} else if (setting === "volume") {
renderDrawer(setting, settings.volumeBarTemplate ? templates[settings.volumeBarTemplate] : function(name) { return renderSegmentedBar(name); });
} else if (setting === "duration" || setting === "position") {
renderIndicator(setting);
} else {
renderButton(setting);
}
});
}; %>
<% if (settings.default && settings.default.length) { %>
<div class="media-control-center-panel" data-media-control>
<% render(settings.default); %>
</div>
<% } %>
<% if (settings.left && settings.left.length) { %>
<div class="media-control-left-panel" data-media-control>
<% render(settings.left); %>
</div>
<% } %>
<% if (settings.right && settings.right.length) { %>
<div class="media-control-right-panel" data-media-control>
<% render(settings.right); %>
</div>
<% } %>
</div>
`,ya=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M1.712 1.24h12.6v13.52h-12.6z"/>
</svg>`,va=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M11.5 11h-.002v1.502L7.798 10H4.5V6h3.297l3.7-2.502V4.5h.003V11zM11 4.49L7.953 6.5H5v3h2.953L11 11.51V4.49z"/>
</svg>`,Hh=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M9.75 11.51L6.7 9.5H3.75v-3H6.7L9.75 4.49v.664l.497.498V3.498L6.547 6H3.248v4h3.296l3.7 2.502v-2.154l-.497.5v.662zm3-5.165L12.404 6l-1.655 1.653L9.093 6l-.346.345L10.402 8 8.747 9.654l.346.347 1.655-1.653L12.403 10l.348-.346L11.097 8l1.655-1.655z"/>
</svg>`,Aa=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill="#010101" d="M7.156 8L4 11.156V8.5H3V13h4.5v-1H4.844L8 8.844 7.156 8zM8.5 3v1h2.657L8 7.157 8.846 8 12 4.844V7.5h1V3H8.5z"/>
</svg>`,Yh=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill="#010101" d="M13.5 3.344l-.844-.844L9.5 5.656V3h-1v4.5H13v-1h-2.656L13.5 3.344zM3 9.5h2.656L2.5 12.656l.844.844L6.5 10.344V13h1V8.5H3v1z"/>
</svg>`,Wh=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill="#010101" d="M5.375 7.062H2.637V4.26H.502v7.488h2.135V8.9h2.738v2.848h2.133V4.26H5.375v2.802zm5.97-2.81h-2.84v7.496h2.798c2.65 0 4.195-1.607 4.195-3.77v-.022c0-2.162-1.523-3.704-4.154-3.704zm2.06 3.758c0 1.21-.81 1.896-2.03 1.896h-.83V6.093h.83c1.22 0 2.03.696 2.03 1.896v.02z"/>
</svg>`,Ea=rt.Config,Ta=rt.Fullscreen,ba=rt.formatTime,zh=rt.extend,Hn=rt.removeArrayItem,Yn=function(s){Be(t,s);var e=Ue(t);function t(i){var n;return Fe(this,t),n=e.call(this,i),n.persistConfig=n.options.persistConfig,n.currentPositionValue=null,n.currentDurationValue=null,n.keepVisible=!1,n.fullScreenOnVideoTagSupported=null,n.setInitialVolume(),n.settings={left:["play","stop","pause"],right:["volume"],default:["position","seekbar","duration"]},n.kibo=new Y(n.options.focusElement),n.bindKeyEvents(),n.container?Q.isEmptyObject(n.container.settings)||(n.settings=Q.extend({},n.container.settings)):n.settings={},n.userDisabled=!1,(n.container&&n.container.mediaControlDisabled||n.options.chromeless)&&n.disable(),n.stopDragHandler=function(r){return n.stopDrag(r)},n.updateDragHandler=function(r){return n.updateDrag(r)},Q(document).bind("mouseup",n.stopDragHandler),Q(document).bind("mousemove",n.updateDragHandler),n}return Me(t,[{key:"name",get:function(){return"media_control"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"disabled",get:function(){var n=this.container&&this.container.getPlaybackType()===se.NO_OP;return this.userDisabled||n}},{key:"container",get:function(){return this.core&&this.core.activeContainer}},{key:"playback",get:function(){return this.core&&this.core.activePlayback}},{key:"attributes",get:function(){return{class:"media-control","data-media-control":""}}},{key:"events",get:function(){return{"click [data-play]":"play","click [data-pause]":"pause","click [data-playpause]":"togglePlayPause","click [data-stop]":"stop","click [data-playstop]":"togglePlayStop","click [data-fullscreen]":"toggleFullscreen","click .bar-container[data-seekbar]":"seek","click .bar-container[data-volume]":"onVolumeClick","click .drawer-icon[data-volume]":"toggleMute","mouseenter .drawer-container[data-volume]":"showVolumeBar","mouseleave .drawer-container[data-volume]":"hideVolumeBar","mousedown .bar-container[data-volume]":"startVolumeDrag","mousemove .bar-container[data-volume]":"mousemoveOnVolumeBar","mousedown .bar-scrubber[data-seekbar]":"startSeekDrag","mousemove .bar-container[data-seekbar]":"mousemoveOnSeekBar","mouseleave .bar-container[data-seekbar]":"mouseleaveOnSeekBar","mouseenter .media-control-layer[data-controls]":"setUserKeepVisible","mouseleave .media-control-layer[data-controls]":"resetUserKeepVisible"}}},{key:"template",get:function(){return Ie(Kh)}},{key:"volume",get:function(){return this.container&&this.container.isReady?this.container.volume:this.intendedVolume}},{key:"muted",get:function(){return this.volume===0}},{key:"getExternalInterface",value:function(){var n=this;return{setVolume:this.setVolume,getVolume:function(){return n.volume}}}},{key:"bindEvents",value:function(){var n=this;this.stopListening(),this.listenTo(this.core,p.CORE_ACTIVE_CONTAINER_CHANGED,this.onActiveContainerChanged),this.listenTo(this.core,p.CORE_MOUSE_MOVE,this.show),this.listenTo(this.core,p.CORE_MOUSE_LEAVE,function(){return n.hide(n.options.hideMediaControlDelay)}),this.listenTo(this.core,p.CORE_FULLSCREEN,this.show),this.listenTo(this.core,p.CORE_OPTIONS_CHANGE,this.configure),this.listenTo(this.core,p.CORE_RESIZE,this.playerResize),this.bindContainerEvents()}},{key:"bindContainerEvents",value:function(){this.container&&(this.listenTo(this.container,p.CONTAINER_PLAY,this.changeTogglePlay),this.listenTo(this.container,p.CONTAINER_PAUSE,this.changeTogglePlay),this.listenTo(this.container,p.CONTAINER_STOP,this.changeTogglePlay),this.listenTo(this.container,p.CONTAINER_DBLCLICK,this.toggleFullscreen),this.listenTo(this.container,p.CONTAINER_TIMEUPDATE,this.onTimeUpdate),this.listenTo(this.container,p.CONTAINER_PROGRESS,this.updateProgressBar),this.listenTo(this.container,p.CONTAINER_SETTINGSUPDATE,this.settingsUpdate),this.listenTo(this.container,p.CONTAINER_PLAYBACKDVRSTATECHANGED,this.settingsUpdate),this.listenTo(this.container,p.CONTAINER_HIGHDEFINITIONUPDATE,this.highDefinitionUpdate),this.listenTo(this.container,p.CONTAINER_MEDIACONTROL_DISABLE,this.disable),this.listenTo(this.container,p.CONTAINER
`,qh=`.player-poster[data-poster] {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
height: 100%;
width: 100%;
z-index: 998;
top: 0;
left: 0;
background-color: transparent;
background-size: cover;
background-repeat: no-repeat;
background-position: 50% 50%; }
.player-poster[data-poster].clickable {
cursor: pointer; }
.player-poster[data-poster]:hover .play-wrapper[data-poster] {
opacity: 1; }
.player-poster[data-poster] .play-wrapper[data-poster] {
width: 100%;
height: 25%;
margin: 0 auto;
opacity: 0.75;
transition: opacity 0.1s ease; }
.player-poster[data-poster] .play-wrapper[data-poster] svg {
height: 100%; }
.player-poster[data-poster] .play-wrapper[data-poster] svg path {
fill: #fff; }
`,Xh=function(s){Be(t,s);var e=Ue(t);function t(i){var n;return Fe(this,t),n=e.call(this,i),n.hasStartedPlaying=!1,n.playRequested=!1,n.render(),setTimeout(function(){return n.update()},0),n}return Me(t,[{key:"name",get:function(){return"poster"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"template",get:function(){return Ie(jh)}},{key:"shouldRender",get:function(){var n=!!(this.options.poster&&this.options.poster.showForNoOp);return this.container.playback.name!=="html_img"&&(this.container.playback.getPlaybackType()!==se.NO_OP||n)}},{key:"attributes",get:function(){return{class:"player-poster","data-poster":""}}},{key:"events",get:function(){return{click:"clicked"}}},{key:"showOnVideoEnd",get:function(){return!this.options.poster||this.options.poster.showOnVideoEnd||this.options.poster.showOnVideoEnd===void 0}},{key:"bindEvents",value:function(){this.listenTo(this.container,p.CONTAINER_STOP,this.onStop),this.listenTo(this.container,p.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,p.CONTAINER_STATE_BUFFERING,this.update),this.listenTo(this.container,p.CONTAINER_STATE_BUFFERFULL,this.update),this.listenTo(this.container,p.CONTAINER_OPTIONS_CHANGE,this.render),this.listenTo(this.container,p.CONTAINER_ERROR,this.onError),this.showOnVideoEnd&&this.listenTo(this.container,p.CONTAINER_ENDED,this.onStop)}},{key:"onError",value:function(n){this.hasFatalError=n.level===Ve.Levels.FATAL,this.hasFatalError&&(this.hasStartedPlaying=!1,this.playRequested=!1,this.showPlayButton())}},{key:"onPlay",value:function(){this.hasStartedPlaying=!0,this.update()}},{key:"onStop",value:function(){this.hasStartedPlaying=!1,this.playRequested=!1,this.update()}},{key:"updatePlayButton",value:function(n){n&&(!this.options.chromeless||this.options.allowUserInteraction)?this.showPlayButton():this.hidePlayButton()}},{key:"showPlayButton",value:function(){this.hasFatalError&&!this.options.disableErrorScreen||(this.$playButton.show(),this.$el.addClass("clickable"))}},{key:"hidePlayButton",value:function(){this.$playButton.hide(),this.$el.removeClass("clickable")}},{key:"clicked",value:function(){if(!this.hasStartedPlaying)return(!this.options.chromeless||this.options.allowUserInteraction)&&(this.playRequested=!0,this.update(),this.container.playback&&(this.container.playback._consented=!0),this.container.play()),!1}},{key:"shouldHideOnPlay",value:function(){return!this.container.playback.isAudioOnly}},{key:"update",value:function(){if(this.shouldRender){var n=!this.playRequested&&!this.hasStartedPlaying&&!this.container.buffering;this.updatePlayButton(n),this.updatePoster()}}},{key:"updatePoster",value:function(){this.hasStartedPlaying?this.hidePoster():this.showPoster()}},{key:"showPoster",value:function(){this.container.disableMediaControl(),this.$el.show()}},{key:"hidePoster",value:function(){this.container.enableMediaControl(),this.shouldHideOnPlay()&&this.$el.hide()}},{key:"render",value:function(){if(this.shouldRender){var n=Se.getStyleFor(qh,{baseUrl:this.options.baseUrl});this.$el.html(this.template()),this.$el.append(n[0]);var r=this.options.poster&&this.options.poster.custom===void 0;if(r){var a=this.options.poster.url||this.options.poster;this.$el.css({"background-image":"url("+a+")"}),this.removeVideoElementPoster()}else this.options.poster&&(this.$el.css({background:this.options.poster.custom}),this.removeVideoElementPoster());this.container.$el.append(this.el),this.$playWrapper=this.$el.find(".play-wrapper"),this.$playWrapper.append(xt),this.$playButton=this.$playWrapper.find("svg"),this.$playButton.addClass("poster-icon"),this.$playButton.attr("data-poster","");var o=this.options.mediacontrol&&this.options.mediacontrol.buttons;return o&&this.$el.find("svg path").css("fill",o),this.options.mediacontrol&&this.options.mediacontrol.buttons&&(o=this.options.mediacontrol.buttons,this.$playButton.css("color",o)),this.update(),this}}},{key:"removeVideoElementPoster",value:function(){this.container.playback&&this.container.playback.$el&&this.container.playback.$el[0]&&this.container.playback.$el[0].removeAttribute&
<span data-duration></span>
`,Zh=`.seek-time[data-seek-time] {
position: absolute;
white-space: nowrap;
height: 20px;
line-height: 20px;
font-size: 0;
left: -100%;
bottom: 55px;
background-color: rgba(2, 2, 2, 0.5);
z-index: 9999;
transition: opacity 0.1s ease; }
.seek-time[data-seek-time].hidden[data-seek-time] {
opacity: 0; }
.seek-time[data-seek-time] [data-seek-time] {
display: inline-block;
color: white;
font-size: 10px;
padding-left: 7px;
padding-right: 7px;
vertical-align: top; }
.seek-time[data-seek-time] [data-duration] {
display: inline-block;
color: rgba(255, 255, 255, 0.5);
font-size: 10px;
padding-right: 7px;
vertical-align: top; }
.seek-time[data-seek-time] [data-duration]:before {
content: "|";
margin-right: 7px; }
`,Sa=rt.formatTime,Jh=function(s){Be(t,s);var e=Ue(t);function t(i){var n;return Fe(this,t),n=e.call(this,i),n.hoveringOverSeekBar=!1,n.hoverPosition=null,n.duration=null,n.firstFragDateTime=null,n.actualLiveTime=!!n.mediaControl.options.actualLiveTime,n.actualLiveTime&&(n.mediaControl.options.actualLiveServerTime?n.actualLiveServerTimeDiff=new Date().getTime()-new Date(n.mediaControl.options.actualLiveServerTime).getTime():n.actualLiveServerTimeDiff=0),n}return Me(t,[{key:"name",get:function(){return"seek_time"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"template",get:function(){return Ie(Qh)}},{key:"attributes",get:function(){return{class:"seek-time","data-seek-time":""}}},{key:"mediaControl",get:function(){return this.core.mediaControl}},{key:"mediaControlContainer",get:function(){return this.mediaControl.container}},{key:"isLiveStreamWithDvr",get:function(){return this.mediaControlContainer&&this.mediaControlContainer.getPlaybackType()===se.LIVE&&this.mediaControlContainer.isDvrEnabled()}},{key:"durationShown",get:function(){return this.isLiveStreamWithDvr&&!this.actualLiveTime}},{key:"useActualLiveTime",get:function(){return this.actualLiveTime&&this.isLiveStreamWithDvr}},{key:"bindEvents",value:function(){this.listenTo(this.mediaControl,p.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.mediaControl,p.MEDIACONTROL_MOUSEMOVE_SEEKBAR,this.showTime),this.listenTo(this.mediaControl,p.MEDIACONTROL_MOUSELEAVE_SEEKBAR,this.hideTime),this.listenTo(this.mediaControl,p.MEDIACONTROL_CONTAINERCHANGED,this.onContainerChanged),this.mediaControlContainer&&(this.listenTo(this.mediaControlContainer,p.CONTAINER_PLAYBACKDVRSTATECHANGED,this.update),this.listenTo(this.mediaControlContainer,p.CONTAINER_TIMEUPDATE,this.updateDuration))}},{key:"onContainerChanged",value:function(){this.stopListening(),this.bindEvents()}},{key:"updateDuration",value:function(n){this.duration=n.total,this.firstFragDateTime=n.firstFragDateTime,this.update()}},{key:"showTime",value:function(n){this.hoveringOverSeekBar=!0,this.calculateHoverPosition(n),this.update()}},{key:"hideTime",value:function(){this.hoveringOverSeekBar=!1,this.update()}},{key:"calculateHoverPosition",value:function(n){var r=n.pageX-this.mediaControl.$seekBarContainer.offset().left;this.hoverPosition=Math.min(1,Math.max(r/this.mediaControl.$seekBarContainer.width(),0))}},{key:"getSeekTime",value:function(){var n,r,a,o;return this.useActualLiveTime?(this.firstFragDateTime?(o=new Date(this.firstFragDateTime),a=new Date(this.firstFragDateTime),a.setHours(0,0,0,0),r=(o.getTime()-a.getTime())/1e3+this.duration):(a=new Date(new Date().getTime()-this.actualLiveServerTimeDiff),o=new Date(a),r=(o-a.setHours(0,0,0,0))/1e3),n=r-this.duration+this.hoverPosition*this.duration,n<0&&(n+=86400)):n=this.hoverPosition*this.duration,{seekTime:n,secondsSinceMidnight:r}}},{key:"update",value:function(){if(this.rendered)if(!this.shouldBeVisible())this.$el.hide(),this.$el.css("left","-100%");else{var n=this.getSeekTime(),r=Sa(n.seekTime,this.useActualLiveTime);if(r!==this.displayedSeekTime&&(this.$seekTimeEl.text(r),this.displayedSeekTime=r),this.durationShown){this.$durationEl.show();var a=Sa(this.actualLiveTime?n.secondsSinceMidnight:this.duration,this.actualLiveTime);a!==this.displayedDuration&&(this.$durationEl.text(a),this.displayedDuration=a)}else this.$durationEl.hide();this.$el.show();var o=this.mediaControl.$seekBarContainer.width(),l=this.$el.width(),c=this.hoverPosition*o;c-=l/2,c=Math.max(0,Math.min(c,o-l)),this.$el.css("left",c)}}},{key:"shouldBeVisible",value:function(){return this.mediaControlContainer&&this.mediaControlContainer.settings.seekEnabled&&this.hoveringOverSeekBar&&this.hoverPosition!==null&&this.duration!==null}},{key:"render",value:function(){var n=Se.getStyleFor(Zh,{baseUrl:this.options.baseUrl});this.rendered=!0,this.displayedDuration=null,this.displayedSeekTime=null,this.$el.html(this.template()),this.$el.append(n[0]),this.$el.hide(),this.mediaControl.$el.append(this.el),this.$seekTimeEl=this.$el.find("[data-seek-time]"),this.$durationEl=this.$el.
`,td=`.spinner-three-bounce[data-spinner] {
position: absolute;
margin: 0 auto;
width: 70px;
text-align: center;
z-index: 999;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
/* center vertically */
top: 50%;
transform: translateY(-50%); }
.spinner-three-bounce[data-spinner] > div {
width: 18px;
height: 18px;
background-color: #FFFFFF;
border-radius: 100%;
display: inline-block;
animation: bouncedelay 1.4s infinite ease-in-out;
/* Prevent first frame from flickering when animation starts */
animation-fill-mode: both; }
.spinner-three-bounce[data-spinner] [data-bounce1] {
animation-delay: -0.32s; }
.spinner-three-bounce[data-spinner] [data-bounce2] {
animation-delay: -0.16s; }
@keyframes bouncedelay {
0%, 80%, 100% {
transform: scale(0); }
40% {
transform: scale(1); } }
`,id=function(s){Be(t,s);var e=Ue(t);function t(i){var n;return Fe(this,t),n=e.call(this,i),n.template=Ie(ed),n.showTimeout=null,n.listenTo(n.container,p.CONTAINER_STATE_BUFFERING,n.onBuffering),n.listenTo(n.container,p.CONTAINER_STATE_BUFFERFULL,n.onBufferFull),n.listenTo(n.container,p.CONTAINER_STOP,n.onStop),n.listenTo(n.container,p.CONTAINER_ENDED,n.onStop),n.listenTo(n.container,p.CONTAINER_ERROR,n.onStop),n.render(),n}return Me(t,[{key:"name",get:function(){return"spinner"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"attributes",get:function(){return{"data-spinner":"",class:"spinner-three-bounce"}}},{key:"onBuffering",value:function(){this.show()}},{key:"onBufferFull",value:function(){this.hide()}},{key:"onStop",value:function(){this.hide()}},{key:"show",value:function(){var n=this;this.showTimeout===null&&(this.showTimeout=setTimeout(function(){return n.$el.show()},300))}},{key:"hide",value:function(){this.showTimeout!==null&&(clearTimeout(this.showTimeout),this.showTimeout=null),this.$el.hide()}},{key:"render",value:function(){var n=Se.getStyleFor(td,{baseUrl:this.options.baseUrl});return this.$el.html(this.template()),this.$el.append(n[0]),this.container.$el.append(this.$el),this.$el.hide(),this.container.buffering&&this.onBuffering(),this}}]),t}(ft),nd=function(s){Be(t,s);var e=Ue(t);function t(i){var n;return Fe(this,t),n=e.call(this,i),n.setInitialAttrs(),n.reportInterval=n.options.reportInterval||5e3,n.state="IDLE",n}return Me(t,[{key:"name",get:function(){return"stats"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"bindEvents",value:function(){this.listenTo(this.container.playback,p.PLAYBACK_PLAY,this.onPlay),this.listenTo(this.container,p.CONTAINER_STOP,this.onStop),this.listenTo(this.container,p.CONTAINER_ENDED,this.onStop),this.listenTo(this.container,p.CONTAINER_DESTROYED,this.onStop),this.listenTo(this.container,p.CONTAINER_STATE_BUFFERING,this.onBuffering),this.listenTo(this.container,p.CONTAINER_STATE_BUFFERFULL,this.onBufferFull),this.listenTo(this.container,p.CONTAINER_STATS_ADD,this.onStatsAdd),this.listenTo(this.container,p.CONTAINER_BITRATE,this.onStatsAdd),this.listenTo(this.container.playback,p.PLAYBACK_STATS_ADD,this.onStatsAdd)}},{key:"setInitialAttrs",value:function(){this.firstPlay=!0,this.startupTime=0,this.rebufferingTime=0,this.watchingTime=0,this.rebuffers=0,this.externalMetrics={}}},{key:"onPlay",value:function(){this.state="PLAYING",this.watchingTimeInit=Date.now(),this.intervalId||(this.intervalId=setInterval(this.report.bind(this),this.reportInterval))}},{key:"onStop",value:function(){clearInterval(this.intervalId),this.report(),this.intervalId=void 0,this.state="STOPPED"}},{key:"onBuffering",value:function(){this.firstPlay?this.startupTimeInit=Date.now():this.rebufferingTimeInit=Date.now(),this.state="BUFFERING",this.rebuffers++}},{key:"onBufferFull",value:function(){this.firstPlay&&this.startupTimeInit?(this.firstPlay=!1,this.startupTime=Date.now()-this.startupTimeInit,this.watchingTimeInit=Date.now()):this.rebufferingTimeInit&&(this.rebufferingTime+=this.getRebufferingTime()),this.rebufferingTimeInit=void 0,this.state="PLAYING"}},{key:"getRebufferingTime",value:function(){return Date.now()-this.rebufferingTimeInit}},{key:"getWatchingTime",value:function(){var n=Date.now()-this.watchingTimeInit;return n-this.rebufferingTime}},{key:"isRebuffering",value:function(){return!!this.rebufferingTimeInit}},{key:"onStatsAdd",value:function(n){Q.extend(this.externalMetrics,n)}},{key:"getStats",value:function(){var n={startupTime:this.startupTime,rebuffers:this.rebuffers,rebufferingTime:this.isRebuffering()?this.rebufferingTime+this.getRebufferingTime():this.rebufferingTime,watchingTime:this.isRebuffering()?this.getWatchingTime()-this.getRebufferingTime():this.getWatchingTime()};return Q.extend(n,this.externalMetrics),n}},{key:"report",value:function(){this.container.statsReport(this.getStats())}}]),t}(at),rd=`<div class="clappr-watermark" data-watermark data-watermark-<%=position %>>
<% if(typeof imageLink !== 'undefined') { %>
<a target="_blank" href="<%= imageLink %>">
<% } %>
<img src="<%= imageUrl %>">
<% if(typeof imageLink !== 'undefined') { %>
</a>
<% } %>
</div>
`,sd=`.clappr-watermark[data-watermark] {
position: absolute;
min-width: 70px;
max-width: 200px;
width: 12%;
text-align: center;
z-index: 10; }
.clappr-watermark[data-watermark] a {
outline: none;
cursor: pointer; }
.clappr-watermark[data-watermark] img {
max-width: 100%; }
.clappr-watermark[data-watermark-bottom-left] {
bottom: 10px;
left: 10px; }
.clappr-watermark[data-watermark-bottom-right] {
bottom: 10px;
right: 42px; }
.clappr-watermark[data-watermark-top-left] {
top: 10px;
left: 10px; }
.clappr-watermark[data-watermark-top-right] {
top: 10px;
right: 37px; }
`,ad=function(s){Be(t,s);var e=Ue(t);function t(i){var n;return Fe(this,t),n=e.call(this,i),n.configure(),n}return Me(t,[{key:"name",get:function(){return"watermark"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"template",get:function(){return Ie(rd)}},{key:"bindEvents",value:function(){this.listenTo(this.container,p.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,p.CONTAINER_STOP,this.onStop),this.listenTo(this.container,p.CONTAINER_OPTIONS_CHANGE,this.configure)}},{key:"configure",value:function(){this.position=this.options.position||"bottom-right",this.options.watermark?(this.imageUrl=this.options.watermark,this.imageLink=this.options.watermarkLink,this.render()):this.$el.remove()}},{key:"onPlay",value:function(){this.hidden||this.$el.show()}},{key:"onStop",value:function(){this.$el.hide()}},{key:"render",value:function(){this.$el.hide();var n=Se.getStyleFor(sd,{baseUrl:this.options.baseUrl}),r={position:this.position,imageUrl:this.imageUrl,imageLink:this.imageLink};return this.$el.html(this.template(r)),this.$el.append(n[0]),this.container.$el.append(this.$el),this}}]),t}(ft),od={ClickToPause:xh,ClosedCaptions:Rh,DVRControls:Ph,EndVideo:Oh,ErrorScreen:Bh,Favicon:$h,GoogleAnalytics:Vh,MediaControl:Yn,Poster:Xh,SeekTime:Jh,SpinnerThreeBounce:id,Stats:nd,WaterMark:ad};class ld extends at{static get version(){return"1.0.0"}get name(){return"error_plugin"}get background(){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%2
<ul>
<% if (title) { %>
<li data-title><%= title %></li>
<% }; %> <% languages.forEach((language) => { %>
<li>
<a href="#" data-audio-track-selector-lang="<%= language %>"
><%= language %></a
>
</li>
<% }); %>
</ul>
`,ud=".audio_track_selector[data-audio-track-selector]{float:right;height:100%;position:relative}.audio_track_selector[data-audio-track-selector] button{background-color:transparent;color:#fff;font-family:Roboto,Open Sans,Arial,sans-serif;-webkit-font-smoothing:antialiased;border:none;font-size:12px;height:100%}.audio_track_selector[data-audio-track-selector] button:hover{color:#c9c9c9}.audio_track_selector[data-audio-track-selector] button.changing{-webkit-animation:pulse .5s infinite alternate;animation:pulse .5s infinite alternate}.audio_track_selector[data-audio-track-selector]>ul{overflow-x:hidden;overflow-y:auto;list-style-type:none;position:absolute;bottom:100%;display:none;background-color:#1c1c1ce6;white-space:nowrap}.audio_track_selector[data-audio-track-selector] li{font-size:12px;color:#eee}.audio_track_selector[data-audio-track-selector] li[data-title]{background-color:#333;padding:8px 25px}.audio_track_selector[data-audio-track-selector] li a{color:#eee;padding:5px 18px;display:block;text-decoration:none}.audio_track_selector[data-audio-track-selector] li a:hover{background-color:#ffffff1a;color:#fff}.audio_track_selector[data-audio-track-selector] li a:hover a{color:#fff;text-decoration:none}.audio_track_selector[data-audio-track-selector] li.current a{color:#2ecc71}@-webkit-keyframes pulse{0%{color:#fff}50%{color:#ff0101}to{color:#b80000}}@keyframes pulse{0%{color:#fff}50%{color:#ff0101}to{color:#b80000}}";class hd extends Ne{static get version(){return"0.1.0"}get name(){return"audio_track_selector"}get template(){return Ie(cd)}get attributes(){return{class:this.name,"data-audio-track-selector":""}}get events(){return{"click [data-audio-track-selector-lang]":"handleLanguageSelect","click [data-audio-track-selector-button]":"handleAudioTrackSelectorClick"}}get container(){return this.core.activeContainer?this.core.activeContainer:this.core.mediaControl.container}get playback(){return this.core.activePlayback?this.core.activePlayback:this.core.getCurrentPlayback()}bindEvents(){p.CORE_ACTIVE_CONTAINER_CHANGED?this.listenTo(this.core,p.CORE_ACTIVE_CONTAINER_CHANGED,this.reload):this.listenTo(this.core.mediaControl,p.MEDIACONTROL_CONTAINERCHANGED,this.reload),this.listenTo(this.core,p.CORE_READY,this.bindPlaybackEvents),this.listenTo(this.core.mediaControl,p.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.core.mediaControl,p.MEDIACONTROL_HIDE,this._hideContextMenu)}bindPlaybackEvents(){this.listenTo(this.playback,p.PLAYBACK_LEVELS_AVAILABLE,this._handleLevels),this.listenTo(this.playback,p.PLAYBACK_BITRATE,this._handleAdaptation),this.listenTo(this.playback,p.PLAYBACK_PLAY,this._handlePlay)}reload(){this.stopListening(),this.bindEvents(),this.bindPlaybackEvents()}shouldRender(){if(!this.container||!this.playback)return!1;var e=!!(this.languages&&this.languages.size>1);return e}render(){if(this.shouldRender()){var e=Se.getStyleFor(ud,{baseUrl:this.core.options.baseUrl});this.$el.html(this.template({title:this._getTitle(),languages:this.languages})),this.$el.append(e),this.core.mediaControl.$(".media-control-right-panel").append(this.el),this._highlightCurrentElement()}return this}_setLanguage(e){if(console.log("setLanguage",e),this.playback.selectAudioLanguage)this.nextLanguage=e,this.playback.selectAudioLanguage(e);else if(this.playback._hls){const t=this.playback._hls.audioTracks.find(i=>i.lang==e||i.name===e);if(!t)return;this.playback._hls.audioTrack=t.id,this.activeLanguage=e,this._highlightCurrentElement()}else if(this.playback.el.audioTracks){const i=[...this.playback.el.audioTracks].find(n=>n.language==e||n.label===e);if(!i)return;i.enabled=!0,this.activeLanguage=e,this._highlightCurrentElement()}}_fillLanguages(){if(this.playback.audioLanguages)this.languages=new Set(this.playback.audioLanguages);else if(this.playback._hls){const e=this.playback._hls.audioTracks,t=this.playback._hls.audioTrack,i=e.find(n=>n.id==t);this.languages=new Set(e.map(n=>n.lang||n.name)),i&&(this.activeLanguage=i.lang||i.name)}else if(this.playback.el.audioTracks){const e=[...this.playback.el.audioTracks],t=e.find(i=>i.e
<ul>
<% if (title) { %>
<li data-title><%= title %></li>
<% }; %>
<li><a href="#" data-level-selector-select="-1">AUTO</a></li>
<% for (var i = 0; i < levels.length; i++) { %>
<li>
<a href="#" data-level-selector-select="<%= levels[i].id %>"
><%= levels[i].label %></a
>
</li>
<% }; %>
</ul>
`,fd=".level_selector[data-level-selector]{float:right;height:100%;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;height:100%}.level_selector[data-level-selector] button:hover{color:#c9c9c9}.level_selector[data-level-selector] button.changing{-webkit-animation:pulse .5s infinite alternate;animation:pulse .5s infinite alternate}.level_selector[data-level-selector]>ul{overflow-x:hidden;overflow-y:auto;list-style-type:none;position:absolute;bottom:100%;display:none;background-color:#1c1c1ce6;white-space:nowrap}.level_selector[data-level-selector] li{font-size:12px;color:#eee}.level_selector[data-level-selector] li[data-title]{background-color:#333;padding:8px 25px}.level_selector[data-level-selector] li a{color:#eee;padding:5px 18px;display:block;text-decoration:none}.level_selector[data-level-selector] li a:hover{background-color:#ffffff1a;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:#2ecc71}@-webkit-keyframes pulse{0%{color:#fff}50%{color:#ff0101}to{color:#b80000}}@keyframes pulse{0%{color:#fff}50%{color:#ff0101}to{color:#b80000}}",_a=-1;class gd extends Ne{static get version(){return VERSION}get name(){return"level_selector"}get template(){return Ie(dd)}get attributes(){return{class:this.name,"data-level-selector":""}}get events(){return{"click [data-level-selector-select]":"onLevelSelect","click [data-level-selector-button]":"onShowLevelSelectMenu"}}bindEvents(){this.listenTo(this.core,p.CORE_READY,this.bindPlaybackEvents),this.listenTo(this.core.mediaControl,p.MEDIACONTROL_CONTAINERCHANGED,this.reload),this.listenTo(this.core.mediaControl,p.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.core.mediaControl,p.MEDIACONTROL_HIDE,this.hideSelectLevelMenu)}unBindEvents(){this.stopListening(this.core,p.CORE_READY),this.stopListening(this.core.mediaControl,p.MEDIACONTROL_CONTAINERCHANGED),this.stopListening(this.core.mediaControl,p.MEDIACONTROL_RENDERED),this.stopListening(this.core.mediaControl,p.MEDIACONTROL_HIDE),this.stopListening(this.core.getCurrentPlayback(),p.PLAYBACK_LEVELS_AVAILABLE),this.stopListening(this.core.getCurrentPlayback(),p.PLAYBACK_BITRATE)}bindPlaybackEvents(){var e=this.core.getCurrentPlayback();this.listenTo(e,p.PLAYBACK_LEVELS_AVAILABLE,this.fillLevels),this.listenTo(e,p.PLAYBACK_BITRATE,this.handleAdaptation);var t=e.levels&&e.levels.length>0;t&&this.fillLevels(e.levels)}reload(){this.unBindEvents(),this.bindEvents(),this.bindPlaybackEvents()}shouldRender(){if(!this.core.getCurrentContainer())return!1;var e=this.core.getCurrentPlayback();if(!e)return!1;var t=e.currentLevel!==void 0,i=!!(this.levels&&this.levels.length>1);return t&&i}render(){if(this.shouldRender()){var e=Se.getStyleFor(fd,{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}fillLevels(e,t=_a){console.log("got levels",e,t),this.selectedLevelId===void 0&&(this.selectedLevelId=t),this.levels=e,this.configureLevelsLabels(),this.render()}configureLevelsLabels(){if(this.levels.forEach(o=>{o.label=`${o.height?o.height:o.level.height}p`}),this.core.options.levelSelectorConfig!==void 0){var e=this.core.options.levelSelectorConfig.labelCallback;if(e&&typeof e!="function")throw new TypeError("labelCallback must be a function");var t=this.core.options.levelSelectorConfig.labels,i=t?this.core.options.levelSelectorConfig.labels:{};if(e||t){var n,r;for(var a in this.levels)n=this.levels[a],r=i[n.id],e?n.label=e(n,r):r&&(n.label=r)}}}findLevelBy(e){var t;return this.levels.forEach(i=>{i.id===e&&(t=i)}),t}onLevelSelect(e){return this.selectedLevelId=parseInt(e.target.dataset.levelSelectorSelect,10),this.core.getCurrentPlayback().currentLevel==this.selectedLevelId||(this.core.getCurrentPlayback().c
query LectureBySlug($slug: ID!) {
lecture: lectureBySlug(slug: $slug) {
originalLanguage
timelens { thumbnailsUrl, timelineUrl }
videos { label, source: url, mimeType }
images { posterUrl }
relive
playerConfig
}
}
`,{slug:s}).then(e=>{if(!e.data.lecture)throw new Error("Lecture could not be found");return e.data.lecture})}const Td="data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3Csvg%0A%20%20%20xmlns%3Adc%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%22%0A%20%20%20xmlns%3Acc%3D%22http%3A%2F%2Fcreativecommons.org%2Fns%23%22%0A%20%20%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%0A%20%20%20xmlns%3Asvg%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20%20id%3D%22svg4568%22%0A%20%20%20version%3D%221.1%22%0A%20%20%20viewBox%3D%220%200%2026.458318%2026.458333%22%0A%20%20%20height%3D%22100%22%0A%20%20%20width%3D%22100%22%3E%0A%20%20%3Cmetadata%0A%20%20%20%20%20id%3D%22metadata4574%22%3E%0A%20%20%20%20%3Crdf%3ARDF%3E%0A%20%20%20%20%20%20%3Ccc%3AWork%0A%20%20%20%20%20%20%20%20%20rdf%3Aabout%3D%22%22%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Aformat%3Eimage%2Fsvg%2Bxml%3C%2Fdc%3Aformat%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atype%0A%20%20%20%20%20%20%20%20%20%20%20rdf%3Aresource%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Fdcmitype%2FStillImage%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atitle%3E%3C%2Fdc%3Atitle%3E%0A%20%20%20%20%20%20%3C%2Fcc%3AWork%3E%0A%20%20%20%20%3C%2Frdf%3ARDF%3E%0A%20%20%3C%2Fmetadata%3E%0A%20%20%3Cdefs%0A%20%20%20%20%20id%3D%22defs4572%22%20%2F%3E%0A%20%20%3Cpath%0A%20%20%20%20%20style%3D%22fill%3A%23ffffff%3Bfill-opacity%3A0.8627451%3Bstroke-width%3A0.79176539%22%0A%20%20%20%20%20id%3D%22path4566%22%0A%20%20%20%20%20d%3D%22m%2012.91039%2C7.1445417%20c%20-5.6690402%2C0%20-10.2660306%2C4.5961993%20-10.2660306%2C10.2652403%20a%2010.265238%2C10.265238%200%200%200%200.6706253%2C3.63816%20c%200.1504354%2C-0.393506%200.3230402%2C-0.777512%200.539984%2C-1.138557%200.1108472%2C-0.18369%200.2327789%2C-0.361837%200.313539%2C-0.559779%200.081551%2C-0.197941%200.1187648%2C-0.42201%200.057007%2C-0.627078%20A%201.0783844%2C1.0783844%200%200%200%204.0513264%2C18.402655%20C%203.9784841%2C18.305267%203.8993075%2C18.212631%203.833591%2C18.109702%20A%201.3159141%2C1.3159141%200%200%201%203.6316909%2C17.222924%201.1876481%2C1.1876481%200%200%201%204.0909148%2C16.441452%20c%200.2216944%2C-0.164688%200.5027709%2C-0.23753%200.7798889%2C-0.228028%20a%201.3911318%2C1.3911318%200%200%201%200.2739508%2C0.03801%20c%200.3578779%2C0.08709%200.6745841%2C0.311164%200.9089467%2C0.593824%200.2913696%2C0.353919%200.462391%2C0.799683%200.5043546%2C1.25574%20a%202.8297696%2C2.8297696%200%200%201%20-0.2177355%2C1.34046%20C%206.0236142%2C20.197593%205.42979%2C20.807252%205.1012074%2C21.557847%204.8335907%2C22.171464%204.7567894%2C22.854758%204.7924189%2C23.5238%20c%200.00554%2C0.06096%200.014251%2C0.122723%200.019794%2C0.185272%20a%2010.265238%2C10.265238%200%200%200%202.866191%2C2.517815%2013.958824%2C13.958824%200%200%201%20-0.1029298%2C-1.670626%20c%200.00161%2C-0.443389%200.023751%2C-0.886777%200.067304%2C-1.326206%20C%207.3735785%2C23.043191%207.1281312%2C22.826248%206.9539421%2C22.54913%206.6435705%2C22.058235%206.5849797%2C21.434324%206.712454%2C20.867421%206.8391365%2C20.299724%207.1400069%2C19.782702%207.5018439%2C19.327437%20A%206.2018984%2C6.2018984%200%200%201%209.7464993%2C17.567343%208.1591425%2C8.1591425%200%200%201%209.6752356%2C17.46758%203.8432293%2C3.8432293%200%200%201%209.1194163%2C15.744698%20c%20-0.047503%2C-0.615201%200.050669%2C-1.230403%200.091055%2C-1.844814%200.02929%2C-0.429928%200.031672%2C-0.859064%200.055423%2C-1.288201%200.030084%2C-0.496437%200.090261%2C-0.993667%200.2296124%2C-1.471101%20a%201.8685664%2C1.8685664%200%200%201%200.21061%2C-0.498812%201.1084716%2C1.1084716%200%200%201%200.4703083%2C-0.406968%20c%200.216945%2C-0.0855%200.403801%2C-0.104512%200.614411%2C-0.06888%200.174189%2C0.03642%200.3365%2C0.123516%200.478227%2C0.232779%200.142518%2C0.109264%200.26524%2C0.240698%200.380047%2C0.377673%20a%205.7783039%2C5.7783039%200%200%201%200.823436%2C1.280285%202.8266025%2C2.8266025%200%200%201%200.863024%2C0%205.7695944%2C5.7695944%200%200%201%200.823436%2C-1.2794