LocalCDN-Firefox-Chrome-Brave/resources/video.js/6.13.0/video.min.jsm

8 lines
201 KiB
JavaScript
Raw Normal View History

!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){return e={exports:{}},t(e,e.exports),e.exports}function e(t,e){qe(t).forEach(function(r){return e(t[r],r)})}function r(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return qe(t).reduce(function(r,n){return e(r,t[n],n)},r)}function n(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Object.assign?Object.assign.apply(Object,[t].concat(n)):(n.forEach(function(r){r&&e(r,function(e,r){t[r]=e})}),t)}function i(t){return!!t&&"object"===(void 0===t?"undefined":He(t))}function o(t){return i(t)&&"[object Object]"===Xe.call(t)&&t.constructor===Object}function s(t){var e="info",r=void 0,n=function t(){for(var n=t.stringify||Ie&&Ie<11,i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];r("log",e,o,n)};return r=$e(t,n),n.createLogger=function(e){return s(t+": "+e)},n.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:e},n.level=function(t){if("string"==typeof t){if(!n.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');e=t}return e},n.history=function(){return Ke?[].concat(Ke):[]},n.history.filter=function(t){return(Ke||[]).filter(function(e){return new RegExp(".*"+t+".*").test(e[0])})},n.history.clear=function(){Ke&&(Ke.length=0)},n.history.disable=function(){null!==Ke&&(Ke.length=0,Ke=null)},n.history.enable=function(){null===Ke&&(Ke=[])},n.error=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return r("error",e,n)},n.warn=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return r("warn",e,n)},n.debug=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return r("debug",e,n)},n}function a(t){return t.replace(/\n\r?\s*/g,"")}function l(t,e){if(!t||!e)return"";if("function"==typeof he.getComputedStyle){var r=he.getComputedStyle(t);return r?r[e]:""}return t.currentStyle[e]||""}function c(t){return"string"==typeof t&&/\S/.test(t)}function u(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function h(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}function p(){return ye===he.document&&void 0!==ye.createElement}function d(t){return i(t)&&1===t.nodeType}function f(){try{return he.parent!==he.self}catch(t){return!0}}function v(t){return function(e,r){if(!c(e))return ye[t](null);c(r)&&(r=ye.querySelector(r));var n=d(r)?r:ye;return n[t]&&n[t](e)}}function y(){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],i=ye.createElement(t);return Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(Ye.warn(Je(Qe,t,r)),i.setAttribute(t,r)):"textContent"===t?g(i,r):i[t]=r}),Object.getOwnPropertyNames(r).forEach(function(t){i.setAttribute(t,r[t])}),n&&D(i,n),i}function g(t,e){return void 0===t.textContent?t.innerText=e:t.textContent=e,t}function m(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function _(t,e){return u(e),t.classList?t.classList.contains(e):h(e).test(t.className)}function b(t,e){return t.classList?t.classList.add(e):_(t,e)||(t.className=(t.className+" "+e).trim()),t}function T(t,e){return t.classList?t.classList.remove(e):(u(e),t.className=t.className.split(/\s+/).filter(function(t){return t!==e}).join(" ")),t}function C(t,e,r){var n=_(t,e);if("function"==typeof r&&(r=r(t,e)),"boolean"!=typeof r&&(r=!n),r!==n)return r?b(t,e):T(t,e),t}function k(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 E(t){var e={};if(t&&t.attributes&&t.attributes.length>0)for(var r=t.attributes,n=r.length-1;n>=0;n--){var i=r[n].name,o=r[n].value;"boolean"!=typeof t[i]&&-1===
},Qe=Ue(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]),Ze=v("querySelector"),tr=v("querySelectorAll"),er=(Object.freeze||Object)({isReal:p,isEl:d,isInFrame:f,createEl:y,textContent:g,prependTo:m,hasClass:_,addClass:b,removeClass:T,toggleClass:C,setAttributes:k,getAttributes:E,getAttribute:w,setAttribute:S,removeAttribute:x,blockTextSelection:j,unblockTextSelection:A,getBoundingClientRect:P,findPosition:O,getPointerPosition:M,isTextNode:N,emptyEl:I,normalizeContent:L,appendContent:D,insertContent:R,isSingleLeftClick:B,$:Ze,$$:tr}),rr=1,nr={},ir="vdata"+(new Date).getTime(),or=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){or=!0}});he.addEventListener("test",null,t),he.removeEventListener("test",null,t)}catch(t){}}();var sr=["touchstart","touchmove"],ar=(Object.freeze||Object)({fixEvent:X,on:q,off:K,trigger:$,one:Y}),lr=!1,cr=void 0,ur=function(){if(p()&&!1!==cr.options.autoSetup){var t=ye.getElementsByTagName("video"),e=ye.getElementsByTagName("audio"),r=ye.getElementsByTagName("video-js"),n=[];if(t&&t.length>0)for(var i=0,o=t.length;i<o;i++)n.push(t[i]);if(e&&e.length>0)for(var s=0,a=e.length;s<a;s++)n.push(e[s]);if(r&&r.length>0)for(var l=0,c=r.length;l<c;l++)n.push(r[l]);if(n&&n.length>0)for(var u=0,h=n.length;u<h;u++){var d=n[u];if(!d||!d.getAttribute){G(1);break}if(void 0===d.player){var f=d.getAttribute("data-setup");null!==f&&cr(d)}}else lr||G(1)}};p()&&"complete"===ye.readyState?lr=!0:Y(he,"load",function(){lr=!0});var hr=function(t){var e=ye.createElement("style");return e.className=t,e},pr=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},dr=function(t,e,r){e.guid||(e.guid=F());var n=function(){return e.apply(t,arguments)};return n.guid=r?r+"_"+e.guid:e.guid,n},fr=function(t,e){var r=Date.now();return function(){var n=Date.now();n-r>=e&&(t.apply(void 0,arguments),r=n)}},vr=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:he,i=void 0,o=function(){n.clearTimeout(i),i=null},s=function(){var o=this,s=arguments,a=function(){i=null,a=null,r||t.apply(o,s)};!i&&r&&t.apply(o,s),n.clearTimeout(i),i=n.setTimeout(a,e)};return s.cancel=o,s},yr=function(){};yr.prototype.allowedEvents_={},yr.prototype.on=function(t,e){var r=this.addEventListener;this.addEventListener=function(){},q(this,t,e),this.addEventListener=r},yr.prototype.addEventListener=yr.prototype.on,yr.prototype.off=function(t,e){K(this,t,e)},yr.prototype.removeEventListener=yr.prototype.off,yr.prototype.one=function(t,e){var r=this.addEventListener;this.addEventListener=function(){},Y(this,t,e),this.addEventListener=r},yr.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=X(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),$(this,t)},yr.prototype.dispatchEvent=yr.prototype.trigger;var gr=function(t){return t instanceof yr||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return"function"==typeof t[e]})},mr=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},_r=function(t){if(!t.nodeName&&!gr(t))throw new Error("Invalid target; must be a DOM node or evented object.")},br=function(t){if(!mr(t))throw new Error("Invalid event type; must be a non-empty string or array.")},Tr=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},Cr=function(t,e){var r=e.length<3||e[0]===t||e[0]===t.eventBusEl_,n=void 0,i=void 0,o=void 0;return r?(n=t.eventBusEl_,e.length>=3&&e.shift(),i=e[0],o=e[1]):(n=e[0],i=e[1],o=e[2]),_r(n),br(i),Tr(o),o=dr(t,o),{isTargetingSelf:r,target:n,type:i,listener:o}},kr=function(t,e,r,n){_r(t),t.nodeName?ar[e](t,r,n):t[e](r,n)},Er={on:function(){for(var t=this,e=arguments.length,r=Ar
var r,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Ve(this,e),!i.tech)throw new Error("A tech was not provided.");var o=et(i,{kind:Qr[i.kind]||"subtitles",language:i.language||i.srclang||""}),s=Zr[o.mode]||"disabled",a=o.default;"metadata"!==o.kind&&"chapters"!==o.kind||(s="hidden");var l=r=We(this,t.call(this,o));if(l.tech_=o.tech,Ne)for(var c in e.prototype)"constructor"!==c&&(l[c]=e.prototype[c]);l.cues_=[],l.activeCues_=[];var u=new Yr(l.cues_),h=new Yr(l.activeCues_),p=!1,d=dr(l,function(){this.activeCues=this.activeCues,p&&(this.trigger("cuechange"),p=!1)});return"disabled"!==s&&l.tech_.ready(function(){l.tech_.on("timeupdate",d)},!0),Object.defineProperty(l,"default",{get:function(){return a},set:function(){}}),Object.defineProperty(l,"mode",{get:function(){return s},set:function(t){var e=this;Zr[t]&&(s=t,"disabled"!==s?this.tech_.ready(function(){e.tech_.on("timeupdate",d)},!0):this.tech_.off("timeupdate",d),this.trigger("modechange"))}}),Object.defineProperty(l,"cues",{get:function(){return this.loaded_?u:null},set:function(){}}),Object.defineProperty(l,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return h;for(var t=this.tech_.currentTime(),e=[],r=0,n=this.cues.length;r<n;r++){var i=this.cues[r];i.startTime<=t&&i.endTime>=t?e.push(i):i.startTime===i.endTime&&i.startTime<=t&&i.startTime+.5>=t&&e.push(i)}if(p=!1,e.length!==this.activeCues_.length)p=!0;else for(var o=0;o<e.length;o++)-1===this.activeCues_.indexOf(e[o])&&(p=!0);return this.activeCues_=e,h.setCues_(this.activeCues_),h},set:function(){}}),o.src?(l.src=o.src,Pn(o.src,l)):l.loaded_=!0,n=l,We(r,n)}return ze(e,t),e.prototype.addCue=function(t){var e=t;if(he.vttjs&&!(t instanceof he.vttjs.VTTCue)){e=new he.vttjs.VTTCue(t.startTime,t.endTime,t.text);for(var r in t)r in e||(e[r]=t[r]);e.id=t.id,e.originalCue_=t}for(var n=this.tech_.textTracks(),i=0;i<n.length;i++)n[i]!==this&&n[i].removeCue(e);this.cues_.push(e),this.cues.setCues_(this.cues_)},e.prototype.removeCue=function(t){for(var e=this.cues_.length;e--;){var r=this.cues_[e];if(r===t||r.originalCue_&&r.originalCue_===t){this.cues_.splice(e,1),this.cues.setCues_(this.cues_);break}}},e}(tn);On.prototype.allowedEvents_={cuechange:"cuechange"};var Mn=function(t){function e(){var r,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ve(this,e);var o=et(i,{kind:Jr[i.kind]||""}),s=r=We(this,t.call(this,o)),a=!1;if(Ne)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"enabled",{get:function(){return a},set:function(t){"boolean"==typeof t&&t!==a&&(a=t,this.trigger("enabledchange"))}}),o.enabled&&(s.enabled=o.enabled),s.loaded_=!0,n=s,We(r,n)}return ze(e,t),e}(tn),Nn=function(t){function e(){var r,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ve(this,e);var o=et(i,{kind:Gr[i.kind]||""}),s=r=We(this,t.call(this,o)),a=!1;if(Ne)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"selected",{get:function(){return a},set:function(t){"boolean"==typeof t&&t!==a&&(a=t,this.trigger("selectedchange"))}}),o.selected&&(s.selected=o.selected),n=s,We(r,n)}return ze(e,t),e}(tn),In=0,Ln=2,Dn=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ve(this,e);var n=We(this,t.call(this)),i=void 0,o=n;if(Ne){o=ye.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(o[s]=e.prototype[s])}var a=new On(r);if(o.kind=a.kind,o.src=a.src,o.srclang=a.language,o.label=a.label,o.default=a.default,Object.defineProperty(o,"readyState",{get:function(){return i}}),Object.defineProperty(o,"track",{get:function(){return a}}),i=In,a.addEventListener("loadeddata",function(){i=Ln,o.trigger({type:"load",target:o})}),Ne){var l;return l=o,We(n,l)}return n}return ze(e,t),e}(yr);Dn.prototype.allowedEvents_={load:"load"},Dn.NONE=In,Dn.LOADING=1,Dn.LOADED=Ln,Dn.ERROR=3;var Rn={audio:{ListClass:Ur,TrackClass:Mn,capitalName:"Audio"},video:{ListClass:qr,TrackClass:Nn,capitalName:"Video"},text:{ListClass:Kr,TrackClass:On,capitalName:"Text"}};
We(this,t.apply(this,arguments))}return ze(e,t),e.prototype.createEl=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t="button",e=n({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},e),r=n({type:"button"},r);var i=Sr.prototype.createEl.call(this,t,e,r);return this.createControlTextEl(i),i},e.prototype.addChild=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.constructor.name;return Ye.warn("Adding an actionable (user controllable) child to a Button ("+r+") is not supported; use a ClickableComponent instead."),Sr.prototype.addChild.call(this,t,e)},e.prototype.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},e.prototype.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},e.prototype.handleKeyPress=function(e){32!==e.which&&13!==e.which&&t.prototype.handleKeyPress.call(this,e)},e}(pi);Sr.registerComponent("Button",gi);var mi=function(t){function e(r,n){Ve(this,e);var i=We(this,t.call(this,r,n));return i.mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}return ze(e,t),e.prototype.buildCSSClass=function(){return"vjs-big-play-button"},e.prototype.handleClick=function(t){var e=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY)return void ut(e);var r=this.player_.getChild("controlBar"),n=r&&r.getChild("playToggle");if(!n)return void this.player_.focus();var i=function(){return n.focus()};ct(e)?e.then(i,function(){}):this.setTimeout(i,1)},e.prototype.handleKeyPress=function(e){this.mouseused_=!1,t.prototype.handleKeyPress.call(this,e)},e.prototype.handleMouseDown=function(t){this.mouseused_=!0},e}(gi);mi.prototype.controlText_="Play Video",Sr.registerComponent("BigPlayButton",mi);var _i=function(t){function e(r,n){Ve(this,e);var i=We(this,t.call(this,r,n));return i.controlText(n&&n.controlText||i.localize("Close")),i}return ze(e,t),e.prototype.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},e}(gi);Sr.registerComponent("CloseButton",_i);var bi=function(t){function e(r,n){Ve(this,e);var i=We(this,t.call(this,r,n));return i.on(r,"play",i.handlePlay),i.on(r,"pause",i.handlePause),i.on(r,"ended",i.handleEnded),i}return ze(e,t),e.prototype.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},e.prototype.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},e.prototype.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},e.prototype.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(gi);bi.prototype.controlText_="Play",Sr.registerComponent("PlayToggle",bi);var Ti=function(t,e){t=t<0?0:t;var r=Math.floor(t%60),n=Math.floor(t/60%60),i=Math.floor(t/3600),o=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(i=n=r="-"),i=i>0||s>0?i+":":"",n=((i||o>=10)&&n<10?"0"+n:n)+":",r=r<10?"0"+r:r,i+n+r},Ci=Ti,ki=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return Ci(t,e)},Ei=function(t){function e(r,n){Ve(this,e);var i=We(this,t.call(this,r,n));return i.throttledUpdateContent=fr(dr(i,i.updateContent),25),i.on(r,"timeupdate",i.throttledUpdateContent),i}return ze(e,t),e.prototype.createEl=function(e){var r=this.buildCSSClass(),n=t.prototype.createEl.call(this,"div",{className:r+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text">'+this.localize(this.labelText_)+" </span>"});return this.con
i.selectable?i.multiSelectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitemradio"):i.el_.setAttribute("role","menuitem"),i}return ze(e,t),e.prototype.createEl=function(e,r,i){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",n({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},r),i)},e.prototype.handleClick=function(t){this.selected(!0)},e.prototype.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},e}(pi);Sr.registerComponent("MenuItem",$i);var Yi=function(t){function e(r,n){Ve(this,e);var i=n.track,o=r.textTracks();n.label=i.label||i.language||"Unknown",n.selected="showing"===i.mode;var s=We(this,t.call(this,r,n));s.track=i;var a=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];s.handleTracksChange.apply(s,e)},l=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];s.handleSelectedLanguageChange.apply(s,e)};if(r.on(["loadstart","texttrackchange"],a),o.addEventListener("change",a),o.addEventListener("selectedlanguagechange",l),s.on("dispose",function(){r.off(["loadstart","texttrackchange"],a),o.removeEventListener("change",a),o.removeEventListener("selectedlanguagechange",l)}),void 0===o.onchange){var c=void 0;s.on(["tap","click"],function(){if("object"!==He(he.Event))try{c=new he.Event("change")}catch(t){}c||(c=ye.createEvent("Event"),c.initEvent("change",!0,!0)),o.dispatchEvent(c)})}return s.handleTracksChange(),s}return ze(e,t),e.prototype.handleClick=function(e){var r=this.track.kind,n=this.track.kinds,i=this.player_.textTracks();if(n||(n=[r]),t.prototype.handleClick.call(this,e),i)for(var o=0;o<i.length;o++){var s=i[o];s===this.track&&n.indexOf(s.kind)>-1?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled")}},e.prototype.handleTracksChange=function(t){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},e.prototype.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},e.prototype.dispose=function(){this.track=null,t.prototype.dispose.call(this)},e}($i);Sr.registerComponent("TextTrackMenuItem",Yi);var Gi=function(t){function e(r,n){return Ve(this,e),n.track={player:r,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,We(this,t.call(this,r,n))}return ze(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),r=!0,n=0,i=e.length;n<i;n++){var o=e[n];if(this.options_.kinds.indexOf(o.kind)>-1&&"showing"===o.mode){r=!1;break}}r!==this.isSelected_&&this.selected(r)},e.prototype.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),r=!0,n=0,i=e.length;n<i;n++){var o=e[n];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&"showing"===o.mode){r=!1;break}}r&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(Yi);Sr.registerComponent("OffTextTrackMenuItem",Gi);var Ji=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ve(this,e),n.tracks=r.textTracks(),We(this,t.call(this,r,n))}return ze(e,t),e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yi,r=void 0;this.label_&&(r=this.label_+" off"),t.push(new Gi(this.player_,{kinds:this.kinds_,kind:this.kind_,label:r})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.
t.el_.currentTime>0&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN},e.prototype.width=function(){return this.el_.offsetWidth},e.prototype.height=function(){return this.el_.offsetHeight},e.prototype.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){var e=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},r=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",r),this.on("dispose",function(){t.off("webkitbeginfullscreen",r),t.off("webkitendfullscreen",e)})}},e.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var t=he.navigator&&he.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},e.prototype.enterFullScreen=function(){var t=this.el_;t.paused&&t.networkState<=t.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){t.pause(),t.webkitEnterFullScreen()},0)):t.webkitEnterFullScreen()},e.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},e.prototype.src=function(t){if(void 0===t)return this.el_.src;this.setSrc(t)},e.prototype.reset=function(){e.resetMediaElement(this.el_)},e.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},e.prototype.setControls=function(t){this.el_.controls=!!t},e.prototype.addTextTrack=function(e,r,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,r,n):t.prototype.addTextTrack.call(this,e,r,n)},e.prototype.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,e);var r=ye.createElement("track");return e.kind&&(r.kind=e.kind),e.label&&(r.label=e.label),(e.language||e.srclang)&&(r.srclang=e.language||e.srclang),e.default&&(r.default=e.default),e.id&&(r.id=e.id),e.src&&(r.src=e.src),r},e.prototype.addRemoteTextTrack=function(e,r){var n=t.prototype.addRemoteTextTrack.call(this,e,r);return this.featuresNativeTextTracks&&this.el().appendChild(n),n},e.prototype.removeRemoteTextTrack=function(e){if(t.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var r=this.$$("track"),n=r.length;n--;)e!==r[n]&&e!==r[n].track||this.el().removeChild(r[n])},e.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),he.performance&&"function"==typeof he.performance.now?t.creationTime=he.performance.now():he.performance&&he.performance.timing&&"number"==typeof he.performance.timing.navigationStart&&(t.creationTime=he.Date.now()-he.performance.timing.navigationStart),t},e}(ti);if(p()){Bo.TEST_VID=ye.createElement("video");var Fo=ye.createElement("track");Fo.kind="captions",Fo.srclang="en",Fo.label="English",Bo.TEST_VID.appendChild(Fo)}Bo.isSupported=function(){try{Bo.TEST_VID.volume=.5}catch(t){return!1}return!(!Bo.TEST_VID||!Bo.TEST_VID.canPlayType)},Bo.canPlayType=function(t){return Bo.TEST_VID.canPlayType(t)},Bo.canPlaySource=function(t,e){return Bo.canPlayType(t.type)},Bo.canControlVolume=function(){try{var t=Bo.TEST_VID.volume;return Bo.TEST_VID.volume=t/2+.1,t!==Bo.TEST_VID.volume}catch(t){return!1}},Bo.canMuteVolume=function(){try{var t=Bo.TEST_VID.muted;return Bo.TEST_VID.muted=!t,Bo.TEST_VID.muted?S(Bo.TEST_VID,"muted","muted"):x(Bo.TEST_VID,"muted"),t!==Bo.TEST_VID.muted}catch(t){return!1}},Bo.canControlPlaybackRate=function(){if(we&&Oe&&Me<58)return!1;try{var t=Bo.TEST_VID.playbackRate;return Bo.TEST_VID.playbackRate=t/2+.1,t!==Bo.TEST_VID.playbackRate}catch(t){return!1}},Bo.canOverrideAttributes=function(){if(Ne)return!1;try{var t=function(){};Obje
void(this.options_.preload=t)):this.techGet_("preload")},e.prototype.autoplay=function(t){if(void 0===t)return this.options_.autoplay||!1;var e=void 0;"string"==typeof t&&/(any|play|muted)/.test(t)?(this.options_.autoplay=t,this.manualAutoplay_(t),e=!1):this.options_.autoplay=!!t,e=e||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",e)},e.prototype.playsinline=function(t){return void 0!==t?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},e.prototype.loop=function(t){return void 0!==t?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")},e.prototype.poster=function(t){if(void 0===t)return this.poster_;t||(t=""),t!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))},e.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},e.prototype.controls=function(t){if(void 0===t)return!!this.controls_;t=!!t,this.controls_!==t&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},e.prototype.usingNativeControls=function(t){if(void 0===t)return!!this.usingNativeControls_;t=!!t,this.usingNativeControls_!==t&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},e.prototype.error=function(t){return void 0===t?this.error_||null:null===t?(this.error_=t,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new at(t),this.addClass("vjs-error"),Ye.error("(CODE:"+this.error_.code+" "+at.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},e.prototype.reportUserActivity=function(t){this.userActivity_=!0},e.prototype.userActive=function(t){if(void 0===t)return this.userActive_;if((t=!!t)!==this.userActive_){if(this.userActive_=t,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(t){t.stopPropagation(),t.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},e.prototype.listenForUserActivity_=function(){var t=void 0,e=void 0,r=void 0,n=dr(this,this.reportUserActivity),i=function(t){t.screenX===e&&t.screenY===r||(e=t.screenX,r=t.screenY,n())},o=function(){n(),this.clearInterval(t),t=this.setInterval(n,250)},s=function(e){n(),this.clearInterval(t)};this.on("mousedown",o),this.on("mousemove",i),this.on("mouseup",s),this.on("keydown",n),this.on("keyup",n);var a=void 0;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var t=this.options_.inactivityTimeout;t<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},t))}},250)},e.prototype.playbackRate=function(t){return void 0!==t?void this.techCall_("setPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1},e.prototype.defaultPlaybackRate=function(t){return void 0!==t?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},e.prototype.isAudio=function(t){return void 0!==t?void(this.isAudio_=!!t):!!this.isAudio_},e.prototype.addTextTrack=function(t,e,r){if(this.tech_)re