@tower1229/flow-ui
Version:
Highly customizable UI framework based Seajs/jQuery
268 lines (267 loc) • 171 kB
JavaScript
/*
* name: video.js
* version: v0.0.1
* update: build
* date: 2015-06-18
*/
define('video', function(require,exports,module){
var path=require.resolve("./");
var head=document.head||document.getElementsByTagName("head")[0]||document.documentElement;
var node=document.createElement("link");node.rel="stylesheet";node.href=path+"video-js.min.css";head.appendChild(node);document.createElement("video");
document.createElement("audio");document.createElement("track");var vjs=function(id,options,ready){var tag;if(typeof id==="string"){if(id.indexOf("#")===0){id=id.slice(1);
}if(vjs.players[id]){if(options){vjs.log.warn('Player "'+id+'" is already initialised. Options will not be applied.');}if(ready){vjs.players[id].ready(ready);
}return vjs.players[id];}else{tag=vjs.el(id);}}else{tag=id;}if(!tag||!tag.nodeName){throw new TypeError("The element or ID supplied is not valid. (videojs)");
}return tag.player||new vjs.Player(tag,options,ready);};var videojs=window.videojs=vjs;vjs.CDN_VERSION="4.12";vjs.ACCESS_PROTOCOL=("https:"==document.location.protocol?"https://":"http://");
vjs.VERSION="4.12.9";vjs.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],inactivityTimeout:2000,children:{mediaLoader:{},posterImage:{},loadingSpinner:{},textTrackDisplay:{},bigPlayButton:{},controlBar:{},errorDisplay:{},textTrackSettings:{}},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"]=path+"video-js.swf";}vjs.addLanguage=function(code,data){if(vjs.options.languages[code]!==undefined){vjs.options.languages[code]=vjs.util.mergeOptions(vjs.options.languages[code],data);
}else{vjs.options.languages[code]=data;}return vjs.options.languages;};vjs.players={};
if(typeof define==="function"&&define.amd){define("videojs",[],function(){return videojs;
});}else{if(typeof exports==="object"&&typeof module==="object"){module.exports=videojs;}}vjs.CoreObject=vjs.CoreObject=function(){};vjs.CoreObject.extend=function(props){var init,subObj;
props=props||{};init=props.init||props.init||this.prototype.init||this.prototype.init||function(){};subObj=function(){init.apply(this,arguments);};subObj.prototype=vjs.obj.create(this.prototype);
subObj.prototype.constructor=subObj;subObj.extend=vjs.CoreObject.extend;subObj.create=vjs.CoreObject.create;for(var name in props){if(props.hasOwnProperty(name)){subObj.prototype[name]=props[name];
}}return subObj;};vjs.CoreObject.create=function(){var inst=vjs.obj.create(this.prototype);this.apply(inst,arguments);return inst;};vjs.on=function(elem,type,fn){if(vjs.obj.isArray(type)){return _handleMultipleEvents(vjs.on,elem,type,fn);
}var data=vjs.getData(elem);if(!data.handlers){data.handlers={};}if(!data.handlers[type]){data.handlers[type]=[];}if(!fn.guid){fn.guid=vjs.guid++;}data.handlers[type].push(fn);
if(!data.dispatcher){data.disabled=false;data.dispatcher=function(event){if(data.disabled){return;}event=vjs.fixEvent(event);var handlers=data.handlers[event.type];
if(handlers){var handlersCopy=handlers.slice(0);for(var m=0,n=handlersCopy.length;m<n;m++){if(event.isImmediatePropagationStopped()){break;}else{handlersCopy[m].call(elem,event);
}}}};}if(data.handlers[type].length==1){if(elem.addEventListener){elem.addEventListener(type,data.dispatcher,false);}else{if(elem.attachEvent){elem.attachEvent("on"+type,data.dispatcher);
}}}};vjs.off=function(elem,type,fn){if(!vjs.hasData(elem)){return;}var data=vjs.getData(elem);if(!data.handlers){return;}if(vjs.obj.isArray(type)){return _handleMultipleEvents(vjs.off,elem,type,fn);
}var removeType=function(t){data.handlers[t]=[];vjs.cleanUpEvents(elem,t);};if(!type){for(var t in data.handlers){removeType(t);}return;}var handlers=data.handlers[type];
if(!handlers){return;}if(!fn){removeType(type);return;}if(fn.guid){for(var n=0;n<handlers.length;n++){if(handlers[n].guid===fn.guid){handlers.splice(n--,1);
}}}vjs.cleanUpEvents(elem,type);};vjs.cleanUpEvents=function(elem,type){var data=vjs.getData(elem);if(data.handlers[type].length===0){delete data.handlers[type];
if(elem.removeEventListener){elem.removeEventListener(type,data.dispatcher,false);}else{if(elem.detachEvent){elem.detachEvent("on"+type,data.dispatcher);
}}}if(vjs.isEmpty(data.handlers)){delete data.handlers;delete data.dispatcher;delete data.disabled;}if(vjs.isEmpty(data)){vjs.removeData(elem);}};vjs.fixEvent=function(event){function returnTrue(){return true;
}function returnFalse(){return false;}if(!event||!event.isPropagationStopped){var old=event||window.event;event={};for(var key in old){if(key!=="layerX"&&key!=="layerY"&&key!=="keyLocation"){if(!(key=="returnValue"&&old.preventDefault)){event[key]=old[key];
}}}if(!event.target){event.target=event.srcElement||document;}event.relatedTarget=event.fromElement===event.target?event.toElement:event.fromElement;event.preventDefault=function(){if(old.preventDefault){old.preventDefault();
}event.returnValue=false;event.isDefaultPrevented=returnTrue;event.defaultPrevented=true;};event.isDefaultPrevented=returnFalse;event.defaultPrevented=false;
event.stopPropagation=function(){if(old.stopPropagation){old.stopPropagation();}event.cancelBubble=true;event.isPropagationStopped=returnTrue;};event.isPropagationStopped=returnFalse;
event.stopImmediatePropagation=function(){if(old.stopImmediatePropagation){old.stopImmediatePropagation();}event.isImmediatePropagationStopped=returnTrue;
event.stopPropagation();};event.isImmediatePropagationStopped=returnFalse;if(event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0);
event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0);}event.which=event.charCode||event.keyCode;
if(event.button!=null){event.button=(event.button&1?0:(event.button&4?1:(event.button&2?2:0)));}}return event;};vjs.trigger=function(elem,event){var elemData=(vjs.hasData(elem))?vjs.getData(elem):{};
var parent=elem.parentNode||elem.ownerDocument;if(typeof event==="string"){event={type:event,target:elem};}event=vjs.fixEvent(event);if(elemData.dispatcher){elemData.dispatcher.call(elem,event);
}if(parent&&!event.isPropagationStopped()&&event.bubbles!==false){vjs.trigger(parent,event);}else{if(!parent&&!event.defaultPrevented){var targetData=vjs.getData(event.target);
if(event.target[event.type]){targetData.disabled=true;if(typeof event.target[event.type]==="function"){event.target[event.type]();}targetData.disabled=false;
}}}return !event.defaultPrevented;};vjs.one=function(elem,type,fn){if(vjs.obj.isArray(type)){return _handleMultipleEvents(vjs.one,elem,type,fn);}var func=function(){vjs.off(elem,type,func);
fn.apply(this,arguments);};func.guid=fn.guid=fn.guid||vjs.guid++;vjs.on(elem,type,func);};function _handleMultipleEvents(fn,elem,type,callback){vjs.arr.forEach(type,function(type){fn(elem,type,callback);
});}var hasOwnProp=Object.prototype.hasOwnProperty;vjs.createEl=function(tagName,properties){var el;tagName=tagName||"div";properties=properties||{};el=document.createElement(tagName);
vjs.obj.each(properties,function(propName,val){if(propName.indexOf("aria-")!==-1||propName=="role"){el.setAttribute(propName,val);}else{el[propName]=val;
}});return el;};vjs.capitalize=function(string){return string.charAt(0).toUpperCase()+string.slice(1);};vjs.obj={};vjs.obj.create=Object.create||function(obj){function F(){}F.prototype=obj;
return new F();};vjs.obj.each=function(obj,fn,context){for(var key in obj){if(hasOwnProp.call(obj,key)){fn.call(context||this,key,obj[key]);}}};vjs.obj.merge=function(obj1,obj2){if(!obj2){return obj1;
}for(var key in obj2){if(hasOwnProp.call(obj2,key)){obj1[key]=obj2[key];}}return obj1;};vjs.obj.deepMerge=function(obj1,obj2){var key,val1,val2;obj1=vjs.obj.copy(obj1);
for(key in obj2){if(hasOwnProp.call(obj2,key)){val1=obj1[key];val2=obj2[key];if(vjs.obj.isPlain(val1)&&vjs.obj.isPlain(val2)){obj1[key]=vjs.obj.deepMerge(val1,val2);
}else{obj1[key]=obj2[key];}}}return obj1;};vjs.obj.copy=function(obj){return vjs.obj.merge({},obj);};vjs.obj.isPlain=function(obj){return !!obj&&typeof obj==="object"&&obj.toString()==="[object Object]"&&obj.constructor===Object;
};vjs.obj.isArray=Array.isArray||function(arr){return Object.prototype.toString.call(arr)==="[object Array]";};vjs.isNaN=function(num){return num!==num;
};vjs.bind=function(context,fn,uid){if(!fn.guid){fn.guid=vjs.guid++;}var ret=function(){return fn.apply(context,arguments);};ret.guid=(uid)?uid+"_"+fn.guid:fn.guid;
return ret;};vjs.cache={};vjs.guid=1;vjs.expando="vdata"+(new Date()).getTime();vjs.getData=function(el){var id=el[vjs.expando];if(!id){id=el[vjs.expando]=vjs.guid++;
}if(!vjs.cache[id]){vjs.cache[id]={};}return vjs.cache[id];};vjs.hasData=function(el){var id=el[vjs.expando];return !(!id||vjs.isEmpty(vjs.cache[id]));
};vjs.removeData=function(el){var id=el[vjs.expando];if(!id){return;}delete vjs.cache[id];try{delete el[vjs.expando];}catch(e){if(el.removeAttribute){el.removeAttribute(vjs.expando);
}else{el[vjs.expando]=null;}}};vjs.isEmpty=function(obj){for(var prop in obj){if(obj[prop]!==null){return false;}}return true;};vjs.hasClass=function(element,classToCheck){return((" "+element.className+" ").indexOf(" "+classToCheck+" ")!==-1);
};vjs.addClass=function(element,classToAdd){if(!vjs.hasClass(element,classToAdd)){element.className=element.className===""?classToAdd:element.className+" "+classToAdd;
}};vjs.removeClass=function(element,classToRemove){var classNames,i;if(!vjs.hasClass(element,classToRemove)){return;}classNames=element.className.split(" ");
for(i=classNames.length-1;i>=0;i--){if(classNames[i]===classToRemove){classNames.splice(i,1);}}element.className=classNames.join(" ");};vjs.TEST_VID=vjs.createEl("video");
(function(){var track=document.createElement("track");track.kind="captions";track.srclang="en";track.label="English";vjs.TEST_VID.appendChild(track);})();
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 match=vjs.USER_AGENT.match(/OS (\d+)_/i);if(match&&match[1]){return match[1];
}})();vjs.IS_ANDROID=(/Android/i).test(vjs.USER_AGENT);vjs.ANDROID_VERSION=(function(){var match=vjs.USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),major,minor;
if(!match){return null;}major=match[1]&&parseFloat(match[1]);minor=match[2]&&parseFloat(match[2]);if(major&&minor){return parseFloat(match[1]+"."+match[2]);
}else{if(major){return major;}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.IS_IE8=(/MSIE\s8\.0/).test(vjs.USER_AGENT);vjs.TOUCH_ENABLED=!!(("ontouchstart" in window)||window.DocumentTouch&&document instanceof window.DocumentTouch);
vjs.BACKGROUND_SIZE_SUPPORTED="backgroundSize" in vjs.TEST_VID.style;vjs.setElementAttributes=function(el,attributes){vjs.obj.each(attributes,function(attrName,attrValue){if(attrValue===null||typeof attrValue==="undefined"||attrValue===false){el.removeAttribute(attrName);
}else{el.setAttribute(attrName,(attrValue===true?"":attrValue));}});};vjs.getElementAttributes=function(tag){var obj,knownBooleans,attrs,attrName,attrVal;
obj={};knownBooleans=",autoplay,controls,loop,muted,default,";if(tag&&tag.attributes&&tag.attributes.length>0){attrs=tag.attributes;for(var i=attrs.length-1;
i>=0;i--){attrName=attrs[i].name;attrVal=attrs[i].value;if(typeof tag[attrName]==="boolean"||knownBooleans.indexOf(","+attrName+",")!==-1){attrVal=(attrVal!==null)?true:false;
}obj[attrName]=attrVal;}}return obj;};vjs.getComputedDimension=function(el,strCssRule){var strValue="";if(document.defaultView&&document.defaultView.getComputedStyle){strValue=document.defaultView.getComputedStyle(el,"").getPropertyValue(strCssRule);
}else{if(el.currentStyle){strValue=el["client"+strCssRule.substr(0,1).toUpperCase()+strCssRule.substr(1)]+"px";}}return strValue;};vjs.insertFirst=function(child,parent){if(parent.firstChild){parent.insertBefore(child,parent.firstChild);
}else{parent.appendChild(child);}};vjs.browser={};vjs.el=function(id){if(id.indexOf("#")===0){id=id.slice(1);}return document.getElementById(id);};vjs.formatTime=function(seconds,guide){guide=guide||seconds;
var s=Math.floor(seconds%60),m=Math.floor(seconds/60%60),h=Math.floor(seconds/3600),gm=Math.floor(guide/60%60),gh=Math.floor(guide/3600);if(isNaN(seconds)||seconds===Infinity){h=m=s="-";
}h=(h>0||gh>0)?h+":":"";m=(((h||gm>=10)&&m<10)?"0"+m:m)+":";s=(s<10)?"0"+s:s;return h+m+s;};vjs.blockTextSelection=function(){document.body.focus();document.onselectstart=function(){return false;
};};vjs.unblockTextSelection=function(){document.onselectstart=function(){return true;};};vjs.trim=function(str){return(str+"").replace(/^\s+|\s+$/g,"");
};vjs.round=function(num,dec){if(!dec){dec=0;}return Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);};vjs.createTimeRange=function(start,end){if(start===undefined&&end===undefined){return{length:0,start:function(){throw new Error("This TimeRanges object is empty");
},end:function(){throw new Error("This TimeRanges object is empty");}};}return{length:1,start:function(){return start;},end:function(){return end;}};};
vjs.setLocalStorage=function(key,value){try{var localStorage=window.localStorage||false;if(!localStorage){return;}localStorage[key]=value;}catch(e){if(e.code==22||e.code==1014){vjs.log("LocalStorage Full (VideoJS)",e);
}else{if(e.code==18){vjs.log("LocalStorage not allowed (VideoJS)",e);}else{vjs.log("LocalStorage Error (VideoJS)",e);}}}};vjs.getAbsoluteURL=function(url){if(!url.match(/^https?:\/\//)){url=vjs.createEl("div",{innerHTML:'<a href="'+url+'">x</a>'}).firstChild.href;
}return url;};vjs.parseUrl=function(url){var div,a,addToBody,props,details;props=["protocol","hostname","port","pathname","search","hash","host"];a=vjs.createEl("a",{href:url});
addToBody=(a.host===""&&a.protocol!=="file:");if(addToBody){div=vjs.createEl("div");div.innerHTML='<a href="'+url+'"></a>';a=div.firstChild;div.setAttribute("style","display:none; position:absolute;");
document.body.appendChild(div);}details={};for(var i=0;i<props.length;i++){details[props[i]]=a[props[i]];}if(details.protocol==="http:"){details.host=details.host.replace(/:80$/,"");
}if(details.protocol==="https:"){details.host=details.host.replace(/:443$/,"");}if(addToBody){document.body.removeChild(div);}return details;};function _logType(type,args){var argsArray,noop,console;
argsArray=Array.prototype.slice.call(args);noop=function(){};console=window.console||{log:noop,warn:noop,error:noop};if(type){argsArray.unshift(type.toUpperCase()+":");
}else{type="log";}vjs.log.history.push(argsArray);argsArray.unshift("VIDEOJS:");if(console[type].apply){console[type].apply(console,argsArray);}else{console[type](argsArray.join(" "));
}}vjs.log=function(){_logType(null,arguments);};vjs.log.history=[];vjs.log.error=function(){_logType("error",arguments);};vjs.log.warn=function(){_logType("warn",arguments);
};vjs.findPosition=function(el){var box,docEl,body,clientLeft,scrollLeft,left,clientTop,scrollTop,top;if(el.getBoundingClientRect&&el.parentNode){box=el.getBoundingClientRect();
}if(!box){return{left:0,top:0};}docEl=document.documentElement;body=document.body;clientLeft=docEl.clientLeft||body.clientLeft||0;scrollLeft=window.pageXOffset||body.scrollLeft;
left=box.left+scrollLeft-clientLeft;clientTop=docEl.clientTop||body.clientTop||0;scrollTop=window.pageYOffset||body.scrollTop;top=box.top+scrollTop-clientTop;
return{left:vjs.round(left),top:vjs.round(top)};};vjs.arr={};vjs.arr.forEach=function(array,callback,thisArg){if(vjs.obj.isArray(array)&&callback instanceof Function){for(var i=0,len=array.length;
i<len;++i){callback.call(thisArg||vjs,array[i],i,array);}}return array;};vjs.xhr=function(options,callback){var XHR,request,urlInfo,winLoc,fileUrl,crossOrigin,abortTimeout,successHandler,errorHandler;
if(typeof options==="string"){options={uri:options};}videojs.util.mergeOptions({method:"GET",timeout:45*1000},options);callback=callback||function(){};
successHandler=function(){window.clearTimeout(abortTimeout);callback(null,request,request.response||request.responseText);};errorHandler=function(err){window.clearTimeout(abortTimeout);
if(!err||typeof err==="string"){err=new Error(err);}callback(err,request);};XHR=window.XMLHttpRequest;if(typeof XHR==="undefined"){XHR=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0");
}catch(e){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0");}catch(f){}try{return new window.ActiveXObject("Msxml2.XMLHTTP");}catch(g){}throw new Error("This browser does not support XMLHttpRequest.");
};}request=new XHR();request.uri=options.uri;urlInfo=vjs.parseUrl(options.uri);winLoc=window.location;crossOrigin=(urlInfo.protocol+urlInfo.host)!==(winLoc.protocol+winLoc.host);
if(crossOrigin&&window.XDomainRequest&&!("withCredentials" in request)){request=new window.XDomainRequest();request.onload=successHandler;request.onerror=errorHandler;
request.onprogress=function(){};request.ontimeout=function(){};}else{fileUrl=(urlInfo.protocol=="file:"||winLoc.protocol=="file:");request.onreadystatechange=function(){if(request.readyState===4){if(request.timedout){return errorHandler("timeout");
}if(request.status===200||fileUrl&&request.status===0){successHandler();}else{errorHandler();}}};if(options.timeout){abortTimeout=window.setTimeout(function(){if(request.readyState!==4){request.timedout=true;
request.abort();}},options.timeout);}}try{request.open(options.method||"GET",options.uri,true);}catch(err){return errorHandler(err);}if(options.withCredentials){request.withCredentials=true;
}if(options.responseType){request.responseType=options.responseType;}try{request.send();}catch(err){return errorHandler(err);}return request;};vjs.util={};
vjs.util.mergeOptions=function(obj1,obj2){var key,val1,val2;obj1=vjs.obj.copy(obj1);for(key in obj2){if(obj2.hasOwnProperty(key)){val1=obj1[key];val2=obj2[key];
if(vjs.obj.isPlain(val1)&&vjs.obj.isPlain(val2)){obj1[key]=vjs.util.mergeOptions(val1,val2);}else{obj1[key]=obj2[key];}}}return obj1;};vjs.EventEmitter=function(){};
vjs.EventEmitter.prototype.allowedEvents_={};vjs.EventEmitter.prototype.on=function(type,fn){var ael=this.addEventListener;this.addEventListener=Function.prototype;
vjs.on(this,type,fn);this.addEventListener=ael;};vjs.EventEmitter.prototype.addEventListener=vjs.EventEmitter.prototype.on;vjs.EventEmitter.prototype.off=function(type,fn){vjs.off(this,type,fn);
};vjs.EventEmitter.prototype.removeEventListener=vjs.EventEmitter.prototype.off;vjs.EventEmitter.prototype.one=function(type,fn){vjs.one(this,type,fn);
};vjs.EventEmitter.prototype.trigger=function(event){var type=event.type||event;if(typeof event==="string"){event={type:type};}event=vjs.fixEvent(event);
if(this.allowedEvents_[type]&&this["on"+type]){this["on"+type](event);}vjs.trigger(this,event);};vjs.EventEmitter.prototype.dispatchEvent=vjs.EventEmitter.prototype.trigger;
vjs.Component=vjs.CoreObject.extend({init:function(player,options,ready){this.player_=player;this.options_=vjs.obj.copy(this.options_);options=this.options(options);
this.id_=options.id||(options.el&&options.el["id"]);if(!this.id_){this.id_=((player.id&&player.id())||"no_player")+"_component_"+vjs.guid++;}this.name_=options.name||null;
this.el_=options.el||this.createEl();this.children_=[];this.childIndex_={};this.childNameIndex_={};this.initChildren();this.ready(ready);if(options.reportTouchActivity!==false){this.enableTouchActivity();
}}});vjs.Component.prototype.dispose=function(){this.trigger({type:"dispose",bubbles:false});if(this.children_){for(var i=this.children_.length-1;i>=0;
i--){if(this.children_[i].dispose){this.children_[i].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(obj){if(obj===undefined){return this.options_;}return this.options_=vjs.util.mergeOptions(this.options_,obj);};
vjs.Component.prototype.el_;vjs.Component.prototype.createEl=function(tagName,attributes){return vjs.createEl(tagName,attributes);};vjs.Component.prototype.localize=function(string){var lang=this.player_.language(),languages=this.player_.languages();
if(languages&&languages[lang]&&languages[lang][string]){return languages[lang][string];}return string;};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(id){return this.childIndex_[id];};vjs.Component.prototype.childNameIndex_;
vjs.Component.prototype.getChild=function(name){return this.childNameIndex_[name];};vjs.Component.prototype.addChild=function(child,options){var component,componentClass,componentName;
if(typeof child==="string"){componentName=child;options=options||{};componentClass=options.componentClass||vjs.capitalize(componentName);options.name=componentName;
component=new window.videojs[componentClass](this.player_||this,options);}else{component=child;}this.children_.push(component);if(typeof component.id==="function"){this.childIndex_[component.id()]=component;
}componentName=componentName||(component.name&&component.name());if(componentName){this.childNameIndex_[componentName]=component;}if(typeof component.el==="function"&&component.el()){this.contentEl().appendChild(component.el());
}return component;};vjs.Component.prototype.removeChild=function(component){if(typeof component==="string"){component=this.getChild(component);}if(!component||!this.children_){return;
}var childFound=false;for(var i=this.children_.length-1;i>=0;i--){if(this.children_[i]===component){childFound=true;this.children_.splice(i,1);break;}}if(!childFound){return;
}this.childIndex_[component.id()]=null;this.childNameIndex_[component.name()]=null;var compEl=component.el();if(compEl&&compEl.parentNode===this.contentEl()){this.contentEl().removeChild(component.el());
}};vjs.Component.prototype.initChildren=function(){var parent,parentOptions,children,child,name,opts,handleAdd;parent=this;parentOptions=parent.options();
children=parentOptions.children;if(children){handleAdd=function(name,opts){if(parentOptions[name]!==undefined){opts=parentOptions[name];}if(opts===false){return;
}parent[name]=parent.addChild(name,opts);};if(vjs.obj.isArray(children)){for(var i=0;i<children.length;i++){child=children[i];if(typeof child=="string"){name=child;
opts={};}else{name=child.name;opts=child;}handleAdd(name,opts);}}else{vjs.obj.each(children,handleAdd);}}};vjs.Component.prototype.buildCSSClass=function(){return"";
};vjs.Component.prototype.on=function(first,second,third){var target,type,fn,removeOnDispose,cleanRemover,thisComponent;if(typeof first==="string"||vjs.obj.isArray(first)){vjs.on(this.el_,first,vjs.bind(this,second));
}else{target=first;type=second;fn=vjs.bind(this,third);thisComponent=this;removeOnDispose=function(){thisComponent.off(target,type,fn);};removeOnDispose.guid=fn.guid;
this.on("dispose",removeOnDispose);cleanRemover=function(){thisComponent.off("dispose",removeOnDispose);};cleanRemover.guid=fn.guid;if(first.nodeName){vjs.on(target,type,fn);
vjs.on(target,"dispose",cleanRemover);}else{if(typeof first.on==="function"){target.on(type,fn);target.on("dispose",cleanRemover);}}}return this;};vjs.Component.prototype.off=function(first,second,third){var target,otherComponent,type,fn,otherEl;
if(!first||typeof first==="string"||vjs.obj.isArray(first)){vjs.off(this.el_,first,second);}else{target=first;type=second;fn=vjs.bind(this,third);this.off("dispose",fn);
if(first.nodeName){vjs.off(target,type,fn);vjs.off(target,"dispose",fn);}else{target.off(type,fn);target.off("dispose",fn);}}return this;};vjs.Component.prototype.one=function(first,second,third){var target,type,fn,thisComponent,newFunc;
if(typeof first==="string"||vjs.obj.isArray(first)){vjs.one(this.el_,first,vjs.bind(this,second));}else{target=first;type=second;fn=vjs.bind(this,third);
thisComponent=this;newFunc=function(){thisComponent.off(target,type,newFunc);fn.apply(this,arguments);};newFunc.guid=fn.guid;this.on(target,type,newFunc);
}return this;};vjs.Component.prototype.trigger=function(event){vjs.trigger(this.el_,event);return this;};vjs.Component.prototype.isReady_;vjs.Component.prototype.isReadyOnInitFinish_=true;
vjs.Component.prototype.readyQueue_;vjs.Component.prototype.ready=function(fn){if(fn){if(this.isReady_){fn.call(this);}else{if(this.readyQueue_===undefined){this.readyQueue_=[];
}this.readyQueue_.push(fn);}}return this;};vjs.Component.prototype.triggerReady=function(){this.isReady_=true;var readyQueue=this.readyQueue_;if(readyQueue&&readyQueue.length>0){for(var i=0,j=readyQueue.length;
i<j;i++){readyQueue[i].call(this);}this.readyQueue_=[];this.trigger("ready");}};vjs.Component.prototype.hasClass=function(classToCheck){return vjs.hasClass(this.el_,classToCheck);
};vjs.Component.prototype.addClass=function(classToAdd){vjs.addClass(this.el_,classToAdd);return this;};vjs.Component.prototype.removeClass=function(classToRemove){vjs.removeClass(this.el_,classToRemove);
return this;};vjs.Component.prototype.show=function(){this.removeClass("vjs-hidden");return this;};vjs.Component.prototype.hide=function(){this.addClass("vjs-hidden");
return this;};vjs.Component.prototype.lockShowing=function(){this.addClass("vjs-lock-showing");return this;};vjs.Component.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing");
return this;};vjs.Component.prototype.disable=function(){this.hide();this.show=function(){};};vjs.Component.prototype.width=function(num,skipListeners){return this.dimension("width",num,skipListeners);
};vjs.Component.prototype.height=function(num,skipListeners){return this.dimension("height",num,skipListeners);};vjs.Component.prototype.dimensions=function(width,height){return this.width(width,true).height(height);
};vjs.Component.prototype.dimension=function(widthOrHeight,num,skipListeners){if(num!==undefined){if(num===null||vjs.isNaN(num)){num=0;}if((""+num).indexOf("%")!==-1||(""+num).indexOf("px")!==-1){this.el_.style[widthOrHeight]=num;
}else{if(num==="auto"){this.el_.style[widthOrHeight]="";}else{this.el_.style[widthOrHeight]=num+"px";}}if(!skipListeners){this.trigger("resize");}return this;
}if(!this.el_){return 0;}var val=this.el_.style[widthOrHeight];var pxIndex=val.indexOf("px");if(pxIndex!==-1){return parseInt(val.slice(0,pxIndex),10);
}else{return parseInt(this.el_["offset"+vjs.capitalize(widthOrHeight)],10);}};vjs.Component.prototype.onResize;vjs.Component.prototype.emitTapEvents=function(){var touchStart,firstTouch,touchTime,couldBeTap,noTap,xdiff,ydiff,touchDistance,tapMovementThreshold,touchTimeThreshold;
touchStart=0;firstTouch=null;tapMovementThreshold=10;touchTimeThreshold=200;this.on("touchstart",function(event){if(event.touches.length===1){firstTouch=vjs.obj.copy(event.touches[0]);
touchStart=new Date().getTime();couldBeTap=true;}});this.on("touchmove",function(event){if(event.touches.length>1){couldBeTap=false;}else{if(firstTouch){xdiff=event.touches[0].pageX-firstTouch.pageX;
ydiff=event.touches[0].pageY-firstTouch.pageY;touchDistance=Math.sqrt(xdiff*xdiff+ydiff*ydiff);if(touchDistance>tapMovementThreshold){couldBeTap=false;
}}}});noTap=function(){couldBeTap=false;};this.on("touchleave",noTap);this.on("touchcancel",noTap);this.on("touchend",function(event){firstTouch=null;if(couldBeTap===true){touchTime=new Date().getTime()-touchStart;
if(touchTime<touchTimeThreshold){event.preventDefault();this.trigger("tap");}}});};vjs.Component.prototype.enableTouchActivity=function(){var report,touchHolding,touchEnd;
if(!this.player().reportUserActivity){return;}report=vjs.bind(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){report();
this.clearInterval(touchHolding);touchHolding=this.setInterval(report,250);});touchEnd=function(event){report();this.clearInterval(touchHolding);};this.on("touchmove",report);
this.on("touchend",touchEnd);this.on("touchcancel",touchEnd);};vjs.Component.prototype.setTimeout=function(fn,timeout){fn=vjs.bind(this,fn);var timeoutId=setTimeout(fn,timeout);
var disposeFn=function(){this.clearTimeout(timeoutId);};disposeFn.guid="vjs-timeout-"+timeoutId;this.on("dispose",disposeFn);return timeoutId;};vjs.Component.prototype.clearTimeout=function(timeoutId){clearTimeout(timeoutId);
var disposeFn=function(){};disposeFn.guid="vjs-timeout-"+timeoutId;this.off("dispose",disposeFn);return timeoutId;};vjs.Component.prototype.setInterval=function(fn,interval){fn=vjs.bind(this,fn);
var intervalId=setInterval(fn,interval);var disposeFn=function(){this.clearInterval(intervalId);};disposeFn.guid="vjs-interval-"+intervalId;this.on("dispose",disposeFn);
return intervalId;};vjs.Component.prototype.clearInterval=function(intervalId){clearInterval(intervalId);var disposeFn=function(){};disposeFn.guid="vjs-interval-"+intervalId;
this.off("dispose",disposeFn);return intervalId;};vjs.Button=vjs.Component.extend({init:function(player,options){vjs.Component.call(this,player,options);
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(type,props){var el;
props=vjs.obj.merge({className:this.buildCSSClass(),role:"button","aria-live":"polite",tabIndex:0},props);el=vjs.Component.prototype.createEl.call(this,type,props);
if(!props.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_);el.appendChild(this.contentEl_);}return el;};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,"keydown",vjs.bind(this,this.onKeyPress));};vjs.Button.prototype.onKeyPress=function(event){if(event.which==32||event.which==13){event.preventDefault();
this.onClick();}};vjs.Button.prototype.onBlur=function(){vjs.off(document,"keydown",vjs.bind(this,this.onKeyPress));};vjs.Slider=vjs.Component.extend({init:function(player,options){vjs.Component.call(this,player,options);
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.on(player,"controlsvisible",this.update);this.on(player,this.playerEvent,this.update);
}});vjs.Slider.prototype.createEl=function(type,props){props=props||{};props.className=props.className+" vjs-slider";props=vjs.obj.merge({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},props);
return vjs.Component.prototype.createEl.call(this,type,props);};vjs.Slider.prototype.onMouseDown=function(event){event.preventDefault();vjs.blockTextSelection();
this.addClass("vjs-sliding");this.on(document,"mousemove",this.onMouseMove);this.on(document,"mouseup",this.onMouseUp);this.on(document,"touchmove",this.onMouseMove);
this.on(document,"touchend",this.onMouseUp);this.onMouseMove(event);};vjs.Slider.prototype.onMouseMove=function(){};vjs.Slider.prototype.onMouseUp=function(){vjs.unblockTextSelection();
this.removeClass("vjs-sliding");this.off(document,"mousemove",this.onMouseMove);this.off(document,"mouseup",this.onMouseUp);this.off(document,"touchmove",this.onMouseMove);
this.off(document,"touchend",this.onMouseUp);this.update();};vjs.Slider.prototype.update=function(){if(!this.el_){return;}var barProgress,progress=this.getPercent(),handle=this.handle,bar=this.bar;
if(typeof progress!=="number"||progress!==progress||progress<0||progress===Infinity){progress=0;}barProgress=progress;if(handle){var box=this.el_,boxWidth=box.offsetWidth,handleWidth=handle.el().offsetWidth,handlePercent=(handleWidth)?handleWidth/boxWidth:0,boxAdjustedPercent=1-handlePercent,adjustedProgress=progress*boxAdjustedPercent;
barProgress=adjustedProgress+(handlePercent/2);handle.el().style.left=vjs.round(adjustedProgress*100,2)+"%";}if(bar){bar.el().style.width=vjs.round(barProgress*100,2)+"%";
}};vjs.Slider.prototype.calculateDistance=function(event){var el,box,boxX,boxY,boxW,boxH,handle,pageX,pageY;el=this.el_;box=vjs.findPosition(el);boxW=boxH=el.offsetWidth;
handle=this.handle;if(this.options()["vertical"]){boxY=box.top;if(event.changedTouches){pageY=event.changedTouches[0].pageY;}else{pageY=event.pageY;}if(handle){var handleH=handle.el().offsetHeight;
boxY=boxY+(handleH/2);boxH=boxH-handleH;}return Math.max(0,Math.min(1,((boxY-pageY)+boxH)/boxH));}else{boxX=box.left;if(event.changedTouches){pageX=event.changedTouches[0].pageX;
}else{pageX=event.pageX;}if(handle){var handleW=handle.el().offsetWidth;boxX=boxX+(handleW/2);boxW=boxW-handleW;}return Math.max(0,Math.min(1,(pageX-boxX)/boxW));
}};vjs.Slider.prototype.onFocus=function(){this.on(document,"keydown",this.onKeyPress);};vjs.Slider.prototype.onKeyPress=function(event){if(event.which==37||event.which==40){event.preventDefault();
this.stepBack();}else{if(event.which==38||event.which==39){event.preventDefault();this.stepForward();}}};vjs.Slider.prototype.onBlur=function(){this.off(document,"keydown",this.onKeyPress);
};vjs.Slider.prototype.onClick=function(event){event.stopImmediatePropagation();event.preventDefault();};vjs.SliderHandle=vjs.Component.extend();vjs.SliderHandle.prototype.defaultValue=0;
vjs.SliderHandle.prototype.createEl=function(type,props){props=props||{};props.className=props.className+" vjs-slider-handle";props=vjs.obj.merge({innerHTML:'<span class="vjs-control-text">'+this.defaultValue+"</span>"},props);
return vjs.Component.prototype.createEl.call(this,"div",props);};vjs.Menu=vjs.Component.extend();vjs.Menu.prototype.addItem=function(component){this.addChild(component);
component.on("click",vjs.bind(this,function(){this.unlockShowing();}));};vjs.Menu.prototype.createEl=function(){var contentElType=this.options().contentElType||"ul";
this.contentEl_=vjs.createEl(contentElType,{className:"vjs-menu-content"});var el=vjs.Component.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});
el.appendChild(this.contentEl_);vjs.on(el,"click",function(event){event.preventDefault();event.stopImmediatePropagation();});return el;};vjs.MenuItem=vjs.Button.extend({init:function(player,options){vjs.Button.call(this,player,options);
this.selected(options.selected);}});vjs.MenuItem.prototype.createEl=function(type,props){return vjs.Button.prototype.createEl.call(this,"li",vjs.obj.merge({className:"vjs-menu-item",innerHTML:this.localize(this.options_.label)},props));
};vjs.MenuItem.prototype.onClick=function(){this.selected(true);};vjs.MenuItem.prototype.selected=function(selected){if(selected){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(player,options){vjs.Button.call(this,player,options);
this.update();this.on("keydown",this.onKeyPress);this.el_.setAttribute("aria-haspopup",true);this.el_.setAttribute("role","button");}});vjs.MenuButton.prototype.update=function(){var menu=this.createMenu();
if(this.menu){this.removeChild(this.menu);}this.menu=menu;this.addChild(menu);if(this.items&&this.items.length===0){this.hide();}else{if(this.items&&this.items.length>1){this.show();
}}};vjs.MenuButton.prototype.buttonPressed_=false;vjs.MenuButton.prototype.createMenu=function(){var menu=new vjs.Menu(this.player_);if(this.options().title){menu.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 i=0;i<this.items.length;i++){menu.addItem(this.items[i]);}}return menu;};vjs.MenuButton.prototype.createItems=function(){};
vjs.MenuButton.prototype.buildCSSClass=function(){return this.className+" vjs-menu-button "+vjs.Button.prototype.buildCSSClass.call(this);};vjs.MenuButton.prototype.onFocus=function(){};
vjs.MenuButton.prototype.onBlur=function(){};vjs.MenuButton.prototype.onClick=function(){this.one("mouseout",vjs.bind(this,function(){this.menu.unlockShowing();
this.el_.blur();}));if(this.buttonPressed_){this.unpressButton();}else{this.pressButton();}};vjs.MenuButton.prototype.onKeyPress=function(event){if(event.which==32||event.which==13){if(this.buttonPressed_){this.unpressButton();
}else{this.pressButton();}event.preventDefault();}else{if(event.which==27){if(this.buttonPressed_){this.unpressButton();}event.preventDefault();}}};vjs.MenuButton.prototype.pressButton=function(){this.buttonPressed_=true;
this.menu.lockShowing();this.el_.setAttribute("aria-pressed",true);if(this.items&&this.items.length>0){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(code){if(typeof code==="number"){this.code=code;}else{if(typeof code==="string"){this.message=code;
}else{if(typeof code==="object"){vjs.obj.merge(this,code);}}}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;errNum<vjs.MediaError.errorTypes.length;errNum++){vjs.MediaError[vjs.MediaError.errorTypes[errNum]]=errNum;vjs.MediaError.prototype[vjs.MediaError.errorTypes[errNum]]=errNum;
}(function(){var apiMap,specApi,browserApi,i;vjs.browser.fullscreenAPI;apiMap=[["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","MSFullscreenError"]];
specApi=apiMap[0];for(i=0;i<apiMap.length;i++){if(apiMap[i][1] in document){browserApi=apiMap[i];break;}}if(browserApi){vjs.browser.fullscreenAPI={};for(i=0;
i<browserApi.length;i++){vjs.browser.fullscreenAPI[specApi[i]]=browserApi[i];}}})();vjs.Player=vjs.Component.extend({init:function(tag,options,ready){this.tag=tag;
tag.id=tag.id||"vjs_video_"+vjs.guid++;this.tagAttributes=tag&&vjs.getElementAttributes(tag);options=vjs.obj.merge(this.getTagSettings(tag),options);this.language_=options.language||vjs.options.language;
this.languages_=options.languages||vjs.options.languages;this.cache_={};this.poster_=options.poster||"";this.controls_=!!options.controls;tag.controls=false;
options.reportTouchActivity=false;this.isAudio(this.tag.nodeName.toLowerCase()==="audio");vjs.Component.call(this,this,options,ready);if(this.controls()){this.addClass("vjs-controls-enabled");
}else{this.addClass("vjs-controls-disabled");}if(this.isAudio()){this.addClass("vjs-audio");}vjs.players[this.id_]=this;if(options.plugins){vjs.obj.each(options.plugins,function(key,val){this[key](val);
},this);}this.listenForUserActivity();}});vjs.Player.prototype.language_;vjs.Player.prototype.language=function(languageCode){if(languageCode===undefined){return this.language_;
}this.language_=languageCode;return this;};vjs.Player.prototype.languages_;vjs.Player.prototype.languages=function(){return this.languages_;};vjs.Player.prototype.options_=vjs.options;
vjs.Player.prototype.dispose=function(){this.trigger("dispose");this.off("dispose");vjs.players[this.id_]=null;if(this.tag&&this.tag.player){this.tag.player=null;
}if(this.el_&&this.el_.player){this.el_.player=null;}if(this.tech){this.tech.dispose();}vjs.Component.prototype.dispose.call(this);};vjs.Player.prototype.getTagSettings=function(tag){var tagOptions,dataSetup,options={sources:[],tracks:[]};
tagOptions=vjs.getElementAttributes(tag);dataSetup=tagOptions["data-setup"];if(dataSetup!==null){vjs.obj.merge(tagOptions,vjs.JSON.parse(dataSetup||"{}"));
}vjs.obj.merge(options,tagOptions);if(tag.hasChildNodes()){var children,child,childName,i,j;children=tag.childNodes;for(i=0,j=children.length;i<j;i++){child=children[i];
childName=child.nodeName.toLowerCase();if(childName==="source"){options.sources.push(vjs.getElementAttributes(child));}else{if(childName==="track"){options.tracks.push(vjs.getElementAttributes(child));
}}}}return options;};vjs.Player.prototype.createEl=function(){var el=this.el_=vjs.Component.prototype.createEl.call(this,"div"),tag=this.tag,attrs;tag.removeAttribute("width");
tag.removeAttribute("height");attrs=vjs.getElementAttributes(tag);vjs.obj.each(attrs,function(attr){if(attr=="class"){el.className=attrs[attr];}else{el.setAttribute(attr,attrs[attr]);
}});tag.id+="_html5_api";tag.className="vjs-tech";tag.player=el.player=this;this.addClass("vjs-paused");this.width(this.options_.width,true);this.height(this.options_.height,true);
tag.initNetworkState_=tag.networkState;if(tag.parentNode){tag.parentNode.insertBefore(el,tag);}vjs.insertFirst(tag,el);this.el_=el;this.on("loadstart",this.onLoadStart);
this.on("waiting",this.onWaiting);this.on(["canplay","canplaythrough","playing","ended"],this.onWaitEnd);this.on("seeking",this.onSeeking);this.on("seeked",this.onSeeked);
this.on("ended",this.onEnded);this.on("play",this.onPlay);this.on("firstplay",this.onFirstPlay);this.on("pause",this.onPause);this.on("progress",this.onProgress);
this.on("durationchange",this.onDurationChange);this.on("fullscreenchange",this.onFullscreenChange);return el;};vjs.Player.prototype.loadTech=function(techName,source){if(this.tech){this.unloadTech();
}if(techName!=="Html5"&&this.tag){vjs.Html5.disposeMediaElement(this.tag);this.tag=null;}this.techName=techName;this.isReady_=false;var techReady=function(){this.player_.triggerReady();
};var techOptions=vjs.obj.merge({source:source,parentEl:this.el_},this.options_[techName.toLowerCase()]);if(source){this.currentType_=source.type;if(source.src==this.cache_.src&&this.cache_.currentTime>0){techOptions.startTime=this.cache_.currentTime;
}this.cache_.src=source.src;}this.tech=new window.videojs[techName](this,techOptions);this.tech.ready(techReady);};vjs.Player.prototype.unloadTech=function(){this.isReady_=false;
this.tech.dispose();this.tech=false;};vjs.Player.prototype.onLoadStart=function(){this.removeClass("vjs-ended");this.error(null);if(!this.paused()){this.trigger("firstplay");
}else{this.hasStarted(false);}};vjs.Player.prototype.hasStarted_=false;vjs.Player.prototype.hasStarted=function(hasStarted){if(hasStarted!==undefined){if(this.hasStarted_!==hasStarted){this.hasStarted_=hasStarted;
if(hasStarted){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-ended");
this.removeClass("vjs-paused");this.addClass("vjs-playing");this.hasStarted(true);};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(){this.addClass("vjs-ended");
if(this.options_.loop){this.currentTime(0);this.play();}else{if(!this.paused()){this.pause();}}};vjs.Player.prototype.onDurationChange=function(){var duration=this.techGet("duration");
if(duration){if(duration<0){duration=Infinity;}this.duration(duration);if(duration===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.onError;vjs.Player.prototype.cache_;vjs.Player.prototype.getCache=function(){return this.cache_;};vjs.Player.prototype.techCall=function(method,arg){if(this.tech&&!this.tech.isReady_){this.tech.ready(function(){this[method](arg);
});}else{try{this.tech[method](arg);}catch(e){vjs.log(e);throw e;}}};vjs.Player.prototype.techGet=function(method){if(this.tech&&this.tech.isReady_){try{return this.tech[method]();
}catch(e){if(this.tech[method]===undefined){vjs.log("Video.js: "+method+" method not defined for "+this.techName+" playback technology.",e);}else{if(e.name=="TypeError"){vjs.log("Video.js: "+method+" unavailable on "+this.techName+" playback technology element.",e);
this.tech.isReady_=false;}else{vjs.log(e);}}throw e;}}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(seconds){if(seconds!==undefined){this.techCall("setCurrentTime",seconds);
return this;}return this.cache_.currentTime=(this.techGet("currentTime")||0);};vjs.Player.prototype.duration=function(seconds){if(seconds!==undefined){this.cache_.duration=parseFloat(seconds);
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 buffered=this.techGet("buffered");if(!buffered||!buffered.length){buffered=vjs.createTimeRange(0,0);}return buffered;
};vjs.Player.prototype.bufferedPercent=function(){var duration=this.duration(),buffered=this.buffered(),bufferedDuration=0,start,end;if(!duration){return 0;
}for(var i=0;i<buffered.length;i++){start=buffered.start(i);end=buffered.end(i);if(end>duration){end=duration;}bufferedDuration+=end-start;}return bufferedDuration/duration;
};vjs.Player.prototype.bufferedEnd=function(){var buffered=this.buffered(),duration=this.duration(),end=buffered.end(buffered.length-1);if(end>duration){end=duration;
}return end;};vjs.Player.prototype.volume=function(percentAsDecimal){var vol;if(percentAsDecimal!==undefined){vol=Math.max(0,Math.min(1,parseFloat(percentAsDecimal)));
this.cache_.volume=vol;this.techCall("setVolume",vol);vjs.setLocalStorage("volume",vol);return this;}vol=parseFloat(this.techGet("volume"));return(isNaN(vol))?1:vol;
};vjs.Player.prototype.muted=function(muted){if(muted!==undefined){this.techCall("setMuted",muted);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(isFS){if(isFS!==undefined){this.isFullscreen_=!!isFS;return this;
}return this.isFullscreen_;};vjs.Player.prototype.isFullScreen=function(isFS){vjs.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")');
return this.isFullscreen(isFS);};vjs.Player.prototype.requestFullscreen=function(){var fsApi=vjs.browser.fullscreenAPI;this.isFullscreen(true);if(fsApi){vjs.on(document,fsApi.fullscreenchange,vjs.bind(this,function(e){this.isFullscreen(document[fsApi.fullscreenElement]);
if(this.isFullscreen()===false){vjs.off(document,fsApi.fullscreenchange,arguments.callee);}this.trigger("fullscreenchange");}));this.el_[fsApi.requestFullscr