You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
179 KiB

4 years ago
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.videojs=e()}(this,function(){function t(t,e){xe(t).forEach(function(r){return e(t[r],r)})}function e(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return xe(t).reduce(function(r,n){return e(r,t[n],n)},r)}function r(e){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return Object.assign?Object.assign.apply(Object,[e].concat(n)):(n.forEach(function(r){r&&t(r,function(t,r){e[r]=t})}),e)}function n(t){return!!t&&"object"===(void 0===t?"undefined":Te(t))}function o(t){return n(t)&&"[object Object]"===we.call(t)&&t.constructor===Object}function i(t){return t.replace(/\n\r?\s*/g,"")}function s(t,e){if(!t||!e)return"";if("function"==typeof Kt.getComputedStyle){var r=Kt.getComputedStyle(t);return r?r[e]:""}return t.currentStyle[e]||""}function a(t){return"string"==typeof t&&/\S/.test(t)}function l(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function c(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}function u(){return Jt===Kt.document&&void 0!==Jt.createElement}function h(t){return n(t)&&1===t.nodeType}function p(){try{return Kt.parent!==Kt.self}catch(t){return!0}}function d(t){return function(e,r){if(!a(e))return Jt[t](null);a(r)&&(r=Jt.querySelector(r));var n=h(r)?r:Jt;return n[t]&&n[t](e)}}function f(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments[3],o=Jt.createElement(t);return Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(Me.warn(Ne(Ie,t,r)),o.setAttribute(t,r)):"textContent"===t?v(o,r):o[t]=r}),Object.getOwnPropertyNames(r).forEach(function(t){o.setAttribute(t,r[t])}),n&&I(o,n),o}function v(t,e){return void 0===t.textContent?t.innerText=e:t.textContent=e,t}function y(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function g(t,e){return l(e),t.classList?t.classList.contains(e):c(e).test(t.className)}function m(t,e){return t.classList?t.classList.add(e):g(t,e)||(t.className=(t.className+" "+e).trim()),t}function _(t,e){return t.classList?t.classList.remove(e):(l(e),t.className=t.className.split(/\s+/).filter(function(t){return t!==e}).join(" ")),t}function b(t,e,r){var n=g(t,e);if("function"==typeof r&&(r=r(t,e)),"boolean"!=typeof r&&(r=!n),r!==n)return r?m(t,e):_(t,e),t}function T(t,e){Object.getOwnPropertyNames(e).forEach(function(r){var n=e[r];null===n||void 0===n||!1===n?t.removeAttribute(r):t.setAttribute(r,!0===n?"":n)})}function C(t){var e={};if(t&&t.attributes&&t.attributes.length>0)for(var r=t.attributes,n=r.length-1;n>=0;n--){var o=r[n].name,i=r[n].value;"boolean"!=typeof t[o]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+o+",")||(i=null!==i),e[o]=i}return e}function k(t,e){return t.getAttribute(e)}function E(t,e,r){t.setAttribute(e,r)}function S(t,e){t.removeAttribute(e)}function w(){Jt.body.focus(),Jt.onselectstart=function(){return!1}}function x(){Jt.onselectstart=function(){return!0}}function j(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),r={};return["bottom","height","left","right","top","width"].forEach(function(t){void 0!==e[t]&&(r[t]=e[t])}),r.height||(r.height=parseFloat(s(t,"height"))),r.width||(r.width=parseFloat(s(t,"width"))),r}}function P(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var r=Jt.documentElement,n=Jt.body,o=r.clientLeft||n.clientLeft||0,i=Kt.pageXOffset||n.scrollLeft,s=e.left+i-o,a=r.clientTop||n.clientTop||0,l=Kt.pageYOffset||n.scrollTop,c=e.top+l-a;return{left:Math.round(s),top:Math.round(c)}}function A(t,e){var r={},n=P(t),o=t.offsetWidth,i=t.offsetHeight,s=n.top,a=n.left,l=e.pageY,c=e.pageX;return e.changedTouches&&(c=e.changedTouches[0].pageX,l=e.changedTouches[0].pageY),r.y=Math.max(0,Math.min(1,(s-l
t.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.prototype.currentWidth=function(){return this.currentDimension("width")},t.prototype.currentHeight=function(){return this.currentDimension("height")},t.prototype.focus=function(){this.el_.focus()},t.prototype.blur=function(){this.el_.blur()},t.prototype.emitTapEvents=function(){var t=0,e=null,r=void 0;this.on("touchstart",function(n){1===n.touches.length&&(e={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t=(new Date).getTime(),r=!0)}),this.on("touchmove",function(t){if(t.touches.length>1)r=!1;else if(e){var n=t.touches[0].pageX-e.pageX,o=t.touches[0].pageY-e.pageY,i=Math.sqrt(n*n+o*o);i>10&&(r=!1)}});var n=function(){r=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",function(n){if(e=null,!0===r){(new Date).getTime()-t<200&&(n.preventDefault(),this.trigger("tap"))}})},t.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t=Ge(this.player(),this.player().reportUserActivity),e=void 0;this.on("touchstart",function(){t(),this.clearInterval(e),e=this.setInterval(t,250)});var r=function(r){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",r),this.on("touchcancel",r)}},t.prototype.setTimeout=function(t,e){var r,n,o=this;return t=Ge(this,t),r=Kt.setTimeout(function(){o.off("dispose",n),t()},e),n=function(){return o.clearTimeout(r)},n.guid="vjs-timeout-"+r,this.on("dispose",n),r},t.prototype.clearTimeout=function(t){Kt.clearTimeout(t);var e=function(){};return e.guid="vjs-timeout-"+t,this.off("dispose",e),t},t.prototype.setInterval=function(t,e){var r=this;t=Ge(this,t);var n=Kt.setInterval(t,e),o=function(){return r.clearInterval(n)};return o.guid="vjs-interval-"+n,this.on("dispose",o),n},t.prototype.clearInterval=function(t){Kt.clearInterval(t);var e=function(){};return e.guid="vjs-interval-"+t,this.off("dispose",e),t},t.prototype.requestAnimationFrame=function(t){var e,r,n=this;return this.supportsRaf_?(t=Ge(this,t),e=Kt.requestAnimationFrame(function(){n.off("dispose",r),t()}),r=function(){return n.cancelAnimationFrame(e)},r.guid="vjs-raf-"+e,this.on("dispose",r),e):this.setTimeout(t,1e3/60)},t.prototype.cancelAnimationFrame=function(t){if(this.supportsRaf_){Kt.cancelAnimationFrame(t);var e=function(){};return e.guid="vjs-raf-"+t,this.off("dispose",e),t}return this.clearTimeout(t)},t.registerComponent=function(e,r){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var n=t.getComponent("Tech"),o=n&&n.isTech(r),i=t===r||t.prototype.isPrototypeOf(r.prototype);if(o||!i){var s=void 0;throw s=o?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+s+".")}e=J(e),t.components_||(t.components_={});var a=t.getComponent("Player");if("Player"===e&&a&&a.players){var l=a.players,c=Object.keys(l);if(l&&c.length>0&&c.map(function(t){return l[t]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=r,r},t.getComponent=function(e){if(e)return e=J(e),t.components_&&t.components_[e]?t.components_[e]:void 0},t}();lr.prototype.supportsRaf_="function"==typeof Kt.requestAnimationFrame&&"function"==typeof Kt.cancelAnimationFrame,lr.registerComponent("Component",lr);for(var cr={},ur=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange"
pn.prototype.featuresFullscreenResize=!1,pn.prototype.featuresPlaybackRate=!1,pn.prototype.featuresProgressEvents=!1,pn.prototype.featuresSourceset=!1,pn.prototype.featuresTimeupdateEvents=!1,pn.prototype.featuresNativeTextTracks=!1,pn.withSourceHandlers=function(t){t.registerSourceHandler=function(e,r){var n=t.sourceHandlers;n||(n=t.sourceHandlers=[]),void 0===r&&(r=n.length),n.splice(r,0,e)},t.canPlayType=function(e){for(var r=t.sourceHandlers||[],n=void 0,o=0;o<r.length;o++)if(n=r[o].canPlayType(e))return n;return""},t.selectSourceHandler=function(e,r){for(var n=t.sourceHandlers||[],o=0;o<n.length;o++)if(n[o].canHandleSource(e,r))return n[o];return null},t.canPlaySource=function(e,r){var n=t.selectSourceHandler(e,r);return n?n.canHandleSource(e,r):""},["seekable","seeking","duration"].forEach(function(t){var e=this[t];"function"==typeof e&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):e.apply(this,arguments)})},t.prototype),t.prototype.setSource=function(e){var r=t.selectSourceHandler(e,this.options_);r||(t.nativeSourceHandler?r=t.nativeSourceHandler:Me.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),r!==t.nativeSourceHandler&&(this.currentSource_=e),this.sourceHandler_=r.handleSource(e,this,this.options_),this.on("dispose",this.disposeSourceHandler)},t.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},lr.registerComponent("Tech",pn),pn.registerTech("Tech",pn),pn.defaultTechOrder_=[];var dn={},fn={},vn={},yn={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},gn={setCurrentTime:1},mn={play:1,pause:1},_n={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},bn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=Br(t);return _n[e.toLowerCase()]||""},Tn=function(t,e){if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;var r=t.cache_.sources.filter(function(t){return t.src===e});if(r.length)return r[0].type;for(var n=t.$$("source"),o=0;o<n.length;o++){var i=n[o];if(i.type&&i.src&&i.src===e)return i.type}return bn(e)},Cn=function t(e){if(Array.isArray(e)){var r=[];e.forEach(function(e){e=t(e),Array.isArray(e)?r=r.concat(e):n(e)&&r.push(e)}),e=r}else e="string"==typeof e&&e.trim()?[Nt({src:e})]:n(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[Nt(e)]:[];return e},kn=function(t){function e(r,n,o){Ce(this,e);var i=Z({createEl:!1},n),s=Ee(this,t.call(this,r,i,o));if(n.playerOptions.sources&&0!==n.playerOptions.sources.length)r.src(n.playerOptions.sources);else for(var a=0,l=n.playerOptions.techOrder;a<l.length;a++){var c=J(l[a]),u=pn.getTech(c);if(c||(u=lr.getComponent(c)),u&&u.isSupported()){r.loadTech_(c);break}}return s}return ke(e,t),e}(lr);lr.registerComponent("MediaLoader",kn);var En=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return o.emitTapEvents(),o.enable(),o}return ke(e,t),e.prototype.createEl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=r({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===e&&Me.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),o=r({role:"button"},o),this.tabIndex_=n.tabIndex;var i=t.prototype.createEl.call(this,e,n,o);return this.createControlTextEl(i),i},e.prototype.dispose=function(){this.controlTextEl_=null,t.prototype.dispose.call(this)},e.prototype.createControlTextEl=function(t){return this.co
e.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},e.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},e.prototype.updateARIAAttributes=function(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},e.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},e.prototype.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",function(){0===t.player_.volume()&&t.player_.lastVolume_(e)})},e}(zn);Qn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Qn.prototype.playerEvent="volumechange",lr.registerComponent("VolumeBar",Qn);var Zn=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ce(this,e),n.vertical=n.vertical||!1,(void 0===n.volumeBar||o(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical);var i=Ee(this,t.call(this,r,n));return Yn(i,r),i.throttledHandleMouseMove=Ye(Ge(i,i.handleMouseMove),25),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")}),i}return ke(e,t),e.prototype.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseMove),this.on(e,"touchmove",this.throttledHandleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseMove),this.off(e,"touchmove",this.throttledHandleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},e}(lr);Zn.prototype.options_={children:["volumeBar"]},lr.registerComponent("VolumeControl",Zn);var to=function(t,e){e.tech_&&!e.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",function(){e.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})},eo=function(t){function e(r,n){Ce(this,e);var o=Ee(this,t.call(this,r,n));return to(o,r),o.on(r,["loadstart","volumechange"],o.update),o}return ke(e,t),e.prototype.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){var e=this.player_.volume(),r=this.player_.lastVolume_();if(0===e){var n=r<.1?.1:r;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},e.prototype.update=function(t){this.updateIcon_(),this.updateControlText_()},e.prototype.updateIcon_=function(){var t=this.player_.volume(),e=3;oe&&this.player_.muted(this.player_.tech_.el_.muted),0===t||this.player_.muted()?e=0:t<.33?e=1:t<.67&&(e=2);for(var r=0;r<4;r++)_(this.el_,"vjs-vol-"+r);m(this.el_,"vjs-vol-"+e)},e.prototype.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume(),e=t?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},e}(Pn);eo.prototype.controlText_="Mute",lr.registerComponent("MuteToggle",eo);var ro=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ce(this,e),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||o(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline);var i=Ee(this,t.call(this,r,n));return i.on(r,["loadstart"],i.volumePanelState_),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeContr
n.prototype.createElFont_=function(){return f("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},n.prototype.createElControls_=function(){var t=this.localize("restore all settings to the default values");return f("div",{className:"vjs-track-settings-controls",innerHTML:['<button class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},n.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.prototype.label=function(){return this.localize("Caption Settings Dialog")},n.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.prototype.buildCSSClass=function(){return r.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.prototype.getValues=function(){var t=this;return e(Fo,function(e,r,n){var o=Bt(t.$(r.selector),r.parser);return void 0!==o&&(e[n]=o),e},{})},n.prototype.setValues=function(e){var r=this;t(Fo,function(t,n){Ht(r.$(t.selector),e[n],t.parser)})},n.prototype.setDefaults=function(){var e=this;t(Fo,function(t){var r=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=r})},n.prototype.restoreSettings=function(){var t=void 0;try{t=JSON.parse(Kt.localStorage.getItem("vjs-text-track-settings"))}catch(t){Me.warn(t)}t&&this.setValues(t)},n.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?Kt.localStorage.setItem("vjs-text-track-settings",JSON.stringify(t)):Kt.localStorage.removeItem("vjs-text-track-settings")}catch(t){Me.warn(t)}}},n.prototype.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},n.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(Jt,"keydown",this.handleKeyDown);var t=this.player_.controlBar,e=t&&t.subsCapsButton,r=t&&t.captionsButton;e?e.focus():r&&r.focus()},n}(Cr);lr.registerComponent("TextTrackSettings",Bo);var Ho=function(t){function e(r,n){Ce(this,e);var o=n.ResizeObserver||Kt.ResizeObserver;null===n.ResizeObserver&&(o=!1);var i=Z({createEl:!o},n),s=Ee(this,t.call(this,r,i));return s.ResizeObserver=n.ResizeObserver||Kt.ResizeObserver,s.loadListener_=null,s.resizeObserver_=null,s.debouncedHandler_=Je(function(){s.resizeHandler()},100,!1,r),o?(s.resizeObserver_=new s.ResizeObserver(s.debouncedHandler_),s.resizeObserver_.observe(r.el())):(s.loadListener_=function(){s.el_.contentWindow&&U(s.el_.contentWindow,"resize",s.debouncedHandler_),s.off("load",s.loadListener_)},s.on("load",s.loadListener_)),s}return ke(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},e.prototype.resizeHandler=function(){this.player_.trigger("playerresize")},e.prototype.dispose=function(){this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.el_&&this.el_.contentWindow&&q(this.el_.contentWindow,"resize",this.debouncedHandler_),this.loadListener_&&this.off("load",this.loadListener_),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null},e}(lr);lr.registerComponent("ResizeManager",Ho);var Vo=function(t){var e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;var r=t.$$("source"),n=[],o="";if(!r.length)return!1;for(var i=0;i<r.length;i++){var s=r[i].src;s&&-1===n.indexOf(s)&&n.push(s)}return!!n.length&&(1===n.length&&(o=n[0]),t.triggerSourceset(o),!0)},zo={};fe||(zo=Object.defineProperty({},"innerHTML",{get:function(){ret
this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},e.prototype.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return t.removeClass("vjs-waiting")})},e.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},e.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},e.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},e.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},e.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},e.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(Me.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},e.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},e.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},e.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},e.prototype.handleTechClick_=function(t){L(t)&&this.controls_&&(this.paused()?lt(this.play()):this.pause())},e.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},e.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},e.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},e.prototype.handleTechTouchEnd_=function(t){t.preventDefault()},e.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},e.prototype.handleStageClick_=function(){this.reportUserActivity()},e.prototype.handleTechFullscreenChange_=function(t,e){e&&this.isFullscreen(e.isFullscreen),this.trigger("fullscreenchange")},e.prototype.handleTechError_=function(){var t=this.tech_.error();this.error(t)},e.prototype.handleTechTextData_=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},e.prototype.getCache=function(){return this.cache_},e.prototype.techCall_=function(t,e){this.ready(function(){if(t in gn)return wt(this.middleware_,this.tech_,t,e);if(t in mn)return xt(this.middleware_,this.tech_,t,e);try{this.tech_&&this.tech_[t](e)}catch(t){throw Me(t),t}},!0)},e.prototype.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in yn)return St(this.middleware_,this.tech_,t);if(t in mn)return xt(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw Me("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw Me("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw Me(e),e}}},e.prototype.play=function(){var t=this,e=this.options_.Promise||Kt.Promise;return e?new e(function(e){t.play_(e)}):this.play_()},e.prototype.play_=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:lt;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return void e(this.techGet_("play"));this.playOnLoadstart_=function(){t.playOnLoadstart_=null,e(t.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready(function(){t.playWaitingForReady_=!1,e(t.play())})}},e.prototype.pause=function(){this.techCall_("pause")},e.prototype.paused=function(){return!1!==this.techGet_("paused")},e.prototype.played=function(){return this.techGet_("played")||nt(0,0)},e.prototype.scrubbing=function(t){if(void 0===t)return this.scrubbing_;this.scrubbing_=!!t,t?this.addClass("vjs-scrubbing"):th