document.createElement("video");document.createElement("audio");document.createElement("track");var vjs=function(d,b,c){var a;if(typeof d==="string"){if(d.indexOf("#")===0){d=d.slice(1)}if(vjs.players[d]){return vjs.players[d]}else{a=vjs.el(d)}}else{a=d}if(!a||!a.nodeName){throw new TypeError("The element or ID supplied is not valid. (videojs)")}return a.player||new vjs.Player(a,b,c)};var videojs=window.videojs=vjs;vjs.CDN_VERSION="4.7";vjs.ACCESS_PROTOCOL=("https:"==document.location.protocol?"https://":"http://");vjs.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{},errorDisplay:{}},language:document.getElementsByTagName("html")[0].getAttribute("lang")||navigator.languages&&navigator.languages[0]||navigator.userLanguage||navigator.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this video."};if(vjs.CDN_VERSION!=="GENERATED_CDN_VSN"){videojs.options.flash["swf"]=vjs.ACCESS_PROTOCOL+"vjs.zencdn.net/"+vjs.CDN_VERSION+"/video-js.swf"}vjs.addLanguage=function(a,b){if(vjs.options.languages[a]!==undefined){vjs.options.languages[a]=vjs.util.mergeOptions(vjs.options.languages[a],b)}else{vjs.options.languages[a]=b}return vjs.options.languages};vjs.players={}; /*! * Custom Universal Module Definition (UMD) * * Video.js will never be a non-browser lib so we can simplify UMD a bunch and * still support requirejs and browserify. This also needs to be closure * compiler compatible, so string keys are used. */ ;if(typeof define==="function"&&define.amd){define([],function(){return videojs})}else{if(typeof exports==="object"&&typeof module==="object"){module.exports=videojs}}vjs.CoreObject=vjs.CoreObject=function(){};vjs.CoreObject.extend=function(c){var d,a;c=c||{};d=c.init||c.init||this.prototype.init||this.prototype.init||function(){};a=function(){d.apply(this,arguments)};a.prototype=vjs.obj.create(this.prototype);a.prototype.constructor=a;a.extend=vjs.CoreObject.extend;a.create=vjs.CoreObject.create;for(var b in c){if(c.hasOwnProperty(b)){a.prototype[b]=c[b]}}return a};vjs.CoreObject.create=function(){var a=vjs.obj.create(this.prototype);this.apply(a,arguments);return a};vjs.on=function(c,b,a){if(vjs.obj.isArray(b)){return _handleMultipleEvents(vjs.on,c,b,a)}var d=vjs.getData(c);if(!d.handlers){d.handlers={}}if(!d.handlers[b]){d.handlers[b]=[]}if(!a.guid){a.guid=vjs.guid++}d.handlers[b].push(a);if(!d.dispatcher){d.disabled=false;d.dispatcher=function(g){if(d.disabled){return}g=vjs.fixEvent(g);var f=d.handlers[g.type];if(f){var h=f.slice(0);for(var e=0,i=h.length;e=0;b--){if(d[b]===a){d.splice(b,1)}}c.className=d.join(" ")};vjs.TEST_VID=vjs.createEl("video");vjs.USER_AGENT=navigator.userAgent;vjs.IS_IPHONE=(/iPhone/i).test(vjs.USER_AGENT);vjs.IS_IPAD=(/iPad/i).test(vjs.USER_AGENT);vjs.IS_IPOD=(/iPod/i).test(vjs.USER_AGENT);vjs.IS_IOS=vjs.IS_IPHONE||vjs.IS_IPAD||vjs.IS_IPOD;vjs.IOS_VERSION=(function(){var a=vjs.USER_AGENT.match(/OS (\d+)_/i);if(a&&a[1]){return a[1]}})();vjs.IS_ANDROID=(/Android/i).test(vjs.USER_AGENT);vjs.ANDROID_VERSION=(function(){var b=vjs.USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),a,c;if(!b){return null}a=b[1]&&parseFloat(b[1]);c=b[2]&&parseFloat(b[2]);if(a&&c){return parseFloat(b[1]+"."+b[2])}else{if(a){return a}else{return null}}})();vjs.IS_OLD_ANDROID=vjs.IS_ANDROID&&(/webkit/i).test(vjs.USER_AGENT)&&vjs.ANDROID_VERSION<2.3;vjs.IS_FIREFOX=(/Firefox/i).test(vjs.USER_AGENT);vjs.IS_CHROME=(/Chrome/i).test(vjs.USER_AGENT);vjs.TOUCH_ENABLED=!!(("ontouchstart" in window)||window.DocumentTouch&&document instanceof window.DocumentTouch);vjs.setElementAttributes=function(b,a){vjs.obj.each(a,function(c,d){if(d===null||typeof d==="undefined"||d===false){b.removeAttribute(c)}else{b.setAttribute(c,(d===true?"":d))}})};vjs.getElementAttributes=function(a){var g,b,d,f,c;g={};b=",autoplay,controls,loop,muted,default,";if(a&&a.attributes&&a.attributes.length>0){d=a.attributes;for(var e=d.length-1;e>=0;e--){f=d[e].name;c=d[e].value;if(typeof a[f]==="boolean"||b.indexOf(","+f+",")!==-1){c=(c!==null)?true:false}g[f]=c}}return g};vjs.getComputedDimension=function(a,b){var c="";if(document.defaultView&&document.defaultView.getComputedStyle){c=document.defaultView.getComputedStyle(a,"").getPropertyValue(b)}else{if(a.currentStyle){c=a["client"+b.substr(0,1).toUpperCase()+b.substr(1)]+"px"}}return c};vjs.insertFirst=function(b,a){if(a.firstChild){a.insertBefore(b,a.firstChild)}else{a.appendChild(b)}};vjs.browser={};vjs.el=function(a){if(a.indexOf("#")===0){a=a.slice(1)}return document.getElementById(a)};vjs.formatTime=function(g,b){b=b||g;var e=Math.floor(g%60),a=Math.floor(g/60%60),d=Math.floor(g/3600),f=Math.floor(b/60%60),c=Math.floor(b/3600);if(isNaN(g)||g===Infinity){d=a=e="-"}d=(d>0||c>0)?d+":":"";a=(((d||f>=10)&&a<10)?"0"+a:a)+":";e=(e<10)?"0"+e:e;return d+a+e};vjs.blockTextSelection=function(){document.body.focus();document.onselectstart=function(){return false}};vjs.unblockTextSelection=function(){document.onselectstart=function(){return true}};vjs.trim=function(a){return(a+"").replace(/^\s+|\s+$/g,"")};vjs.round=function(a,b){if(!b){b=0}return Math.round(a*Math.pow(10,b))/Math.pow(10,b)};vjs.createTimeRange=function(b,a){return{length:1,start:function(){return b},end:function(){return a}}};vjs.get=function(a,i,f,c){var k,d,g,b,j;f=f||function(){};if(typeof XMLHttpRequest==="undefined"){window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(n){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(m){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(l){}throw new Error("This browser does not support XMLHttpRequest.")}}d=new XMLHttpRequest();g=vjs.parseUrl(a);b=window.location;j=(g.protocol+g.host)!==(b.protocol+b.host);if(j&&window.XDomainRequest&&!("withCredentials" in d)){d=new window.XDomainRequest();d.onload=function(){i(d.responseText)};d.onerror=f;d.onprogress=function(){};d.ontimeout=f}else{k=(g.protocol=="file:"||b.protocol=="file:");d.onreadystatechange=function(){if(d.readyState===4){if(d.status===200||k&&d.status===0){i(d.responseText)}else{f(d.responseText)}}}}try{d.open("GET",a,true);if(c){d.withCredentials=true}}catch(h){f(h);return}try{d.send()}catch(h){f(h)}};vjs.setLocalStorage=function(b,c){try{var a=window.localStorage||false;if(!a){return}a[b]=c}catch(d){if(d.code==22||d.code==1014){vjs.log("LocalStorage Full (VideoJS)",d)}else{if(d.code==18){vjs.log("LocalStorage not allowed (VideoJS)",d)}else{vjs.log("LocalStorage Error (VideoJS)",d)}}}};vjs.getAbsoluteURL=function(a){if(!a.match(/^https?:\/\//)){a=vjs.createEl("div",{innerHTML:'x'}).firstChild.href}return a};vjs.parseUrl=function(d){var h,c,b,g,f;g=["protocol","hostname","port","pathname","search","hash","host"];c=vjs.createEl("a",{href:d});b=(c.host===""&&c.protocol!=="file:");if(b){h=vjs.createEl("div");h.innerHTML='';c=h.firstChild;h.setAttribute("style","display:none; position:absolute;");document.body.appendChild(h)}f={};for(var e=0;e=0;a--){if(this.children_[a].dispose){this.children_[a].dispose()}}}this.children_=null;this.childIndex_=null;this.childNameIndex_=null;this.off();if(this.el_.parentNode){this.el_.parentNode.removeChild(this.el_)}vjs.removeData(this.el_);this.el_=null};vjs.Component.prototype.player_=true;vjs.Component.prototype.player=function(){return this.player_};vjs.Component.prototype.options_;vjs.Component.prototype.options=function(a){if(a===undefined){return this.options_}return this.options_=vjs.util.mergeOptions(this.options_,a)};vjs.Component.prototype.el_;vjs.Component.prototype.createEl=function(b,a){return vjs.createEl(b,a)};vjs.Component.prototype.localize=function(a){var c=this.player_.language(),b=this.player_.languages();if(b&&b[c]&&b[c][a]){return b[c][a]}return a};vjs.Component.prototype.el=function(){return this.el_};vjs.Component.prototype.contentEl_;vjs.Component.prototype.contentEl=function(){return this.contentEl_||this.el_};vjs.Component.prototype.id_;vjs.Component.prototype.id=function(){return this.id_};vjs.Component.prototype.name_;vjs.Component.prototype.name=function(){return this.name_};vjs.Component.prototype.children_;vjs.Component.prototype.children=function(){return this.children_};vjs.Component.prototype.childIndex_;vjs.Component.prototype.getChildById=function(a){return this.childIndex_[a]};vjs.Component.prototype.childNameIndex_;vjs.Component.prototype.getChild=function(a){return this.childNameIndex_[a]};vjs.Component.prototype.addChild=function(f,d){var c,e,a,b;if(typeof f==="string"){a=f;d=d||{};e=d.componentClass||vjs.capitalize(a);d.name=a;c=new window.videojs[e](this.player_||this,d)}else{c=f}this.children_.push(c);if(typeof c.id==="function"){this.childIndex_[c.id()]=c}a=a||(c.name&&c.name());if(a){this.childNameIndex_[a]=c}if(typeof c.el==="function"&&c.el()){this.contentEl().appendChild(c.el())}return c};vjs.Component.prototype.removeChild=function(b){if(typeof b==="string"){b=this.getChild(b)}if(!b||!this.children_){return}var a=false;for(var c=this.children_.length-1;c>=0;c--){if(this.children_[c]===b){a=true;this.children_.splice(c,1);break}}if(!a){return}this.childIndex_[b.id]=null;this.childNameIndex_[b.name]=null;var d=b.el();if(d&&d.parentNode===this.contentEl()){this.contentEl().removeChild(b.el())}};vjs.Component.prototype.initChildren=function(){var d,c,f,a,e;d=this;c=this.options()["children"];if(c){if(vjs.obj.isArray(c)){for(var b=0;b0){for(var b=0,a=c.length;b1){f=false}else{if(i){e=j.touches[0].pageX-i.pageX;c=j.touches[0].pageY-i.pageY;d=Math.sqrt(e*e+c*c);if(d>h){f=false}}}});a=function(){f=false};this.on("touchleave",a);this.on("touchcancel",a);this.on("touchend",function(j){i=null;if(f===true){g=new Date().getTime()-b;if(g<250){j.preventDefault();this.trigger("tap")}}})};vjs.Component.prototype.enableTouchActivity=function(){var a,c,b;a=vjs.bind(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){a();clearInterval(c);c=setInterval(a,250)});b=function(d){a();clearInterval(c)};this.on("touchmove",a);this.on("touchend",b);this.on("touchcancel",b)};vjs.Button=vjs.Component.extend({init:function(b,a){vjs.Component.call(this,b,a);this.emitTapEvents();this.on("tap",this.onClick);this.on("click",this.onClick);this.on("focus",this.onFocus);this.on("blur",this.onBlur)}});vjs.Button.prototype.createEl=function(c,b){var a;b=vjs.obj.merge({className:this.buildCSSClass(),role:"button","aria-live":"polite",tabIndex:0},b);a=vjs.Component.prototype.createEl.call(this,c,b);if(!b.innerHTML){this.contentEl_=vjs.createEl("div",{className:"vjs-control-content"});this.controlText_=vjs.createEl("span",{className:"vjs-control-text",innerHTML:this.localize(this.buttonText)||"Need Text"});this.contentEl_.appendChild(this.controlText_);a.appendChild(this.contentEl_)}return a};vjs.Button.prototype.buildCSSClass=function(){return"vjs-control "+vjs.Component.prototype.buildCSSClass.call(this)};vjs.Button.prototype.onClick=function(){};vjs.Button.prototype.onFocus=function(){vjs.on(document,"keyup",vjs.bind(this,this.onKeyPress))};vjs.Button.prototype.onKeyPress=function(a){if(a.which==32||a.which==13){a.preventDefault();this.onClick()}};vjs.Button.prototype.onBlur=function(){vjs.off(document,"keyup",vjs.bind(this,this.onKeyPress))};vjs.Slider=vjs.Component.extend({init:function(b,a){vjs.Component.call(this,b,a);this.bar=this.getChild(this.options_.barName);this.handle=this.getChild(this.options_.handleName);this.on("mousedown",this.onMouseDown);this.on("touchstart",this.onMouseDown);this.on("focus",this.onFocus);this.on("blur",this.onBlur);this.on("click",this.onClick);this.player_.on("controlsvisible",vjs.bind(this,this.update));b.on(this.playerEvent,vjs.bind(this,this.update));this.boundEvents={};this.boundEvents.move=vjs.bind(this,this.onMouseMove);this.boundEvents.end=vjs.bind(this,this.onMouseUp)}});vjs.Slider.prototype.createEl=function(b,a){a=a||{};a.className=a.className+" vjs-slider";a=vjs.obj.merge({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},a);return vjs.Component.prototype.createEl.call(this,b,a)};vjs.Slider.prototype.onMouseDown=function(a){a.preventDefault();vjs.blockTextSelection();this.addClass("vjs-sliding");vjs.on(document,"mousemove",this.boundEvents.move);vjs.on(document,"mouseup",this.boundEvents.end);vjs.on(document,"touchmove",this.boundEvents.move);vjs.on(document,"touchend",this.boundEvents.end);this.onMouseMove(a)};vjs.Slider.prototype.onMouseMove=function(){};vjs.Slider.prototype.onMouseUp=function(){vjs.unblockTextSelection();this.removeClass("vjs-sliding");vjs.off(document,"mousemove",this.boundEvents.move,false);vjs.off(document,"mouseup",this.boundEvents.end,false);vjs.off(document,"touchmove",this.boundEvents.move,false);vjs.off(document,"touchend",this.boundEvents.end,false);this.update()};vjs.Slider.prototype.update=function(){if(!this.el_){return}var b,a=this.getPercent(),f=this.handle,g=this.bar;if(isNaN(a)){a=0}b=a;if(f){var d=this.el_,e=d.offsetWidth,i=f.el().offsetWidth,j=(i)?i/e:0,c=1-j,h=a*c;b=h+(j/2);f.el().style.left=vjs.round(h*100,2)+"%"}if(g){g.el().style.width=vjs.round(b*100,2)+"%"}};vjs.Slider.prototype.calculateDistance=function(b){var d,g,l,k,a,i,h,f,e;d=this.el_;g=vjs.findPosition(d);a=i=d.offsetWidth;h=this.handle;if(this.options()["vertical"]){k=g.top;if(b.changedTouches){e=b.changedTouches[0].pageY}else{e=b.pageY}if(h){var j=h.el().offsetHeight;k=k+(j/2);i=i-j}return Math.max(0,Math.min(1,((k-e)+i)/i))}else{l=g.left;if(b.changedTouches){f=b.changedTouches[0].pageX}else{f=b.pageX}if(h){var c=h.el().offsetWidth;l=l+(c/2);a=a-c}return Math.max(0,Math.min(1,(f-l)/a))}};vjs.Slider.prototype.onFocus=function(){vjs.on(document,"keyup",vjs.bind(this,this.onKeyPress))};vjs.Slider.prototype.onKeyPress=function(a){if(a.which==37||a.which==40){a.preventDefault();this.stepBack()}else{if(a.which==38||a.which==39){a.preventDefault();this.stepForward()}}};vjs.Slider.prototype.onBlur=function(){vjs.off(document,"keyup",vjs.bind(this,this.onKeyPress))};vjs.Slider.prototype.onClick=function(a){a.stopImmediatePropagation();a.preventDefault()};vjs.SliderHandle=vjs.Component.extend();vjs.SliderHandle.prototype.defaultValue=0;vjs.SliderHandle.prototype.createEl=function(b,a){a=a||{};a.className=a.className+" vjs-slider-handle";a=vjs.obj.merge({innerHTML:''+this.defaultValue+""},a);return vjs.Component.prototype.createEl.call(this,"div",a)};vjs.Menu=vjs.Component.extend();vjs.Menu.prototype.addItem=function(a){this.addChild(a);a.on("click",vjs.bind(this,function(){this.unlockShowing()}))};vjs.Menu.prototype.createEl=function(){var b=this.options().contentElType||"ul";this.contentEl_=vjs.createEl(b,{className:"vjs-menu-content"});var a=vjs.Component.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});a.appendChild(this.contentEl_);vjs.on(a,"click",function(c){c.preventDefault();c.stopImmediatePropagation()});return a};vjs.MenuItem=vjs.Button.extend({init:function(b,a){vjs.Button.call(this,b,a);this.selected(a.selected)}});vjs.MenuItem.prototype.createEl=function(b,a){return vjs.Button.prototype.createEl.call(this,"li",vjs.obj.merge({className:"vjs-menu-item",innerHTML:this.options_.label},a))};vjs.MenuItem.prototype.onClick=function(){this.selected(true)};vjs.MenuItem.prototype.selected=function(a){if(a){this.addClass("vjs-selected");this.el_.setAttribute("aria-selected",true)}else{this.removeClass("vjs-selected");this.el_.setAttribute("aria-selected",false)}};vjs.MenuButton=vjs.Button.extend({init:function(b,a){vjs.Button.call(this,b,a);this.menu=this.createMenu();this.addChild(this.menu);if(this.items&&this.items.length===0){this.hide()}this.on("keyup",this.onKeyPress);this.el_.setAttribute("aria-haspopup",true);this.el_.setAttribute("role","button")}});vjs.MenuButton.prototype.buttonPressed_=false;vjs.MenuButton.prototype.createMenu=function(){var b=new vjs.Menu(this.player_);if(this.options().title){b.contentEl().appendChild(vjs.createEl("li",{className:"vjs-menu-title",innerHTML:vjs.capitalize(this.options().title),tabindex:-1}))}this.items=this["createItems"]();if(this.items){for(var a=0;a0){this.items[0].el().focus()}};vjs.MenuButton.prototype.unpressButton=function(){this.buttonPressed_=false;this.menu.unlockShowing();this.el_.setAttribute("aria-pressed",false)};vjs.MediaError=function(a){if(typeof a==="number"){this.code=a}else{if(typeof a==="string"){this.message=a}else{if(typeof a==="object"){vjs.obj.merge(this,a)}}}if(!this.message){this.message=vjs.MediaError.defaultMessages[this.code]||""}};vjs.MediaError.prototype.code=0;vjs.MediaError.prototype.message="";vjs.MediaError.prototype.status=null;vjs.MediaError.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];vjs.MediaError.defaultMessages={1:"You aborted the video playback",2:"A network error caused the video download to fail part-way.",3:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",4:"The video could not be loaded, either because the server or network failed or because the format is not supported.",5:"The video is encrypted and we do not have the keys to decrypt it."};for(var errNum=0;errNum0){c.startTime=this.cache_.currentTime}this.cache_.src=b.src}this.tech=new window.videojs[d](this,c);this.tech.ready(a)};vjs.Player.prototype.unloadTech=function(){this.isReady_=false;this.tech.dispose();this.tech=false};vjs.Player.prototype.onLoadStart=function(){this.error(null);if(!this.paused()){this.trigger("firstplay")}else{this.hasStarted(false);this.one("play",function(){this.hasStarted(true)})}};vjs.Player.prototype.hasStarted_=false;vjs.Player.prototype.hasStarted=function(a){if(a!==undefined){if(this.hasStarted_!==a){this.hasStarted_=a;if(a){this.addClass("vjs-has-started");this.trigger("firstplay")}else{this.removeClass("vjs-has-started")}}return this}return this.hasStarted_};vjs.Player.prototype.onLoadedMetaData;vjs.Player.prototype.onLoadedData;vjs.Player.prototype.onLoadedAllData;vjs.Player.prototype.onPlay=function(){this.removeClass("vjs-paused");this.addClass("vjs-playing")};vjs.Player.prototype.onWaiting=function(){this.addClass("vjs-waiting")};vjs.Player.prototype.onWaitEnd=function(){this.removeClass("vjs-waiting")};vjs.Player.prototype.onSeeking=function(){this.addClass("vjs-seeking")};vjs.Player.prototype.onSeeked=function(){this.removeClass("vjs-seeking")};vjs.Player.prototype.onFirstPlay=function(){if(this.options_.starttime){this.currentTime(this.options_.starttime)}this.addClass("vjs-has-started")};vjs.Player.prototype.onPause=function(){this.removeClass("vjs-playing");this.addClass("vjs-paused")};vjs.Player.prototype.onTimeUpdate;vjs.Player.prototype.onProgress=function(){if(this.bufferedPercent()==1){this.trigger("loadedalldata")}};vjs.Player.prototype.onEnded=function(){if(this.options_.loop){this.currentTime(0);this.play()}};vjs.Player.prototype.onDurationChange=function(){var a=this.techGet("duration");if(a){if(a<0){a=Infinity}this.duration(a);if(a===Infinity){this.addClass("vjs-live")}else{this.removeClass("vjs-live")}}};vjs.Player.prototype.onVolumeChange;vjs.Player.prototype.onFullscreenChange=function(){if(this.isFullscreen()){this.addClass("vjs-fullscreen")}else{this.removeClass("vjs-fullscreen")}};vjs.Player.prototype.cache_;vjs.Player.prototype.getCache=function(){return this.cache_};vjs.Player.prototype.techCall=function(c,a){if(this.tech&&!this.tech.isReady_){this.tech.ready(function(){this[c](a)})}else{try{this.tech[c](a)}catch(b){vjs.log(b);throw b}}};vjs.Player.prototype.techGet=function(b){if(this.tech&&this.tech.isReady_){try{return this.tech[b]()}catch(a){if(this.tech[b]===undefined){vjs.log("Video.js: "+b+" method not defined for "+this.techName+" playback technology.",a)}else{if(a.name=="TypeError"){vjs.log("Video.js: "+b+" unavailable on "+this.techName+" playback technology element.",a);this.tech.isReady_=false}else{vjs.log(a)}}throw a}}return};vjs.Player.prototype.play=function(){this.techCall("play");return this};vjs.Player.prototype.pause=function(){this.techCall("pause");return this};vjs.Player.prototype.paused=function(){return(this.techGet("paused")===false)?false:true};vjs.Player.prototype.currentTime=function(a){if(a!==undefined){this.techCall("setCurrentTime",a);return this}return this.cache_.currentTime=(this.techGet("currentTime")||0)};vjs.Player.prototype.duration=function(a){if(a!==undefined){this.cache_.duration=parseFloat(a);return this}if(this.cache_.duration===undefined){this.onDurationChange()}return this.cache_.duration||0};vjs.Player.prototype.remainingTime=function(){return this.duration()-this.currentTime()};vjs.Player.prototype.buffered=function(){var a=this.techGet("buffered");if(!a||!a.length){a=vjs.createTimeRange(0,0)}return a};vjs.Player.prototype.bufferedPercent=function(){var e=this.duration(),d=this.buffered(),a=0,f,b;if(!e){return 0}for(var c=0;ce){b=e}a+=b-f}return a/e};vjs.Player.prototype.bufferedEnd=function(){var b=this.buffered(),c=this.duration(),a=b.end(b.length-1);if(a>c){a=c}return a};vjs.Player.prototype.volume=function(a){var b;if(a!==undefined){b=Math.max(0,Math.min(1,parseFloat(a)));this.cache_.volume=b;this.techCall("setVolume",b);vjs.setLocalStorage("volume",b);return this}b=parseFloat(this.techGet("volume"));return(isNaN(b))?1:b};vjs.Player.prototype.muted=function(a){if(a!==undefined){this.techCall("setMuted",a);return this}return this.techGet("muted")||false};vjs.Player.prototype.supportsFullScreen=function(){return this.techGet("supportsFullScreen")||false};vjs.Player.prototype.isFullscreen_=false;vjs.Player.prototype.isFullscreen=function(a){if(a!==undefined){this.isFullscreen_=!!a;return this}return this.isFullscreen_};vjs.Player.prototype.isFullScreen=function(a){vjs.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")');return this.isFullscreen(a)};vjs.Player.prototype.requestFullscreen=function(){var a=vjs.browser.fullscreenAPI;this.isFullscreen(true);if(a){vjs.on(document,a.fullscreenchange,vjs.bind(this,function(b){this.isFullscreen(document[a.fullscreenElement]);if(this.isFullscreen()===false){vjs.off(document,a.fullscreenchange,arguments.callee)}this.trigger("fullscreenchange")}));this.el_[a.requestFullscreen]()}else{if(this.tech.supportsFullScreen()){this.techCall("enterFullScreen")}else{this.enterFullWindow();this.trigger("fullscreenchange")}}return this};vjs.Player.prototype.requestFullScreen=function(){vjs.log.warn('player.requestFullScreen() has been deprecated, use player.requestFullscreen() with a lowercase "s")');return this.requestFullscreen()};vjs.Player.prototype.exitFullscreen=function(){var a=vjs.browser.fullscreenAPI;this.isFullscreen(false);if(a){document[a.exitFullscreen]()}else{if(this.tech.supportsFullScreen()){this.techCall("exitFullScreen")}else{this.exitFullWindow();this.trigger("fullscreenchange")}}return this};vjs.Player.prototype.cancelFullScreen=function(){vjs.log.warn("player.cancelFullScreen() has been deprecated, use player.exitFullscreen()");return this.exitFullscreen()};vjs.Player.prototype.enterFullWindow=function(){this.isFullWindow=true;this.docOrigOverflow=document.documentElement.style.overflow;vjs.on(document,"keydown",vjs.bind(this,this.fullWindowOnEscKey));document.documentElement.style.overflow="hidden";vjs.addClass(document.body,"vjs-full-window");this.trigger("enterFullWindow")};vjs.Player.prototype.fullWindowOnEscKey=function(a){if(a.keyCode===27){if(this.isFullscreen()===true){this.exitFullscreen()}else{this.exitFullWindow()}}};vjs.Player.prototype.exitFullWindow=function(){this.isFullWindow=false;vjs.off(document,"keydown",this.fullWindowOnEscKey);document.documentElement.style.overflow=this.docOrigOverflow;vjs.removeClass(document.body,"vjs-full-window");this.trigger("exitFullWindow")};vjs.Player.prototype.selectSource=function(g){for(var h=0,f=this.options_.techOrder;h'+this.localize("Stream Type")+""+this.localize("LIVE"),"aria-live":"off"});a.appendChild(this.contentEl_);return a};vjs.PlayToggle=vjs.Button.extend({init:function(b,a){vjs.Button.call(this,b,a);b.on("play",vjs.bind(this,this.onPlay));b.on("pause",vjs.bind(this,this.onPause))}});vjs.PlayToggle.prototype.buttonText="Play";vjs.PlayToggle.prototype.buildCSSClass=function(){return"vjs-play-control "+vjs.Button.prototype.buildCSSClass.call(this)};vjs.PlayToggle.prototype.onClick=function(){if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};vjs.PlayToggle.prototype.onPlay=function(){vjs.removeClass(this.el_,"vjs-paused");vjs.addClass(this.el_,"vjs-playing");this.el_.children[0].children[0].innerHTML=this.localize("Pause")};vjs.PlayToggle.prototype.onPause=function(){vjs.removeClass(this.el_,"vjs-playing");vjs.addClass(this.el_,"vjs-paused");this.el_.children[0].children[0].innerHTML=this.localize("Play")};vjs.CurrentTimeDisplay=vjs.Component.extend({init:function(b,a){vjs.Component.call(this,b,a);b.on("timeupdate",vjs.bind(this,this.updateContent))}});vjs.CurrentTimeDisplay.prototype.createEl=function(){var a=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.contentEl_=vjs.createEl("div",{className:"vjs-current-time-display",innerHTML:'Current Time 0:00',"aria-live":"off"});a.appendChild(this.contentEl_);return a};vjs.CurrentTimeDisplay.prototype.updateContent=function(){var a=(this.player_.scrubbing)?this.player_.getCache().currentTime:this.player_.currentTime();this.contentEl_.innerHTML=''+this.localize("Current Time")+" "+vjs.formatTime(a,this.player_.duration())};vjs.DurationDisplay=vjs.Component.extend({init:function(b,a){vjs.Component.call(this,b,a);b.on("timeupdate",vjs.bind(this,this.updateContent))}});vjs.DurationDisplay.prototype.createEl=function(){var a=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.contentEl_=vjs.createEl("div",{className:"vjs-duration-display",innerHTML:''+this.localize("Duration Time")+" 0:00","aria-live":"off"});a.appendChild(this.contentEl_);return a};vjs.DurationDisplay.prototype.updateContent=function(){var a=this.player_.duration();if(a){this.contentEl_.innerHTML=''+this.localize("Duration Time")+" "+vjs.formatTime(a)}};vjs.TimeDivider=vjs.Component.extend({init:function(b,a){vjs.Component.call(this,b,a)}});vjs.TimeDivider.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-time-divider",innerHTML:"
/
"})};vjs.RemainingTimeDisplay=vjs.Component.extend({init:function(b,a){vjs.Component.call(this,b,a);b.on("timeupdate",vjs.bind(this,this.updateContent))}});vjs.RemainingTimeDisplay.prototype.createEl=function(){var a=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.contentEl_=vjs.createEl("div",{className:"vjs-remaining-time-display",innerHTML:''+this.localize("Remaining Time")+" -0:00","aria-live":"off"});a.appendChild(this.contentEl_);return a};vjs.RemainingTimeDisplay.prototype.updateContent=function(){if(this.player_.duration()){this.contentEl_.innerHTML=''+this.localize("Remaining Time")+" -"+vjs.formatTime(this.player_.remainingTime())}};vjs.FullscreenToggle=vjs.Button.extend({init:function(b,a){vjs.Button.call(this,b,a)}});vjs.FullscreenToggle.prototype.buttonText="Fullscreen";vjs.FullscreenToggle.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+vjs.Button.prototype.buildCSSClass.call(this)};vjs.FullscreenToggle.prototype.onClick=function(){if(!this.player_.isFullscreen()){this.player_.requestFullscreen();this.controlText_.innerHTML=this.localize("Non-Fullscreen")}else{this.player_.exitFullscreen();this.controlText_.innerHTML=this.localize("Fullscreen")}};vjs.ProgressControl=vjs.Component.extend({init:function(b,a){vjs.Component.call(this,b,a)}});vjs.ProgressControl.prototype.options_={children:{seekBar:{}}};vjs.ProgressControl.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})};vjs.SeekBar=vjs.Slider.extend({init:function(b,a){vjs.Slider.call(this,b,a);b.on("timeupdate",vjs.bind(this,this.updateARIAAttributes));b.ready(vjs.bind(this,this.updateARIAAttributes))}});vjs.SeekBar.prototype.options_={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};vjs.SeekBar.prototype.playerEvent="timeupdate";vjs.SeekBar.prototype.createEl=function(){return vjs.Slider.prototype.createEl.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})};vjs.SeekBar.prototype.updateARIAAttributes=function(){var a=(this.player_.scrubbing)?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("aria-valuenow",vjs.round(this.getPercent()*100,2));this.el_.setAttribute("aria-valuetext",vjs.formatTime(a,this.player_.duration()))};vjs.SeekBar.prototype.getPercent=function(){const a=this.player_.currentTime()/this.player_.duration();return a>=1?1:(a||0)};vjs.SeekBar.prototype.onMouseDown=function(a){vjs.Slider.prototype.onMouseDown.call(this,a);this.player_.scrubbing=true;this.videoWasPlaying=!this.player_.paused();this.player_.pause()};vjs.SeekBar.prototype.onMouseMove=function(b){var a=this.calculateDistance(b)*this.player_.duration();if(a==this.player_.duration()){a=a-0.1}this.player_.currentTime(a)};vjs.SeekBar.prototype.onMouseUp=function(a){vjs.Slider.prototype.onMouseUp.call(this,a);this.player_.scrubbing=false;if(this.videoWasPlaying){this.player_.play()}};vjs.SeekBar.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)};vjs.SeekBar.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)};vjs.LoadProgressBar=vjs.Component.extend({init:function(b,a){vjs.Component.call(this,b,a);b.on("progress",vjs.bind(this,this.update))}});vjs.LoadProgressBar.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+": 0%"})};vjs.LoadProgressBar.prototype.update=function(){var h,a,g,d,e=this.player_.buffered(),f=this.player_.duration(),j=this.player_.bufferedEnd(),c=this.el_.children,b=function(l,i){var k=(l/i)||0;return(k*100)+"%"};this.el_.style.width=b(j,f);for(h=0;he.length;h--){this.el_.removeChild(c[h-1])}};vjs.PlayProgressBar=vjs.Component.extend({init:function(b,a){vjs.Component.call(this,b,a)}});vjs.PlayProgressBar.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-play-progress",innerHTML:''+this.localize("Progress")+": 0%"})};vjs.SeekHandle=vjs.SliderHandle.extend({init:function(b,a){vjs.SliderHandle.call(this,b,a);b.on("timeupdate",vjs.bind(this,this.updateContent))}});vjs.SeekHandle.prototype.defaultValue="00:00";vjs.SeekHandle.prototype.createEl=function(){return vjs.SliderHandle.prototype.createEl.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})};vjs.SeekHandle.prototype.updateContent=function(){var a=(this.player_.scrubbing)?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.innerHTML=''+vjs.formatTime(a,this.player_.duration())+""};vjs.VolumeControl=vjs.Component.extend({init:function(b,a){vjs.Component.call(this,b,a);if(b.tech&&b.tech.features&&b.tech.features.volumeControl===false){this.addClass("vjs-hidden")}b.on("loadstart",vjs.bind(this,function(){if(b.tech.features&&b.tech.features.volumeControl===false){this.addClass("vjs-hidden")}else{this.removeClass("vjs-hidden")}}))}});vjs.VolumeControl.prototype.options_={children:{volumeBar:{}}};vjs.VolumeControl.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})};vjs.VolumeBar=vjs.Slider.extend({init:function(b,a){vjs.Slider.call(this,b,a);b.on("volumechange",vjs.bind(this,this.updateARIAAttributes));b.ready(vjs.bind(this,this.updateARIAAttributes))}});vjs.VolumeBar.prototype.updateARIAAttributes=function(){this.el_.setAttribute("aria-valuenow",vjs.round(this.player_.volume()*100,2));this.el_.setAttribute("aria-valuetext",vjs.round(this.player_.volume()*100,2)+"%")};vjs.VolumeBar.prototype.options_={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};vjs.VolumeBar.prototype.playerEvent="volumechange";vjs.VolumeBar.prototype.createEl=function(){return vjs.Slider.prototype.createEl.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};vjs.VolumeBar.prototype.onMouseMove=function(a){if(this.player_.muted()){this.player_.muted(false)}this.player_.volume(this.calculateDistance(a))};vjs.VolumeBar.prototype.getPercent=function(){if(this.player_.muted()){return 0}else{return this.player_.volume()}};vjs.VolumeBar.prototype.stepForward=function(){this.player_.volume(this.player_.volume()+0.1)};vjs.VolumeBar.prototype.stepBack=function(){this.player_.volume(this.player_.volume()-0.1)};vjs.VolumeLevel=vjs.Component.extend({init:function(b,a){vjs.Component.call(this,b,a)}});vjs.VolumeLevel.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})};vjs.VolumeHandle=vjs.SliderHandle.extend();vjs.VolumeHandle.prototype.defaultValue="00:00";vjs.VolumeHandle.prototype.createEl=function(){return vjs.SliderHandle.prototype.createEl.call(this,"div",{className:"vjs-volume-handle"})};vjs.MuteToggle=vjs.Button.extend({init:function(b,a){vjs.Button.call(this,b,a);b.on("volumechange",vjs.bind(this,this.update));if(b.tech&&b.tech.features&&b.tech.features.volumeControl===false){this.addClass("vjs-hidden")}b.on("loadstart",vjs.bind(this,function(){if(b.tech.features&&b.tech.features.volumeControl===false){this.addClass("vjs-hidden")}else{this.removeClass("vjs-hidden")}}))}});vjs.MuteToggle.prototype.createEl=function(){return vjs.Button.prototype.createEl.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'
'+this.localize("Mute")+"
"})};vjs.MuteToggle.prototype.onClick=function(){this.player_.muted(this.player_.muted()?false:true)};vjs.MuteToggle.prototype.update=function(){var b=this.player_.volume(),c=3;if(b===0||this.player_.muted()){c=0}else{if(b<0.33){c=1}else{if(b<0.67){c=2}}}if(this.player_.muted()){if(this.el_.children[0].children[0].innerHTML!=this.localize("Unmute")){this.el_.children[0].children[0].innerHTML=this.localize("Unmute")}}else{if(this.el_.children[0].children[0].innerHTML!=this.localize("Mute")){this.el_.children[0].children[0].innerHTML=this.localize("Mute")}}for(var a=0;a<4;a++){vjs.removeClass(this.el_,"vjs-vol-"+a)}vjs.addClass(this.el_,"vjs-vol-"+c)};vjs.VolumeMenuButton=vjs.MenuButton.extend({init:function(b,a){vjs.MenuButton.call(this,b,a);b.on("volumechange",vjs.bind(this,this.update));if(b.tech&&b.tech.features&&b.tech.features.volumeControl===false){this.addClass("vjs-hidden")}b.on("loadstart",vjs.bind(this,function(){if(b.tech.features&&b.tech.features.volumeControl===false){this.addClass("vjs-hidden")}else{this.removeClass("vjs-hidden")}}));this.addClass("vjs-menu-button")}});vjs.VolumeMenuButton.prototype.createMenu=function(){var b=new vjs.Menu(this.player_,{contentElType:"div"});var a=new vjs.VolumeBar(this.player_,vjs.obj.merge({vertical:true},this.options_.volumeBar));b.addChild(a);return b};vjs.VolumeMenuButton.prototype.onClick=function(){vjs.MuteToggle.prototype.onClick.call(this);vjs.MenuButton.prototype.onClick.call(this)};vjs.VolumeMenuButton.prototype.createEl=function(){return vjs.Button.prototype.createEl.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'
'+this.localize("Mute")+"
"})};vjs.VolumeMenuButton.prototype.update=vjs.MuteToggle.prototype.update;vjs.PlaybackRateMenuButton=vjs.MenuButton.extend({init:function(b,a){vjs.MenuButton.call(this,b,a);this.updateVisibility();this.updateLabel();b.on("loadstart",vjs.bind(this,this.updateVisibility));b.on("ratechange",vjs.bind(this,this.updateLabel))}});vjs.PlaybackRateMenuButton.prototype.createEl=function(){var a=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-playback-rate vjs-menu-button vjs-control",innerHTML:'
'+this.localize("Playback Rate")+"
"});this.labelEl_=vjs.createEl("div",{className:"vjs-playback-rate-value",innerHTML:1});a.appendChild(this.labelEl_);return a};vjs.PlaybackRateMenuButton.prototype.createMenu=function(){var c=new vjs.Menu(this.player());var b=this.player().options()["playbackRates"];if(b){for(var a=b.length-1;a>=0;a--){c.addChild(new vjs.PlaybackRateMenuItem(this.player(),{rate:b[a]+"x"}))}}return c};vjs.PlaybackRateMenuButton.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())};vjs.PlaybackRateMenuButton.prototype.onClick=function(){var b=this.player().playbackRate();var d=this.player().options()["playbackRates"];var a=d[0];for(var c=0;cb){a=d[c];break}}this.player().playbackRate(a)};vjs.PlaybackRateMenuButton.prototype.playbackRateSupported=function(){return this.player().tech&&this.player().tech.features.playbackRate&&this.player().options()["playbackRates"]&&this.player().options()["playbackRates"].length>0};vjs.PlaybackRateMenuButton.prototype.updateVisibility=function(){if(this.playbackRateSupported()){this.removeClass("vjs-hidden")}else{this.addClass("vjs-hidden")}};vjs.PlaybackRateMenuButton.prototype.updateLabel=function(){if(this.playbackRateSupported()){this.labelEl_.innerHTML=this.player().playbackRate()+"x"}};vjs.PlaybackRateMenuItem=vjs.MenuItem.extend({contentElType:"button",init:function(c,b){var a=this.label=b.rate;var d=this.rate=parseFloat(a,10);b.label=a;b.selected=d===1;vjs.MenuItem.call(this,c,b);this.player().on("ratechange",vjs.bind(this,this.update))}});vjs.PlaybackRateMenuItem.prototype.onClick=function(){vjs.MenuItem.prototype.onClick.call(this);this.player().playbackRate(this.rate)};vjs.PlaybackRateMenuItem.prototype.update=function(){this.selected(this.player().playbackRate()==this.rate)};vjs.PosterImage=vjs.Button.extend({init:function(b,a){vjs.Button.call(this,b,a);if(b.poster()){this.src(b.poster())}if(!b.poster()||!b.controls()){this.hide()}b.on("posterchange",vjs.bind(this,function(){this.src(b.poster())}));b.on("play",vjs.bind(this,this.hide))}});var _backgroundSizeSupported="backgroundSize" in vjs.TEST_VID.style;vjs.PosterImage.prototype.createEl=function(){var a=vjs.createEl("div",{className:"vjs-poster",tabIndex:-1});if(!_backgroundSizeSupported){a.appendChild(vjs.createEl("img"))}return a};vjs.PosterImage.prototype.src=function(a){var b=this.el();if(a===undefined){return}if(_backgroundSizeSupported){b.style.backgroundImage='url("'+a+'")'}else{b.firstChild.src=a}};vjs.PosterImage.prototype.onClick=function(){if(this.player().controls()){this.player_.play()}};vjs.LoadingSpinner=vjs.Component.extend({init:function(b,a){vjs.Component.call(this,b,a)}});vjs.LoadingSpinner.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner"})};vjs.BigPlayButton=vjs.Button.extend();vjs.BigPlayButton.prototype.createEl=function(){return vjs.Button.prototype.createEl.call(this,"div",{className:"vjs-big-play-button",innerHTML:'',"aria-label":"play video"})};vjs.BigPlayButton.prototype.onClick=function(){this.player_.play()};vjs.ErrorDisplay=vjs.Component.extend({init:function(b,a){vjs.Component.call(this,b,a);this.update();b.on("error",vjs.bind(this,this.update))}});vjs.ErrorDisplay.prototype.createEl=function(){var a=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-error-display"});this.contentEl_=vjs.createEl("div");a.appendChild(this.contentEl_);return a};vjs.ErrorDisplay.prototype.update=function(){if(this.player().error()){this.contentEl_.innerHTML=this.localize(this.player().error().message)}};vjs.MediaTechController=vjs.Component.extend({init:function(b,a,c){a=a||{};a.reportTouchActivity=false;vjs.Component.call(this,b,a,c);if(!this.features.progressEvents){this.manualProgressOn()}if(!this.features.timeupdateEvents){this.manualTimeUpdatesOn()}this.initControlsListeners()}});vjs.MediaTechController.prototype.initControlsListeners=function(){var c,b,a,d;b=this;c=this.player();var a=function(){if(c.controls()&&!c.usingNativeControls()){b.addControlsListeners()}};d=vjs.bind(b,b.removeControlsListeners);this.ready(a);c.on("controlsenabled",a);c.on("controlsdisabled",d);this.ready(function(){if(this.networkState&&this.networkState()>0){this.player().trigger("loadstart")}})};vjs.MediaTechController.prototype.addControlsListeners=function(){var a;this.on("mousedown",this.onClick);this.on("touchstart",function(b){a=this.player_.userActive()});this.on("touchmove",function(b){if(a){this.player().reportUserActivity()}});this.on("touchend",function(b){b.preventDefault()});this.emitTapEvents();this.on("tap",this.onTap)};vjs.MediaTechController.prototype.removeControlsListeners=function(){this.off("tap");this.off("touchstart");this.off("touchmove");this.off("touchleave");this.off("touchcancel");this.off("touchend");this.off("click");this.off("mousedown")};vjs.MediaTechController.prototype.onClick=function(a){if(a.button!==0){return}if(this.player().controls()){if(this.player().paused()){this.player().play()}else{this.player().pause()}}};vjs.MediaTechController.prototype.onTap=function(){this.player().userActive(!this.player().userActive())};vjs.MediaTechController.prototype.manualProgressOn=function(){this.manualProgress=true;this.trackProgress()};vjs.MediaTechController.prototype.manualProgressOff=function(){this.manualProgress=false;this.stopTrackingProgress()};vjs.MediaTechController.prototype.trackProgress=function(){this.progressInterval=setInterval(vjs.bind(this,function(){var a=this.player().bufferedPercent();if(this.bufferedPercent_!=a){this.player().trigger("progress")}this.bufferedPercent_=a;if(a===1){this.stopTrackingProgress()}}),500)};vjs.MediaTechController.prototype.stopTrackingProgress=function(){clearInterval(this.progressInterval)}; /*! Time Tracking -------------------------------------------------------------- */ ;vjs.MediaTechController.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=true;this.player().on("play",vjs.bind(this,this.trackCurrentTime));this.player().on("pause",vjs.bind(this,this.stopTrackingCurrentTime));this.one("timeupdate",function(){this.features.timeupdateEvents=true;this.manualTimeUpdatesOff()})};vjs.MediaTechController.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=false;this.stopTrackingCurrentTime();this.off("play",this.trackCurrentTime);this.off("pause",this.stopTrackingCurrentTime)};vjs.MediaTechController.prototype.trackCurrentTime=function(){if(this.currentTimeInterval){this.stopTrackingCurrentTime()}this.currentTimeInterval=setInterval(vjs.bind(this,function(){this.player().trigger("timeupdate")}),250)};vjs.MediaTechController.prototype.stopTrackingCurrentTime=function(){clearInterval(this.currentTimeInterval);this.player().trigger("timeupdate")};vjs.MediaTechController.prototype.dispose=function(){if(this.manualProgress){this.manualProgressOff()}if(this.manualTimeUpdates){this.manualTimeUpdatesOff()}vjs.Component.prototype.dispose.call(this)};vjs.MediaTechController.prototype.setCurrentTime=function(){if(this.manualTimeUpdates){this.player().trigger("timeupdate")}};vjs.MediaTechController.prototype.setPoster=function(){};vjs.MediaTechController.prototype.features={volumeControl:true,fullscreenResize:false,playbackRate:false,progressEvents:false,timeupdateEvents:false};vjs.media={};vjs.Html5=vjs.MediaTechController.extend({init:function(b,a,c){this.features.volumeControl=vjs.Html5.canControlVolume();this.features.playbackRate=vjs.Html5.canControlPlaybackRate();this.features.movingMediaElementInDOM=!vjs.IS_IOS;this.features.fullscreenResize=true;this.features.progressEvents=true;vjs.MediaTechController.call(this,b,a,c);this.setupTriggers();var d=a.source;if(d&&this.el_.currentSrc!==d.src){this.el_.src=d.src}if(vjs.TOUCH_ENABLED&&b.options()["nativeControlsForTouch"]!==false){this.useNativeControls()}b.ready(function(){if(this.tag&&this.options_.autoplay&&this.paused()){delete this.tag.poster;this.play()}});this.triggerReady()}});vjs.Html5.prototype.dispose=function(){vjs.Html5.disposeMediaElement(this.el_);vjs.MediaTechController.prototype.dispose.call(this)};vjs.Html5.prototype.createEl=function(){var c=this.player_,d=c.tag,g,h;if(!d||this.features.movingMediaElementInDOM===false){if(d){h=d.cloneNode(false);vjs.Html5.disposeMediaElement(d);d=h;c.tag=null}else{d=vjs.createEl("video");vjs.setElementAttributes(d,vjs.obj.merge(c.tagAttributes||{},{id:c.id()+"_html5_api","class":"vjs-tech"}))}d.player=c;vjs.insertFirst(d,c.el())}var f=["autoplay","preload","loop","muted"];for(var b=f.length-1;b>=0;b--){var a=f[b];var e={};if(typeof c.options_[a]!=="undefined"){e[a]=c.options_[a]}vjs.setElementAttributes(d,e)}return d};vjs.Html5.prototype.setupTriggers=function(){for(var a=vjs.Html5.Events.length-1;a>=0;a--){vjs.on(this.el_,vjs.Html5.Events[a],vjs.bind(this,this.eventHandler))}};vjs.Html5.prototype.eventHandler=function(a){if(a.type=="error"){this.player().error(this.error().code)}else{a.bubbles=false;this.player().trigger(a)}};vjs.Html5.prototype.useNativeControls=function(){var a,b,e,d,c;a=this;b=this.player();a.setControls(b.controls());e=function(){a.setControls(true)};d=function(){a.setControls(false)};b.on("controlsenabled",e);b.on("controlsdisabled",d);c=function(){b.off("controlsenabled",e);b.off("controlsdisabled",d)};a.on("dispose",c);b.on("usingcustomcontrols",c);b.usingNativeControls(true)};vjs.Html5.prototype.play=function(){this.el_.play()};vjs.Html5.prototype.pause=function(){this.el_.pause()};vjs.Html5.prototype.paused=function(){return this.el_.paused};vjs.Html5.prototype.currentTime=function(){return this.el_.currentTime};vjs.Html5.prototype.setCurrentTime=function(b){try{this.el_.currentTime=b}catch(a){vjs.log(a,"Video is not ready. (Video.js)")}};vjs.Html5.prototype.duration=function(){return this.el_.duration||0};vjs.Html5.prototype.buffered=function(){return this.el_.buffered};vjs.Html5.prototype.volume=function(){return this.el_.volume};vjs.Html5.prototype.setVolume=function(a){this.el_.volume=a};vjs.Html5.prototype.muted=function(){return this.el_.muted};vjs.Html5.prototype.setMuted=function(a){this.el_.muted=a};vjs.Html5.prototype.width=function(){return this.el_.offsetWidth};vjs.Html5.prototype.height=function(){return this.el_.offsetHeight};vjs.Html5.prototype.supportsFullScreen=function(){if(typeof this.el_.webkitEnterFullScreen=="function"){if(/Android/.test(vjs.USER_AGENT)||!/Chrome|Mac OS X 10.5/.test(vjs.USER_AGENT)){return true}}return false};vjs.Html5.prototype.enterFullScreen=function(){var a=this.el_;if(a.paused&&a.networkState<=a.HAVE_METADATA){this.el_.play();setTimeout(function(){a.pause();a.webkitEnterFullScreen()},0)}else{a.webkitEnterFullScreen()}};vjs.Html5.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()};vjs.Html5.prototype.src=function(a){this.el_.src=a};vjs.Html5.prototype.load=function(){this.el_.load()};vjs.Html5.prototype.currentSrc=function(){return this.el_.currentSrc};vjs.Html5.prototype.poster=function(){return this.el_.poster};vjs.Html5.prototype.setPoster=function(a){this.el_.poster=a};vjs.Html5.prototype.preload=function(){return this.el_.preload};vjs.Html5.prototype.setPreload=function(a){this.el_.preload=a};vjs.Html5.prototype.autoplay=function(){return this.el_.autoplay};vjs.Html5.prototype.setAutoplay=function(a){this.el_.autoplay=a};vjs.Html5.prototype.controls=function(){return this.el_.controls};vjs.Html5.prototype.setControls=function(a){this.el_.controls=!!a};vjs.Html5.prototype.loop=function(){return this.el_.loop};vjs.Html5.prototype.setLoop=function(a){this.el_.loop=a};vjs.Html5.prototype.error=function(){return this.el_.error};vjs.Html5.prototype.seeking=function(){return this.el_.seeking};vjs.Html5.prototype.ended=function(){return this.el_.ended};vjs.Html5.prototype.defaultMuted=function(){return this.el_.defaultMuted};vjs.Html5.prototype.playbackRate=function(){return this.el_.playbackRate};vjs.Html5.prototype.setPlaybackRate=function(a){this.el_.playbackRate=a};vjs.Html5.prototype.networkState=function(){return this.el_.networkState};vjs.Html5.isSupported=function(){try{vjs.TEST_VID.volume=0.5}catch(a){return false}return !!vjs.TEST_VID.canPlayType};vjs.Html5.canPlaySource=function(a){try{return !!vjs.TEST_VID.canPlayType(a.type)}catch(b){return""}};vjs.Html5.canControlVolume=function(){var a=vjs.TEST_VID.volume;vjs.TEST_VID.volume=(a/2)+0.1;return a!==vjs.TEST_VID.volume};vjs.Html5.canControlPlaybackRate=function(){var a=vjs.TEST_VID.playbackRate;vjs.TEST_VID.playbackRate=(a/2)+0.1;return a!==vjs.TEST_VID.playbackRate};(function(){var c,a=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,b=/^video\/mp4/i;vjs.Html5.patchCanPlayType=function(){if(vjs.ANDROID_VERSION>=4){if(!c){c=vjs.TEST_VID.constructor.prototype.canPlayType}vjs.TEST_VID.constructor.prototype.canPlayType=function(d){if(d&&a.test(d)){return"maybe"}return c.call(this,d)}}if(vjs.IS_OLD_ANDROID){if(!c){c=vjs.TEST_VID.constructor.prototype.canPlayType}vjs.TEST_VID.constructor.prototype.canPlayType=function(d){if(d&&b.test(d)){return"maybe"}return c.call(this,d)}}};vjs.Html5.unpatchCanPlayType=function(){var d=vjs.TEST_VID.constructor.prototype.canPlayType;vjs.TEST_VID.constructor.prototype.canPlayType=c;c=null;return d};vjs.Html5.patchCanPlayType()})();vjs.Html5.Events="loadstart,suspend,abort,error,emptied,stalled,loadedmetadata,loadeddata,canplay,canplaythrough,playing,waiting,seeking,seeked,ended,durationchange,timeupdate,progress,play,pause,ratechange,volumechange".split(",");vjs.Html5.disposeMediaElement=function(a){if(!a){return}a.player=null;if(a.parentNode){a.parentNode.removeChild(a)}while(a.hasChildNodes()){a.removeChild(a.firstChild)}a.removeAttribute("src");if(typeof a.load==="function"){(function(){try{a.load()}catch(b){}})()}};vjs.Flash=vjs.MediaTechController.extend({init:function(k,l,i){vjs.MediaTechController.call(this,k,l,i);var a=l.source,g=l.parentEl,j=this.el_=vjs.createEl("div",{id:k.id()+"_temp_flash"}),b=k.id()+"_flash_api",c=k.options_,h=vjs.obj.merge({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:c.autoplay,preload:c.preload,loop:c.loop,muted:c.muted},l.flashVars),d=vjs.obj.merge({wmode:"opaque",bgcolor:"#000000"},l.params),f=vjs.obj.merge({id:b,name:b,"class":"vjs-tech"},l.attributes);if(a){if(a.type&&vjs.Flash.isStreamingType(a.type)){var e=vjs.Flash.streamToParts(a.src);h.rtmpConnection=encodeURIComponent(e.connection);h.rtmpStream=encodeURIComponent(e.stream)}else{h.src=encodeURIComponent(vjs.getAbsoluteURL(a.src))}}vjs.insertFirst(j,g);if(l.startTime){this.ready(function(){this.load();this.play();this["currentTime"](l.startTime)})}if(vjs.IS_FIREFOX){this.ready(function(){vjs.on(this.el(),"mousemove",vjs.bind(this,function(){this.player().trigger({type:"mousemove",bubbles:false})}))})}k.on("stageclick",k.reportUserActivity);this.el_=vjs.Flash.embed(l.swf,j,h,d,f)}});vjs.Flash.prototype.dispose=function(){vjs.MediaTechController.prototype.dispose.call(this)};vjs.Flash.prototype.play=function(){this.el_.vjs_play()};vjs.Flash.prototype.pause=function(){this.el_.vjs_pause()};vjs.Flash.prototype.src=function(b){if(b===undefined){return this["currentSrc"]()}if(vjs.Flash.isStreamingSrc(b)){b=vjs.Flash.streamToParts(b);this.setRtmpConnection(b.connection);this.setRtmpStream(b.stream)}else{b=vjs.getAbsoluteURL(b);this.el_.vjs_src(b)}if(this.player_.autoplay()){var a=this;setTimeout(function(){a.play()},0)}};vjs.Flash.prototype.setCurrentTime=function(a){this.lastSeekTarget_=a;this.el_.vjs_setProperty("currentTime",a);vjs.MediaTechController.prototype.setCurrentTime.call(this)};vjs.Flash.prototype.currentTime=function(a){if(this.seeking()){return this.lastSeekTarget_||0}return this.el_.vjs_getProperty("currentTime")};vjs.Flash.prototype.currentSrc=function(){var c=this.el_.vjs_getProperty("currentSrc");if(c==null){var a=this["rtmpConnection"](),b=this["rtmpStream"]();if(a&&b){c=vjs.Flash.streamFromParts(a,b)}}return c};vjs.Flash.prototype.load=function(){this.el_.vjs_load()};vjs.Flash.prototype.poster=function(){this.el_.vjs_getProperty("poster")};vjs.Flash.prototype.setPoster=function(){};vjs.Flash.prototype.buffered=function(){return vjs.createTimeRange(0,this.el_.vjs_getProperty("buffered"))};vjs.Flash.prototype.supportsFullScreen=function(){return false};vjs.Flash.prototype.enterFullScreen=function(){return false};(function(){var c=vjs.Flash.prototype,b="rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted".split(","),f="error,networkState,readyState,seeking,initialTime,duration,startOffsetTime,paused,played,seekable,ended,videoTracks,audioTracks,videoWidth,videoHeight,textTracks".split(","),a;function d(g){var h=g.charAt(0).toUpperCase()+g.slice(1);c["set"+h]=function(i){return this.el_.vjs_setProperty(g,i)}}function e(g){c[g]=function(){return this.el_.vjs_getProperty(g)}}for(a=0;a=10};vjs.Flash.canPlaySource=function(a){var b;if(!a.type){return""}b=a.type.replace(/;.*/,"").toLowerCase();if(b in vjs.Flash.formats||b in vjs.Flash.streamingFormats){return"maybe"}};vjs.Flash.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};vjs.Flash.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"};vjs.Flash.onReady=function(a){var c,b;c=vjs.el(a);b=c&&c.parentNode&&c.parentNode.player;if(b){c.player=b;vjs.Flash.checkReady(b.tech)}};vjs.Flash.checkReady=function(a){if(!a.el()){return}if(a.el().vjs_getProperty){a.triggerReady()}else{setTimeout(function(){vjs.Flash.checkReady(a)},50)}};vjs.Flash.onEvent=function(b,a){var c=vjs.el(b)["player"];c.trigger(a)};vjs.Flash.onError=function(a,c){var b=vjs.el(a)["player"];var d="FLASH: "+c;if(c=="srcnotfound"){b.error({code:4,message:d})}else{b.error(d)}};vjs.Flash.version=function(){var a="0,0,0";try{a=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(c){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){a=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}}catch(b){}}return a.split(",")};vjs.Flash.embed=function(b,i,g,c,e){var a=vjs.Flash.getEmbedCode(b,g,c,e),f=vjs.createEl("div",{innerHTML:a}).childNodes[0],h=i.parentNode;i.parentNode.replaceChild(f,i);var d=h.childNodes[0];setTimeout(function(){d.style.display="block"},1000);return f};vjs.Flash.getEmbedCode=function(e,h,g,b){var c=''});b=vjs.obj.merge({data:e,width:"100%",height:"100%"},b);vjs.obj.each(b,function(i,j){d+=(i+'="'+j+'" ')});return c+d+">"+f+""};vjs.Flash.streamFromParts=function(a,b){return a+"&"+b};vjs.Flash.streamToParts=function(d){var c={connection:"",stream:""};if(!d){return c}var b=d.indexOf("&");var a;if(b!==-1){a=b+1}else{b=a=d.lastIndexOf("/")+1;if(b===0){b=a=d.length}}c.connection=d.substring(0,b);c.stream=d.substring(a,d.length);return c};vjs.Flash.isStreamingType=function(a){return a in vjs.Flash.streamingFormats};vjs.Flash.RTMP_RE=/^rtmp[set]?:\/\//i;vjs.Flash.isStreamingSrc=function(a){return vjs.Flash.RTMP_RE.test(a)};vjs.MediaLoader=vjs.Component.extend({init:function(e,c,f){vjs.Component.call(this,e,c,f);if(!e.options_.sources||e.options_.sources.length===0){for(var d=0,b=e.options_.techOrder;d0){a.disable()}}}e=(g)?g.kind():((f)?f:false);if(e){this.trigger(e+"trackchange")}return this};vjs.TextTrack=vjs.Component.extend({init:function(b,a){vjs.Component.call(this,b,a);this.id_=a.id||("vjs_"+a.kind+"_"+a.language+"_"+vjs.guid++);this.src_=a.src;this.dflt_=a["default"]||a.dflt;this.title_=a.title;this.language_=a.srclang;this.label_=a.label;this.cues_=[];this.activeCues_=[];this.readyState_=0;this.mode_=0;this.player_.on("fullscreenchange",vjs.bind(this,this.adjustFontSize))}});vjs.TextTrack.prototype.kind_;vjs.TextTrack.prototype.kind=function(){return this.kind_};vjs.TextTrack.prototype.src_;vjs.TextTrack.prototype.src=function(){return this.src_};vjs.TextTrack.prototype.dflt_;vjs.TextTrack.prototype.dflt=function(){return this.dflt_};vjs.TextTrack.prototype.title_;vjs.TextTrack.prototype.title=function(){return this.title_};vjs.TextTrack.prototype.language_;vjs.TextTrack.prototype.language=function(){return this.language_};vjs.TextTrack.prototype.label_;vjs.TextTrack.prototype.label=function(){return this.label_};vjs.TextTrack.prototype.cues_;vjs.TextTrack.prototype.cues=function(){return this.cues_};vjs.TextTrack.prototype.activeCues_;vjs.TextTrack.prototype.activeCues=function(){return this.activeCues_};vjs.TextTrack.prototype.readyState_;vjs.TextTrack.prototype.readyState=function(){return this.readyState_};vjs.TextTrack.prototype.mode_;vjs.TextTrack.prototype.mode=function(){return this.mode_};vjs.TextTrack.prototype.adjustFontSize=function(){if(this.player_.isFullScreen()){this.el_.style.fontSize=screen.width/this.player_.width()*1.4*100+"%"}else{this.el_.style.fontSize=""}};vjs.TextTrack.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-"+this.kind_+" vjs-text-track"})};vjs.TextTrack.prototype.show=function(){this.activate();this.mode_=2;vjs.Component.prototype.show.call(this)};vjs.TextTrack.prototype.hide=function(){this.activate();this.mode_=1;vjs.Component.prototype.hide.call(this)};vjs.TextTrack.prototype.disable=function(){if(this.mode_==2){this.hide()}this.deactivate();this.mode_=0};vjs.TextTrack.prototype.activate=function(){if(this.readyState_===0){this.load()}if(this.mode_===0){this.player_.on("timeupdate",vjs.bind(this,this.update,this.id_));this.player_.on("ended",vjs.bind(this,this.reset,this.id_));if(this.kind_==="captions"||this.kind_==="subtitles"){this.player_.getChild("textTrackDisplay").addChild(this)}}};vjs.TextTrack.prototype.deactivate=function(){this.player_.off("timeupdate",vjs.bind(this,this.update,this.id_));this.player_.off("ended",vjs.bind(this,this.reset,this.id_));this.reset();this.player_.getChild("textTrackDisplay").removeChild(this)};vjs.TextTrack.prototype.load=function(){if(this.readyState_===0){this.readyState_=1;vjs.get(this.src_,vjs.bind(this,this.parseCues),vjs.bind(this,this.onError))}};vjs.TextTrack.prototype.onError=function(a){this.error=a;this.readyState_=3;this.trigger("error")};vjs.TextTrack.prototype.parseCues=function(b){var f,c,g,h=b.split("\n"),k="",a;for(var e=1,d=h.length;e")==-1){a=k;k=vjs.trim(h[++e])}else{a=this.cues_.length}f={id:a,index:this.cues_.length};c=k.split(/[\t ]+/);f.startTime=this.parseCueTime(c[0]);f.endTime=this.parseCueTime(c[2]);g=[];while(h[++e]&&(k=vjs.trim(h[e]))){g.push(k)}f.text=g.join("
");this.cues_.push(f)}}this.readyState_=2;this.trigger("loaded")};vjs.TextTrack.prototype.parseCueTime=function(b){var g=b.split(":"),f=0,c,e,a,h,d;if(g.length==3){c=g[0];e=g[1];a=g[2]}else{c=0;e=g[0];a=g[1]}a=a.split(/\s+/);h=a.splice(0,1)[0];h=h.split(/\.|,/);d=parseFloat(h[1]);h=h[0];f+=parseFloat(c)*3600;f+=parseFloat(e)*60;f+=parseFloat(h);if(d){f+=d/1000}return f};vjs.TextTrack.prototype.update=function(){if(this.cues_.length>0){var c=this.player_.options()["trackTimeOffset"]||0;var b=this.player_.currentTime()+c;if(this.prevChange===undefined||b=this.nextChange||this.nextChange===undefined){d=(this.firstActiveIndex!==undefined)?this.firstActiveIndex:0}else{h=true;d=(this.lastActiveIndex!==undefined)?this.lastActiveIndex:g.length-1}while(true){e=g[d];if(e.endTime<=b){k=Math.max(k,e.endTime);if(e.active){e.active=false}}else{if(b'+b[c].text+""}this.el_.innerHTML=d};vjs.TextTrack.prototype.reset=function(){this.nextChange=0;this.prevChange=this.player_.duration();this.firstActiveIndex=0;this.lastActiveIndex=0};vjs.CaptionsTrack=vjs.TextTrack.extend();vjs.CaptionsTrack.prototype.kind_="captions";vjs.SubtitlesTrack=vjs.TextTrack.extend();vjs.SubtitlesTrack.prototype.kind_="subtitles";vjs.ChaptersTrack=vjs.TextTrack.extend();vjs.ChaptersTrack.prototype.kind_="chapters";vjs.TextTrackDisplay=vjs.Component.extend({init:function(b,a,c){vjs.Component.call(this,b,a,c);if(b.options_.tracks&&b.options_.tracks.length>0){this.player_.addTextTracks(b.options_.tracks)}}});vjs.TextTrackDisplay.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"})};vjs.TextTrackMenuItem=vjs.MenuItem.extend({init:function(c,b){var a=this.track=b.track;b.label=a.label();b.selected=a.dflt();vjs.MenuItem.call(this,c,b);this.player_.on(a.kind()+"trackchange",vjs.bind(this,this.update))}});vjs.TextTrackMenuItem.prototype.onClick=function(){vjs.MenuItem.prototype.onClick.call(this);this.player_.showTextTrack(this.track.id_,this.track.kind())};vjs.TextTrackMenuItem.prototype.update=function(){this.selected(this.track.mode()==2)};vjs.OffTextTrackMenuItem=vjs.TextTrackMenuItem.extend({init:function(b,a){a.track={kind:function(){return a.kind},player:b,label:function(){return a.kind+" off"},dflt:function(){return false},mode:function(){return false}};vjs.TextTrackMenuItem.call(this,b,a);this.selected(true)}});vjs.OffTextTrackMenuItem.prototype.onClick=function(){vjs.TextTrackMenuItem.prototype.onClick.call(this);this.player_.showTextTrack(this.track.id_,this.track.kind())};vjs.OffTextTrackMenuItem.prototype.update=function(){var c=this.player_.textTracks(),d=0,b=c.length,a,e=true;for(;d0){this.show()}return a};vjs.ChaptersTrackMenuItem=vjs.MenuItem.extend({init:function(d,c){var b=this.track=c.track,a=this.cue=c.cue,e=d.currentTime();c.label=a.text;c.selected=(a.startTime<=e&&e0){for(var e=0,b=c.length;e