filesbox/web/dist/design/designstatic/chatroom/video/video.js

156 lines
236 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
/**
* @license
* Video.js 5.5.3 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/master/LICENSE>
*
* Includes vtt.js <https://github.com/mozilla/vtt.js>
* Available under Apache License Version 2.0
* <https://github.com/mozilla/vtt.js/blob/master/LICENSE>
*/(function(ot){if(typeof exports=="object"&&typeof module!="undefined")module.exports=ot();else if(typeof define=="function"&&define.amd)define([],ot);else{var q;typeof window!="undefined"?q=window:typeof global!="undefined"?q=global:typeof self!="undefined"?q=self:q=this,q.videojs=ot()}})(function(){var ot,q,at;return function t(C,l,p){function a(f,v){if(!l[f]){if(!C[f]){var u=typeof require=="function"&&require;if(!v&&u)return u(f,!0);if(m)return m(f,!0);var i=new Error("Cannot find module '"+f+"'");throw i.code="MODULE_NOT_FOUND",i}var o=l[f]={exports:{}};C[f][0].call(o.exports,function(r){var g=C[f][1][r];return a(g||r)},o,o.exports,t,C,l,p)}return l[f].exports}for(var m=typeof require=="function"&&require,h=0;h<p.length;h++)a(p[h]);return a}({1:[function(t,C,l){(function(p){var a=typeof p!="undefined"?p:typeof window!="undefined"?window:{},m=t("min-document");if(typeof document!="undefined")C.exports=document;else{var h=a["__GLOBAL_DOCUMENT_CACHE@4"];h||(h=a["__GLOBAL_DOCUMENT_CACHE@4"]=m),C.exports=h}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"min-document":3}],2:[function(t,C,l){(function(p){typeof window!="undefined"?C.exports=window:typeof p!="undefined"?C.exports=p:typeof self!="undefined"?C.exports=self:C.exports={}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],3:[function(t,C,l){},{}],4:[function(t,C,l){var p=t("../internal/getNative"),a=p(Date,"now"),m=a||function(){return new Date().getTime()};C.exports=m},{"../internal/getNative":20}],5:[function(t,C,l){var p=t("../lang/isObject"),a=t("../date/now"),m="Expected a function",h=Math.max;function f(v,u,i){var o,r,g,s,d,c,T,_=0,F=!1,e=!0;if(typeof v!="function")throw new TypeError(m);if(u=u<0?0:+u||0,i===!0){var n=!0;e=!1}else p(i)&&(n=!!i.leading,F="maxWait"in i&&h(+i.maxWait||0,u),e="trailing"in i?!!i.trailing:e);function E(){c&&clearTimeout(c),r&&clearTimeout(r),_=0,r=c=T=void 0}function y(x,B){B&&clearTimeout(B),r=c=T=void 0,x&&(_=a(),g=v.apply(d,o),!c&&!r&&(o=d=void 0))}function O(){var x=u-(a()-s);x<=0||x>u?y(T,r):c=setTimeout(O,x)}function b(){y(e,c)}function w(){if(o=arguments,s=a(),d=this,T=e&&(c||!n),F===!1)var x=n&&!c;else{!r&&!n&&(_=s);var B=F-(s-_),D=B<=0||B>F;D?(r&&(r=clearTimeout(r)),_=s,g=v.apply(d,o)):r||(r=setTimeout(b,B))}return D&&c?c=clearTimeout(c):!c&&u!==F&&(c=setTimeout(O,u)),x&&(D=!0,g=v.apply(d,o)),D&&!c&&!r&&(o=d=void 0),g}return w.cancel=E,w}C.exports=f},{"../date/now":4,"../lang/isObject":33}],6:[function(t,C,l){var p="Expected a function",a=Math.max;function m(h,f){if(typeof h!="function")throw new TypeError(p);return f=a(f===void 0?h.length-1:+f||0,0),function(){for(var v=arguments,u=-1,i=a(v.length-f,0),o=Array(i);++u<i;)o[u]=v[f+u];switch(f){case 0:return h.call(this,o);case 1:return h.call(this,v[0],o);case 2:return h.call(this,v[0],v[1],o)}var r=Array(f+1);for(u=-1;++u<f;)r[u]=v[u];return r[f]=o,h.apply(this,r)}}C.exports=m},{}],7:[function(t,C,l){var p=t("./debounce"),a=t("../lang/isObject"),m="Expected a function";function h(f,v,u){var i=!0,o=!0;if(typeof f!="function")throw new TypeError(m);return u===!1?i=!1:a(u)&&(i="leading"in u?!!u.leading:i,o="trailing"in u?!!u.trailing:o),p(f,v,{leading:i,maxWait:+v,trailing:o})}C.exports=h},{"../lang/isObject":33,"./debounce":5}],8:[function(t,C,l){function p(a,m){var h=-1,f=a.length;for(m||(m=Array(f));++h<f;)m[h]=a[h];return m}C.exports=p},{}],9:[function(t,C,l){function p(a,m){for(var h=-1,f=a.length;++h<f&&m(a[h],h,a)!==!1;);return a}C.exports=p},{}],10:[function(t,C,l){function p(a,m,h){h||(h={});for(var f=-1,v=m.length;++f<v;){var u=m[f];h[u]=a[u]}return h}C.exports=p},{}],11:[function(t,C,l){var p=t("./createBaseFor"),a=p();C.exports=a},{"./createBaseFor":18}],12:[function(t,C,l){var p=t("./baseFor"),a=t("../object/keysIn");function m(h,f){return p(h,f,a)}C.exports=m},{"../object/keysIn":39,"./baseFor":11}],13:[function(t,C,l){var p=t("./arrayEach"),a=t("./baseMergeDeep"),m=t("../lang/isArray"),h=t("./isArrayLike"),f=t("../lang/
`),function(v){var u=v.indexOf(":"),i=p(v.slice(0,u)).toLowerCase(),o=p(v.slice(u+1));typeof f[i]=="undefined"?f[i]=o:m(f[i])?f[i].push(o):f[i]=[f[i],o]}),f}},{"for-each":58,trim:59}],61:[function(t,C,l){C.exports=a;var p=Object.prototype.hasOwnProperty;function a(){for(var m={},h=0;h<arguments.length;h++){var f=arguments[h];for(var v in f)p.call(f,v)&&(m[v]=f[v])}return m}},{}],62:[function(t,C,l){"use strict";l.__esModule=!0;function p(o){return o&&o.__esModule?o:{default:o}}function a(o,r){if(!(o instanceof r))throw new TypeError("Cannot call a class as a function")}function m(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);o.prototype=Object.create(r&&r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(o,r):o.__proto__=r)}var h=t("./button.js"),f=p(h),v=t("./component.js"),u=p(v),i=function(o){m(r,o);function r(g,s){a(this,r),o.call(this,g,s)}return r.prototype.buildCSSClass=function(){return"vjs-big-play-button"},r.prototype.handleClick=function(){this.player_.play()},r}(f.default);i.prototype.controlText_="Play Video",u.default.registerComponent("BigPlayButton",i),l.default=i,C.exports=l.default},{"./button.js":63,"./component.js":65}],63:[function(t,C,l){"use strict";l.__esModule=!0;function p(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var E in e)Object.prototype.hasOwnProperty.call(e,E)&&(n[E]=e[E]);return n.default=e,n}function a(e){return e&&e.__esModule?e:{default:e}}function m(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function h(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}var f=t("./component"),v=a(f),u=t("./utils/dom.js"),i=p(u),o=t("./utils/events.js"),r=p(o),g=t("./utils/fn.js"),s=p(g),d=t("global/document"),c=a(d),T=t("object.assign"),_=a(T),F=function(e){h(n,e);function n(E,y){m(this,n),e.call(this,E,y),this.emitTapEvents(),this.on("tap",this.handleClick),this.on("click",this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur)}return n.prototype.createEl=function(){var y=arguments.length<=0||arguments[0]===void 0?"button":arguments[0],O=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],b=arguments.length<=2||arguments[2]===void 0?{}:arguments[2];O=_.default({className:this.buildCSSClass(),tabIndex:0},O),b=_.default({role:"button",type:"button","aria-live":"polite"},b);var w=e.prototype.createEl.call(this,y,O,b);return this.controlTextEl_=i.createEl("span",{className:"vjs-control-text"}),w.appendChild(this.controlTextEl_),this.controlText(this.controlText_),w},n.prototype.controlText=function(y){return y?(this.controlText_=y,this.controlTextEl_.innerHTML=this.localize(this.controlText_),this):this.controlText_||"Need Text"},n.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},n.prototype.handleClick=function(){},n.prototype.handleFocus=function(){r.on(c.default,"keydown",s.bind(this,this.handleKeyPress))},n.prototype.handleKeyPress=function(y){(y.which===32||y.which===13)&&(y.preventDefault(),this.handleClick(y))},n.prototype.handleBlur=function(){r.off(c.default,"keydown",s.bind(this,this.handleKeyPress))},n}(v.default);v.default.registerComponent("Button",F),l.default=F,C.exports=l.default},{"./component":65,"./utils/dom.js":128,"./utils/events.js":129,"./utils/fn.js":130,"global/document":1,"object.assign":45}],64:[function(t,C,l){"use strict";l.__esModule=!0;function p(o){return o&&o.__esModule?o:{default:o}}function a(o,r){if(!(o instanceof r))throw new TypeError("Cannot call a class as a function")}function m(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);o.prototype=Obje
.`+Q+` {
width: `+M+`px;
height: `+V+`px;
}
.`+Q+`.vjs-fluid {
padding-top: `+rt*100+`%;
}
`)},L.prototype.loadTech_=function(M,V){this.tech_&&this.unloadTech_(),M!=="Html5"&&this.tag&&(Ct.default.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=M,this.isReady_=!1;var z=W.default({nativeControlsForTouch:this.options_.nativeControlsForTouch,source:V,playerId:this.id(),techId:this.id()+"_"+M+"_api",textTracks:this.textTracks_,autoplay:this.options_.autoplay,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),"vtt.js":this.options_["vtt.js"]},this.options_[M.toLowerCase()]);this.tag&&(z.tag=this.tag),V&&(this.currentType_=V.type,V.src===this.cache_.src&&this.cache_.currentTime>0&&(z.startTime=this.cache_.currentTime),this.cache_.src=V.src);var Q=Ct.default.getTech(M);Q||(Q=v.default.getComponent(M)),this.tech_=new Q(z),this.tech_.ready(_.bind(this,this.handleTechReady_),!0),K.default.jsonToTextTracks(this.textTracksJson_||[],this.tech_),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"canplay",this.handleTechCanPlay_),this.on(this.tech_,"canplaythrough",this.handleTechCanPlayThrough_),this.on(this.tech_,"playing",this.handleTechPlaying_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"seeked",this.handleTechSeeked_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"progress",this.handleTechProgress_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"suspend",this.handleTechSuspend_),this.on(this.tech_,"abort",this.handleTechAbort_),this.on(this.tech_,"emptied",this.handleTechEmptied_),this.on(this.tech_,"stalled",this.handleTechStalled_),this.on(this.tech_,"loadedmetadata",this.handleTechLoadedMetaData_),this.on(this.tech_,"loadeddata",this.handleTechLoadedData_),this.on(this.tech_,"timeupdate",this.handleTechTimeUpdate_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.on(this.tech_,"volumechange",this.handleTechVolumeChange_),this.on(this.tech_,"texttrackchange",this.handleTechTextTrackChange_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(M!=="Html5"||!this.tag)&&c.insertElFirst(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},L.prototype.unloadTech_=function(){this.textTracks_=this.textTracks(),this.textTracksJson_=K.default.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1},L.prototype.tech=function(M){if(M&&M.IWillNotUseThisInPlugins)return this.tech_;var V=`
Please make sure that you are not using this inside of a plugin.
To disable this alert and error, please pass in an object with
\`IWillNotUseThisInPlugins\` to the \`tech\` method. See
https://github.com/videojs/video.js/issues/2617 for more info.
`;throw r.default.alert(V),new Error(V)},L.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},L.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_)},L.prototype.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),this.src()&&this.tag&&this.options_.autoplay&&this.paused()&&(delete this.tag.poster,this.play())},L.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},L.prototype.hasStarted=function(M){return M!==void 0?(this.hasStarted_!==M&&(this.hasStarted_=M,M?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.hasStarted_},L.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},L.prototype.handleTechWaiting_=function(){this.addClass("vjs-waiting"),this.trigger("waiting")},L.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},L.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},L.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},L.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},L.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},L.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&this.currentTime(this.options_.starttime),this.addClass("vjs-has-started"),this.trigger("firstplay")},L.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},L.prototype.handleTechProgress_=function(){this.trigger("progress")},L.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},L.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},L.prototype.handleTechClick_=function(M){M.button===0&&this.controls()&&(this.paused()?this.play():this.pause())},L.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},L.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},L.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},L.prototype.handleTechTouchEnd_=function(M){M.preventDefault()},L.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},L.prototype.handleStageClick_=function(){this.reportUserActivity()},L.prototype.handleTechFullscreenChange_=function(M,V){V&&this.isFullscreen(V.isFullscreen),this.trigger("fullscreenchange")},L.prototype.handleTechError_=function(){var M=this.tech_.error();this.error(M&&M.code)},L.prototype.handleTechSuspend_=function(){this.trigger("suspend")},L.prototype.handleTechAbort_=function(){this.trigger("abort")},L.prototype.handleTechEmptied_=function(){this.trigger("emptied")},L.prototype.handleTechStalled_=function(){this.trigger("stalled")},L.prototype.handleTechLoadedMetaData_=function(){this.trigger("loadedmetadata")},L.prototype.handleTechLoadedData_=function(){this.trig
<div class="vjs-tracksettings-colors">
<div class="vjs-fg-color vjs-tracksetting">
<label class="vjs-label">Foreground</label>
<select>
<option value="">---</option>
<option value="#FFF">White</option>
<option value="#000">Black</option>
<option value="#F00">Red</option>
<option value="#0F0">Green</option>
<option value="#00F">Blue</option>
<option value="#FF0">Yellow</option>
<option value="#F0F">Magenta</option>
<option value="#0FF">Cyan</option>
</select>
<span class="vjs-text-opacity vjs-opacity">
<select>
<option value="">---</option>
<option value="1">Opaque</option>
<option value="0.5">Semi-Opaque</option>
</select>
</span>
</div> <!-- vjs-fg-color -->
<div class="vjs-bg-color vjs-tracksetting">
<label class="vjs-label">Background</label>
<select>
<option value="">---</option>
<option value="#FFF">White</option>
<option value="#000">Black</option>
<option value="#F00">Red</option>
<option value="#0F0">Green</option>
<option value="#00F">Blue</option>
<option value="#FF0">Yellow</option>
<option value="#F0F">Magenta</option>
<option value="#0FF">Cyan</option>
</select>
<span class="vjs-bg-opacity vjs-opacity">
<select>
<option value="">---</option>
<option value="1">Opaque</option>
<option value="0.5">Semi-Transparent</option>
<option value="0">Transparent</option>
</select>
</span>
</div> <!-- vjs-bg-color -->
<div class="window-color vjs-tracksetting">
<label class="vjs-label">Window</label>
<select>
<option value="">---</option>
<option value="#FFF">White</option>
<option value="#000">Black</option>
<option value="#F00">Red</option>
<option value="#0F0">Green</option>
<option value="#00F">Blue</option>
<option value="#FF0">Yellow</option>
<option value="#F0F">Magenta</option>
<option value="#0FF">Cyan</option>
</select>
<span class="vjs-window-opacity vjs-opacity">
<select>
<option value="">---</option>
<option value="1">Opaque</option>
<option value="0.5">Semi-Transparent</option>
<option value="0">Transparent</option>
</select>
</span>
</div> <!-- vjs-window-color -->
</div> <!-- vjs-tracksettings -->
<div class="vjs-tracksettings-font">
<div class="vjs-font-percent vjs-tracksetting">
<label class="vjs-label">Font Size</label>
<select>
<option value="0.50">50%</option>
<option value="0.75">75%</option>
<option value="1.00" selected>100%</option>
<option value="1.25">125%</option>
<option value="1.50">150%</option>
<option value="1.75">175%</option>
<option value="2.00">200%</option>
<option value="3.00">300%</option>
<option value="4.00">400%</option>
</select>
</div> <!-- vjs-font-percent -->
<div class="vjs-edge-style vjs-tracksetting">
<label class="vjs-label">Text Edge Style</label>
<select>
<option value="none">None</option>
<option value="raised">Raised</option>
<option value="depressed">Depressed</option>
<option value="uniform">Uniform</option>
<option value="dropshadow">Dropshadow</option>
</select>
</div> <!-- vjs-edge-style -->
<div class="vjs-font-family vjs-tracksetting">
<label class="vjs-label">Font Family</label>
<select>
<option value="">Default</option>
<option value="monospaceSerif">Monospace Serif</option>
<option value="proportionalSerif">Proportional Serif</option>
<option value="monospaceSansSerif">Monospace Sans-Serif</option>
<option value="proportionalSansSerif">Proportional Sans-Serif</option>
<option value="casual">Casual</option>
<option value="script">Script</option>
<option value="small-caps">Small Caps</option>
</select>
</div> <!-- vjs-font-family -->
</div>
</div>
<div class="vjs-tracksettings-controls">
<button class="vjs-default-button">Defaults</button>
<button class="vjs-done-button">Done</button>
</div>`;return y}l.default=F,C.exports=l.default},{"../component":65,"../utils/events.js":129,"../utils/fn.js":130,"../utils/log.js":133,"global/window":2,"safe-json-parse/tuple":53}],124:[function(t,C,l){"use strict";l.__esModule=!0;function p(S){if(S&&S.__esModule)return S;var k={};if(S!=null)for(var J in S)Object.prototype.hasOwnProperty.call(S,J)&&(k[J]=S[J]);return k.default=S,k}function a(S){return S&&S.__esModule?S:{default:S}}var m=t("./text-track-cue-list"),h=a(m),f=t("../utils/fn.js"),v=p(f),u=t("../utils/guid.js"),i=p(u),o=t("../utils/browser.js"),r=p(o),g=t("./text-track-enums"),s=p(g),d=t("../utils/log.js"),c=a(d),T=t("../event-target"),_=a(T),F=t("global/document"),e=a(F),n=t("global/window"),E=a(n),y=t("../utils/url.js"),O=t("xhr"),b=a(O),w=function S(){var k=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];if(!k.tech)throw new Error("A tech was not provided.");var J=this;if(r.IS_IE8){J=e.default.createElement("custom");for(var R in S.prototype)R!=="constructor"&&(J[R]=S.prototype[R])}J.tech_=k.tech;var A=s.TextTrackMode[k.mode]||"disabled",j=s.TextTrackKind[k.kind]||"subtitles",P=k.label||"",I=k.language||k.srclang||"",W=k.id||"vjs_text_track_"+i.newGUID();(j==="metadata"||j==="chapters")&&(A="hidden"),J.cues_=[],J.activeCues_=[];var $=new h.default(J.cues_),Y=new h.default(J.activeCues_),X=!1,K=v.bind(J,function(){this.activeCues,X&&(this.trigger("cuechange"),X=!1)});if(A!=="disabled"&&J.tech_.on("timeupdate",K),Object.defineProperty(J,"kind",{get:function(){return j},set:Function.prototype}),Object.defineProperty(J,"label",{get:function(){return P},set:Function.prototype}),Object.defineProperty(J,"language",{get:function(){return I},set:Function.prototype}),Object.defineProperty(J,"id",{get:function(){return W},set:Function.prototype}),Object.defineProperty(J,"mode",{get:function(){return A},set:function(lt){!s.TextTrackMode[lt]||(A=lt,A==="showing"&&this.tech_.on("timeupdate",K),this.trigger("modechange"))}}),Object.defineProperty(J,"cues",{get:function(){return this.loaded_?$:null},set:Function.prototype}),Object.defineProperty(J,"activeCues",{get:function(){if(!this.loaded_)return null;if(this.cues.length===0)return Y;for(var lt=this.tech_.currentTime(),yt=[],mt=0,bt=this.cues.length;mt<bt;mt++){var N=this.cues[mt];(N.startTime<=lt&&N.endTime>=lt||N.startTime===N.endTime&&N.startTime<=lt&&N.startTime+.5>=lt)&&yt.push(N)}if(X=!1,yt.length!==this.activeCues_.length)X=!0;else for(var mt=0;mt<yt.length;mt++)D.call(this.activeCues_,yt[mt])===-1&&(X=!0);return this.activeCues_=yt,Y.setCues_(this.activeCues_),Y},set:Function.prototype}),k.src?(J.src=k.src,B(k.src,J)):J.loaded_=!0,r.IS_IE8)return J};w.prototype=Object.create(_.default.prototype),w.prototype.constructor=w,w.prototype.allowedEvents_={cuechange:"cuechange"},w.prototype.addCue=function(S){var k=this.tech_.textTracks();if(k)for(var J=0;J<k.length;J++)k[J]!==this&&k[J].removeCue(S);this.cues_.push(S),this.cues.setCues_(this.cues_)},w.prototype.removeCue=function(S){for(var k=!1,J=0,R=this.cues_.length;J<R;J++){var A=this.cues_[J];A===S&&(this.cues_.splice(J,1),k=!0)}k&&this.cues.setCues_(this.cues_)};var x=function(k,J){var R=new E.default.WebVTT.Parser(E.default,E.default.vttjs,E.default.WebVTT.StringDecoder());R.oncue=function(A){J.addCue(A)},R.onparsingerror=function(A){c.default.error(A)},R.onflush=function(){J.trigger({type:"loadeddata",target:J})},R.parse(k),R.flush()},B=function(k,J){var R={uri:k},A=y.isCrossOrigin(k);A&&(R.cors=A),b.default(R,v.bind(this,function(j,P,I){if(j)return c.default.error(j,P);J.loaded_=!0,typeof E.default.WebVTT!="function"?E.default.setTimeout(function(){x(I,J)},100):x(I,J)}))},D=function(k,J){if(this==null)throw new TypeError('"this" is null or not defined');var R=Object(this),A=R.length>>>0;if(A===0)return-1;var j=+J||0;if(Math.abs(j)===Infinity&&(j=0),j>=A)return-1;for(var P=Math.max(j>=0?j:A-Math.abs(j),0);P<A;){if(P in R&&R[P]===k)return P;P++}return-1};l.default=w,C.exports=l.default},{"../event-target":97,"../utils/browser.js":125,"../utils/fn.js":130,"../utils/guid.js":132,"../utils/log.js
has been deprecated. Use the third argument instead.
createEl(type, properties, attributes). Attempting to set `," to ","."],[`Setting attributes in the second argument of createEl()
has been deprecated. Use the third argument instead.
createEl(type, properties, attributes). Attempting to set `," to ","."]);function a(N){if(N&&N.__esModule)return N;var U={};if(N!=null)for(var Z in N)Object.prototype.hasOwnProperty.call(N,Z)&&(U[Z]=N[Z]);return U.default=N,U}function m(N){return N&&N.__esModule?N:{default:N}}function h(N,U){return N.raw=U,N}var f=t("global/document"),v=m(f),u=t("global/window"),i=m(u),o=t("./guid.js"),r=a(o),g=t("./log.js"),s=m(g),d=t("tsml"),c=m(d);function T(N){return typeof N=="string"&&/\S/.test(N)}function _(N){if(/\s/.test(N))throw new Error("class has illegal whitespace characters")}function F(N){return new RegExp("(^|\\s)"+N+"($|\\s)")}function e(N){return function(U,Z){return T(U)?(T(Z)&&(Z=v.default.querySelector(Z)),(Y(Z)?Z:v.default)[N](U)):v.default[N](null)}}function n(N){return N.indexOf("#")===0&&(N=N.slice(1)),v.default.getElementById(N)}function E(){var N=arguments.length<=0||arguments[0]===void 0?"div":arguments[0],U=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],Z=arguments.length<=2||arguments[2]===void 0?{}:arguments[2],nt=v.default.createElement(N);return Object.getOwnPropertyNames(U).forEach(function(st){var ft=U[st];st.indexOf("aria-")!==-1||st==="role"||st==="type"?(s.default.warn(c.default(p,st,ft)),nt.setAttribute(st,ft)):nt[st]=ft}),Object.getOwnPropertyNames(Z).forEach(function(st){var ft=Z[st];nt.setAttribute(st,Z[st])}),nt}function y(N,U){typeof N.textContent=="undefined"?N.innerText=U:N.textContent=U}function O(N,U){U.firstChild?U.insertBefore(N,U.firstChild):U.appendChild(N)}var b={},w="vdata"+new Date().getTime();function x(N){var U=N[w];return U||(U=N[w]=r.newGUID()),b[U]||(b[U]={}),b[U]}function B(N){var U=N[w];return U?!!Object.getOwnPropertyNames(b[U]).length:!1}function D(N){var U=N[w];if(!!U){delete b[U];try{delete N[w]}catch(Z){N.removeAttribute?N.removeAttribute(w):N[w]=null}}}function S(N,U){return N.classList?N.classList.contains(U):(_(U),F(U).test(N.className))}function k(N,U){return N.classList?N.classList.add(U):S(N,U)||(N.className=(N.className+" "+U).trim()),N}function J(N,U){return N.classList?N.classList.remove(U):(_(U),N.className=N.className.split(/\s+/).filter(function(Z){return Z!==U}).join(" ")),N}function R(N,U,Z){var nt=S(N,U);if(typeof Z=="function"&&(Z=Z(N,U)),typeof Z!="boolean"&&(Z=!nt),Z!==nt)return Z?k(N,U):J(N,U),N}function A(N,U){Object.getOwnPropertyNames(U).forEach(function(Z){var nt=U[Z];nt===null||typeof nt=="undefined"||nt===!1?N.removeAttribute(Z):N.setAttribute(Z,nt===!0?"":nt)})}function j(N){var U,Z,nt,st,ft;if(U={},Z=",autoplay,controls,loop,muted,default,",N&&N.attributes&&N.attributes.length>0){nt=N.attributes;for(var G=nt.length-1;G>=0;G--)st=nt[G].name,ft=nt[G].value,(typeof N[st]=="boolean"||Z.indexOf(","+st+",")!==-1)&&(ft=ft!==null),U[st]=ft}return U}function P(){v.default.body.focus(),v.default.onselectstart=function(){return!1}}function I(){v.default.onselectstart=function(){return!0}}function W(N){var U=void 0;if(N.getBoundingClientRect&&N.parentNode&&(U=N.getBoundingClientRect()),!U)return{left:0,top:0};var Z=v.default.documentElement,nt=v.default.body,st=Z.clientLeft||nt.clientLeft||0,ft=i.default.pageXOffset||nt.scrollLeft,G=U.left+ft-st,Et=Z.clientTop||nt.clientTop||0,Ft=i.default.pageYOffset||nt.scrollTop,tt=U.top+Ft-Et;return{left:Math.round(G),top:Math.round(tt)}}function $(N,U){var Z={},nt=W(N),st=N.offsetWidth,ft=N.offsetHeight,G=nt.top,Et=nt.left,Ft=U.pageY,tt=U.pageX;return U.changedTouches&&(tt=U.changedTouches[0].pageX,Ft=U.changedTouches[0].pageY),Z.y=Math.max(0,Math.min(1,(G-Ft+ft)/ft)),Z.x=Math.max(0,Math.min(1,(tt-Et)/st)),Z}function Y(N){return!!N&&typeof N=="object"&&N.nodeType===1}function X(N){return!!N&&typeof N=="object"&&N.nodeType===3}function K(N){for(;N.firstChild;)N.removeChild(N.firstChild);return N}function it(N){return typeof N=="function"&&(N=N()),(Array.isArray(N)?N:[N]).map(function(U){if(typeof U=="function"&&(U=U()),Y(U)||X(U))return U;if(typeof U=="string"&&/\S/.test(U))return v.default.createTextNode(U)}).filter(function(U){return U})}function lt(N,U){return it(U).forEach(function(Z){r
.video-js {
width: 300px;
height: 150px;
}
.vjs-fluid {
padding-top: 56.25%
}
`)}v.autoSetupTimeout(1,G),G.VERSION="5.5.3",G.options=_.default.prototype.options_,G.getPlayers=function(){return _.default.players},G.players=yt.default(_.default.players,{get:"Access to videojs.players is deprecated; use videojs.getPlayers instead",set:"Modification of videojs.players is deprecated"}),G.getComponent=r.default.getComponent,G.registerComponent=function(tt,ct){U.default.isTech(ct)&&R.default.warn("The "+tt+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),r.default.registerComponent.call(r.default,tt,ct)},G.getTech=U.default.getTech,G.registerTech=U.default.registerTech,G.browser=I,G.TOUCH_ENABLED=I.TOUCH_ENABLED,G.extend=X.default,G.mergeOptions=E.default,G.bind=O.bind,G.plugin=e.default,G.addLanguage=function(tt,ct){var _t;return tt=(""+tt).toLowerCase(),it.default(G.options.languages,(_t={},_t[tt]=ct,_t))[tt]},G.log=R.default,G.createTimeRange=G.createTimeRanges=D.createTimeRanges,G.formatTime=k.default,G.parseUrl=$.parseUrl,G.isCrossOrigin=$.isCrossOrigin,G.EventTarget=s.default,G.on=c.on,G.one=c.one,G.off=c.off,G.trigger=c.trigger,G.xhr=bt.default,G.TextTrack=w.default,G.isEl=j.isEl,G.isTextNode=j.isTextNode,G.createEl=j.createEl,G.hasClass=j.hasElClass,G.addClass=j.addElClass,G.removeClass=j.removeElClass,G.toggleClass=j.toggleElClass,G.setAttributes=j.setElAttributes,G.getAttributes=j.getElAttributes,G.emptyEl=j.emptyEl,G.appendContent=j.appendContent,G.insertContent=j.insertContent,typeof ot=="function"&&ot.amd?ot("videojs",[],function(){return G}):typeof l=="object"&&typeof C=="object"&&(C.exports=G),l.default=G,C.exports=l.default},{"../../src/js/utils/merge-options.js":134,"./component":65,"./event-target":97,"./extend.js":98,"./player":106,"./plugins.js":107,"./setup":109,"./tech/flash.js":112,"./tech/html5.js":113,"./tech/tech.js":115,"./tracks/text-track.js":124,"./utils/browser.js":125,"./utils/create-deprecation-proxy.js":127,"./utils/dom.js":128,"./utils/events.js":129,"./utils/fn.js":130,"./utils/format-time.js":131,"./utils/log.js":133,"./utils/stylesheet.js":135,"./utils/time-ranges.js":136,"./utils/url.js":138,"global/document":1,"lodash-compat/object/merge":40,"object.assign":45,xhr:55}]},{},[139])(139)}),function(ot){var q=ot.vttjs={},at=q.VTTCue,t=q.VTTRegion,C=ot.VTTCue,l=ot.VTTRegion;q.shim=function(){q.VTTCue=at,q.VTTRegion=t},q.restore=function(){q.VTTCue=C,q.VTTRegion=l}}(this),function(ot,q){var at="auto",t={"":!0,lr:!0,rl:!0},C={start:!0,middle:!0,end:!0,left:!0,right:!0};function l(h){if(typeof h!="string")return!1;var f=t[h.toLowerCase()];return f?h.toLowerCase():!1}function p(h){if(typeof h!="string")return!1;var f=C[h.toLowerCase()];return f?h.toLowerCase():!1}function a(h){for(var f=1;f<arguments.length;f++){var v=arguments[f];for(var u in v)h[u]=v[u]}return h}function m(h,f,v){var u=this,i=/MSIE\s8\.0/.test(navigator.userAgent),o={};i?u=document.createElement("custom"):o.enumerable=!0,u.hasBeenReset=!1;var r="",g=!1,s=h,d=f,c=v,T=null,_="",F=!0,e="auto",n="start",E=50,y="middle",O=50,b="middle";if(Object.defineProperty(u,"id",a({},o,{get:function(){return r},set:function(w){r=""+w}})),Object.defineProperty(u,"pauseOnExit",a({},o,{get:function(){return g},set:function(w){g=!!w}})),Object.defineProperty(u,"startTime",a({},o,{get:function(){return s},set:function(w){if(typeof w!="number")throw new TypeError("Start time must be set to a number.");s=w,this.hasBeenReset=!0}})),Object.defineProperty(u,"endTime",a({},o,{get:function(){return d},set:function(w){if(typeof w!="number")throw new TypeError("End time must be set to a number.");d=w,this.hasBeenReset=!0}})),Object.defineProperty(u,"text",a({},o,{get:function(){return c},set:function(w){c=""+w,this.hasBeenReset=!0}})),Object.defineProperty(u,"region",a({},o,{get:function(){return T},set:function(w){T=w,this.hasBeenReset=!0}})),Object.defineProperty(u,"vertical",a({},o,{get:function(){return _},set:function(w){var x=l(w);if(x===!1)throw new SyntaxError("An invalid or illegal string was specified.");_=x,this.hasBeenReset=!0}})),Object.defineProperty(u,"snap
`;)++S;var k=D.substr(0,S);return D[S]==="\r"&&++S,D[S]===`
`&&++S,n.buffer=D.substr(S),k}function y(D){var S=new C;if(l(D,function(J,R){switch(J){case"id":S.set(J,R);break;case"width":S.percent(J,R);break;case"lines":S.integer(J,R);break;case"regionanchor":case"viewportanchor":var A=R.split(",");if(A.length!==2)break;var j=new C;if(j.percent("x",A[0]),j.percent("y",A[1]),!j.has("x")||!j.has("y"))break;S.set(J+"X",j.get("x")),S.set(J+"Y",j.get("y"));break;case"scroll":S.alt(J,R,["up"]);break}},/=/,/\s/),S.has("id")){var k=new(n.vttjs.VTTRegion||n.window.VTTRegion);k.width=S.get("width",100),k.lines=S.get("lines",3),k.regionAnchorX=S.get("regionanchorX",0),k.regionAnchorY=S.get("regionanchorY",100),k.viewportAnchorX=S.get("viewportanchorX",0),k.viewportAnchorY=S.get("viewportanchorY",100),k.scroll=S.get("scroll",""),n.onregion&&n.onregion(k),n.regionList.push({id:S.get("id"),region:k})}}function O(D){l(D,function(S,k){switch(S){case"Region":y(k);break}},/:/)}try{var b;if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;b=E();var w=b.match(/^WEBVTT([ \t].*)?$/);if(!w||!w[0])throw new at(at.Errors.BadSignature);n.state="HEADER"}for(var x=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;switch(x?x=!1:b=E(),n.state){case"HEADER":/:/.test(b)?O(b):b||(n.state="ID");continue;case"NOTE":b||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(b)){n.state="NOTE";break}if(!b)continue;if(n.cue=new(n.vttjs.VTTCue||n.window.VTTCue)(0,0,""),n.state="CUE",b.indexOf("-->")===-1){n.cue.id=b;continue}case"CUE":try{p(b,n.cue,n.regionList)}catch(D){n.reportOrThrowError(D),n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":var B=b.indexOf("-->")!==-1;if(!b||B&&(x=!0)){n.oncue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}n.cue.text&&(n.cue.text+=`
`),n.cue.text+=b;continue;case"BADCUE":b||(n.state="ID");continue}}}catch(D){n.reportOrThrowError(D),n.state==="CUETEXT"&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=n.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||e.state==="HEADER")&&(e.buffer+=`
`,e.parse()),e.state==="INITIAL")throw new at(at.Errors.BadSignature)}catch(n){e.reportOrThrowError(n)}return e.onflush&&e.onflush(),this}},ot.WebVTT=c}(this,this.vttjs||{}),function(){(function(ot){var q=ot&&ot.videojs;if(q){q.CDN_VERSION="5.5.3";var at=ot.location.protocol==="https:"?"https://":"http://";q.options.flash.swf=at+"vjs.zencdn.net/swf/5.0.1/video-js.swf"}})(window),function(ot,q,at,t,C,l,p){q&&q.HELP_IMPROVE_VIDEOJS!==!1&&(C.random()>.01||(l=q.location,p=q.videojs||{},ot.src="//www.google-analytics.com/__utm.gif?utmwv=5.4.2&utmac=UA-16505296-3&utmn=1&utmhn="+t(l.hostname)+"&utmsr="+q.screen.availWidth+"x"+q.screen.availHeight+"&utmul="+(at.language||at.userLanguage||"").toLowerCase()+"&utmr="+t(l.href)+"&utmp="+t(l.hostname+l.pathname)+"&utmcc=__utma%3D1."+C.floor(1e10*C.random())+".1.1.1.1%3B&utme=8(vjsv*cdnv)9("+p.VERSION+"*"+p.CDN_VERSION+")"))}(new Image,window,navigator,encodeURIComponent,Math)}();