-
Notifications
You must be signed in to change notification settings - Fork 0
/
video.js
76 lines (76 loc) · 31.7 KB
/
video.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*! Video.js v4.0.3 Copyright 2013 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE */
(function() {var b=void 0,f=!0,h=null,j=!1;function m(){return function(){}}function n(a){return function(){return this[a]}}function p(a){return function(){return a}}var r;document.createElement("video");document.createElement("audio");function s(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(s.da[a])return s.da[a];a=s.p(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new s.L(a,c,d)}var u=s;window.ec=window.fc=s;s.Ka="4.0";
s.fb="https:"==document.location.protocol?"https://":"http://";s.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,children:{mediaLoader:{},controlBar:{}}};"GENERATED_CDN_VSN"!==s.Ka&&(u.options.flash.swf=s.fb+"vjs.zencdn.net/"+s.Ka+"/video-js.swf");s.da={};s.O=s.CoreObject=m();
s.O.extend=function(a){var c,d;a=a||{};c=a.init||a.s||this.prototype.init||this.prototype.s||m();d=function(){c.apply(this,arguments)};d.prototype=s.e.create(this.prototype);d.prototype.constructor=d;d.extend=s.O.extend;d.create=s.O.create;for(var e in a)a.hasOwnProperty(e)&&(d.prototype[e]=a[e]);return d};s.O.create=function(){var a=s.e.create(this.prototype);this.apply(a,arguments);return a};
s.c=function(a,c,d){var e=s.getData(a);e.n||(e.n={});e.n[c]||(e.n[c]=[]);d.m||(d.m=s.m++);e.n[c].push(d);e.H||(e.disabled=j,e.H=function(c){if(!e.disabled){c=s.Ra(c);var d=e.n[c.type];if(d)for(var d=d.slice(0),l=0,t=d.length;l<t&&!c.Wa();l++)d[l].call(a,c)}});1==e.n[c].length&&(document.addEventListener?a.addEventListener(c,e.H,j):document.attachEvent&&a.attachEvent("on"+c,e.H))};
s.z=function(a,c,d){if(s.Va(a)){var e=s.getData(a);if(e.n)if(c){var g=e.n[c];if(g){if(d){if(d.m)for(e=0;e<g.length;e++)g[e].m===d.m&&g.splice(e--,1)}else e.n[c]=[];s.Oa(a,c)}}else for(g in e.n)c=g,e.n[c]=[],s.Oa(a,c)}};s.Oa=function(a,c){var d=s.getData(a);0===d.n[c].length&&(delete d.n[c],document.removeEventListener?a.removeEventListener(c,d.H,j):document.detachEvent&&a.detachEvent("on"+c,d.H));s.Ca(d.n)&&(delete d.n,delete d.H,delete d.disabled);s.Ca(d)&&s.bb(a)};
s.Ra=function(a){function c(){return f}function d(){return j}if(!a||!a.Da){var e=a||window.event;a={};for(var g in e)"layerX"!==g&&"layerY"!==g&&(a[g]=e[g]);a.target||(a.target=a.srcElement||document);a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;a.preventDefault=function(){e.preventDefault&&e.preventDefault();a.returnValue=j;a.Ba=c};a.Ba=d;a.stopPropagation=function(){e.stopPropagation&&e.stopPropagation();a.cancelBubble=f;a.Da=c};a.Da=d;a.stopImmediatePropagation=function(){e.stopImmediatePropagation&&
e.stopImmediatePropagation();a.Wa=c;a.stopPropagation()};a.Wa=d;if(a.clientX!=h){g=document.documentElement;var k=document.body;a.pageX=a.clientX+(g&&g.scrollLeft||k&&k.scrollLeft||0)-(g&&g.clientLeft||k&&k.clientLeft||0);a.pageY=a.clientY+(g&&g.scrollTop||k&&k.scrollTop||0)-(g&&g.clientTop||k&&k.clientTop||0)}a.which=a.charCode||a.keyCode;a.button!=h&&(a.button=a.button&1?0:a.button&4?1:a.button&2?2:0)}return a};
s.j=function(a,c){var d=s.Va(a)?s.getData(a):{},e=a.parentNode||a.ownerDocument;"string"===typeof c&&(c={type:c,target:a});c=s.Ra(c);d.H&&d.H.call(a,c);if(e&&!c.Da())s.j(e,c);else if(!e&&!c.Ba()&&(d=s.getData(c.target),c.target[c.type])){d.disabled=f;if("function"===typeof c.target[c.type])c.target[c.type]();d.disabled=j}return!c.Ba()};s.G=function(a,c,d){s.c(a,c,function(){s.z(a,c,arguments.callee);d.apply(this,arguments)})};var v=Object.prototype.hasOwnProperty;
s.i=function(a,c){var d=document.createElement(a||"div"),e;for(e in c)v.call(c,e)&&(-1!==e.indexOf("aria-")||"role"==e?d.setAttribute(e,c[e]):d[e]=c[e]);return d};s.S=function(a){return a.charAt(0).toUpperCase()+a.slice(1)};s.e={};s.e.create=Object.create||function(a){function c(){}c.prototype=a;return new c};s.e.U=function(a,c,d){for(var e in a)v.call(a,e)&&c.call(d||this,e,a[e])};s.e.v=function(a,c){if(!c)return a;for(var d in c)v.call(c,d)&&(a[d]=c[d]);return a};
s.e.Qa=function(a,c){var d,e,g;a=s.e.copy(a);for(d in c)v.call(c,d)&&(e=a[d],g=c[d],a[d]=s.e.Xa(e)&&s.e.Xa(g)?s.e.Qa(e,g):c[d]);return a};s.e.copy=function(a){return s.e.v({},a)};s.e.Xa=function(a){return!!a&&"object"===typeof a&&"[object Object]"===a.toString()&&a.constructor===Object};s.bind=function(a,c,d){function e(){return c.apply(a,arguments)}c.m||(c.m=s.m++);e.m=d?d+"_"+c.m:c.m;return e};s.R={};s.m=1;s.expando="vdata"+(new Date).getTime();
s.getData=function(a){var c=a[s.expando];c||(c=a[s.expando]=s.m++,s.R[c]={});return s.R[c]};s.Va=function(a){a=a[s.expando];return!(!a||s.Ca(s.R[a]))};s.bb=function(a){var c=a[s.expando];if(c){delete s.R[c];try{delete a[s.expando]}catch(d){a.removeAttribute?a.removeAttribute(s.expando):a[s.expando]=h}}};s.Ca=function(a){for(var c in a)if(a[c]!==h)return j;return f};s.t=function(a,c){-1==(" "+a.className+" ").indexOf(" "+c+" ")&&(a.className=""===a.className?c:a.className+" "+c)};
s.B=function(a,c){if(-1!=a.className.indexOf(c)){for(var d=a.className.split(" "),e=d.length-1;0<=e;e--)d[e]===c&&d.splice(e,1);a.className=d.join(" ")}};s.pa=s.i("video");s.D=navigator.userAgent;s.jb=!!s.D.match(/iPhone/i);s.ib=!!s.D.match(/iPad/i);s.kb=!!s.D.match(/iPod/i);s.La=s.jb||s.ib||s.kb;var w=s,x;var z=s.D.match(/OS (\d+)_/i);x=z&&z[1]?z[1]:b;w.Rb=x;s.ma=!!s.D.match(/Android.*AppleWebKit/i);var A=s,B=s.D.match(/Android (\d+)\./i);A.gb=B&&B[1]?B[1]:h;s.hb=function(){return!!s.D.match("Firefox")};
s.ya=function(a){var c={};if(a&&a.attributes&&0<a.attributes.length)for(var d=a.attributes,e,g,k=d.length-1;0<=k;k--){e=d[k].name;g=d[k].value;if("boolean"===typeof a[e]||-1!==",autoplay,controls,loop,muted,default,".indexOf(","+e+","))g=g!==h?f:j;c[e]=g}return c};s.Yb=function(a,c){var d="";document.defaultView&&document.defaultView.getComputedStyle?d=document.defaultView.getComputedStyle(a,"").getPropertyValue(c):a.currentStyle&&(d=a["client"+c.substr(0,1).toUpperCase()+c.substr(1)]+"px");return d};
s.Aa=function(a,c){c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)};s.Ia={};s.p=function(a){0===a.indexOf("#")&&(a=a.slice(1));return document.getElementById(a)};s.Xb=function(a,c){c=c||a;var d=Math.floor(a%60),e=Math.floor(a/60%60),g=Math.floor(a/3600),k=Math.floor(c/60%60),l=Math.floor(c/3600),g=0<g||0<l?g+":":"";return g+(((g||10<=k)&&10>e?"0"+e:e)+":")+(10>d?"0"+d:d)};s.Sb=function(){document.body.focus();document.onselectstart=p(j)};s.dc=function(){document.onselectstart=p(f)};
s.trim=function(a){return a.toString().replace(/^\s+/,"").replace(/\s+$/,"")};s.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)};s.wa=function(a,c){return{length:1,start:function(){return a},end:function(){return c}}};
s.get=function(a,c,d){var e=0===a.indexOf("file:")||0===window.location.href.indexOf("file:")&&-1===a.indexOf("http");"undefined"===typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");});var g=new XMLHttpRequest;try{g.open("GET",a)}catch(k){d(k)}g.onreadystatechange=
function(){4===g.readyState&&(200===g.status||e&&0===g.status?c(g.responseText):d&&d())};try{g.send()}catch(l){d&&d(l)}};s.Jb=function(a){try{var c=window.localStorage||j;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?s.log("LocalStorage Full (VideoJS)",d):18==d.code?s.log("LocalStorage not allowed (VideoJS)",d):s.log("LocalStorage Error (VideoJS)",d)}};s.Ta=function(a){a.match(/^https?:\/\//)||(a=s.i("div",{innerHTML:'<a href="'+a+'">x</a>'}).firstChild.href);return a};
s.log=function(){s.log.history=s.log.history||[];s.log.history.push(arguments);window.console&&window.console.log(Array.prototype.slice.call(arguments))};s.Wb=function(a){var c,d;a.getBoundingClientRect&&a.parentNode&&(c=a.getBoundingClientRect());if(!c)return{left:0,top:0};a=document.documentElement;d=document.body;return{left:c.left+(window.pageXOffset||d.scrollLeft)-(a.clientLeft||d.clientLeft||0),top:c.top+(window.pageYOffset||d.scrollTop)-(a.clientTop||d.clientTop||0)}};
s.b=s.O.extend({s:function(a,c,d){this.d=a;this.f=s.e.copy(this.f);c=this.options(c);this.za=c.id||(c.el&&c.el.id?c.el.id:a.id()+"_component_"+s.m++);this.wb=c.name||h;this.a=c.el||this.i();this.u=[];this.va={};this.Z={};if((a=this.f)&&a.children){var e=this;s.e.U(a.children,function(a,c){c!==j&&!c.loadEvent&&(e[a]=e.Y(a,c))})}this.K(d)}});r=s.b.prototype;
r.q=function(){if(this.u)for(var a=this.u.length-1;0<=a;a--)this.u[a].q&&this.u[a].q();this.Z=this.va=this.u=h;this.z();this.a.parentNode&&this.a.parentNode.removeChild(this.a);s.bb(this.a);this.a=h};r.Fb=n("d");r.options=function(a){return a===b?this.f:this.f=s.e.Qa(this.f,a)};r.i=function(a,c){return s.i(a,c)};r.p=n("a");r.id=n("za");r.name=n("wb");r.children=n("u");
r.Y=function(a,c){var d,e;"string"===typeof a?(e=a,c=c||{},d=c.componentClass||s.S(e),c.name=e,d=new window.videojs[d](this.d||this,c)):d=a;this.u.push(d);"function"===typeof d.id&&(this.va[d.id()]=d);(e=e||d.name&&d.name())&&(this.Z[e]=d);"function"===typeof d.el&&d.el()&&(this.T||this.a).appendChild(d.el());return d};
r.removeChild=function(a){"string"===typeof a&&(a=this.Z[a]);if(a&&this.u){for(var c=j,d=this.u.length-1;0<=d;d--)if(this.u[d]===a){c=f;this.u.splice(d,1);break}c&&(this.va[a.id]=h,this.Z[a.name]=h,(c=a.p())&&c.parentNode===(this.T||this.a)&&(this.T||this.a).removeChild(a.p()))}};r.P=p("");r.c=function(a,c){s.c(this.a,a,s.bind(this,c));return this};r.z=function(a,c){s.z(this.a,a,c);return this};r.G=function(a,c){s.G(this.a,a,s.bind(this,c));return this};r.j=function(a,c){s.j(this.a,a,c);return this};
r.K=function(a){a&&(this.J?a.call(this):(this.ga===b&&(this.ga=[]),this.ga.push(a)));return this};r.ia=function(){this.J=f;var a=this.ga;if(a&&0<a.length){for(var c=0,d=a.length;c<d;c++)a[c].call(this);this.ga=[];this.j("ready")}};r.t=function(a){s.t(this.a,a);return this};r.B=function(a){s.B(this.a,a);return this};r.show=function(){this.a.style.display="block";return this};r.aa=function(){this.a.style.display="none";return this};r.M=function(){this.B("vjs-fade-out");this.t("vjs-fade-in");return this};
r.V=function(){this.B("vjs-fade-in");this.t("vjs-fade-out");return this};r.Ya=function(){this.t("vjs-lock-showing");return this};r.ja=function(){this.B("vjs-lock-showing");return this};r.disable=function(){this.aa();this.show=m();this.M=m()};r.width=function(a,c){return C(this,"width",a,c)};r.height=function(a,c){return C(this,"height",a,c)};r.ob=function(a,c){return this.width(a,f).height(c)};
function C(a,c,d,e){if(d!==b)return a.a.style[c]=-1!==(""+d).indexOf("%")||-1!==(""+d).indexOf("px")?d:"auto"===d?"":d+"px",e||a.j("resize"),a;if(!a.a)return 0;d=a.a.style[c];e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(a.a["offset"+s.S(c)],10)}
s.C=s.b.extend({s:function(a,c){s.b.call(this,a,c);var d=j;this.c("touchstart",function(){d=f});this.c("touchmove",function(){d=j});var e=this;this.c("touchend",function(a){d&&e.A(a);a.preventDefault();a.stopPropagation()});this.c("click",this.A);this.c("focus",this.$a);this.c("blur",this.Za)}});r=s.C.prototype;
r.i=function(a,c){c=s.e.v({className:this.P(),innerHTML:'<div class="vjs-control-content"><span class="vjs-control-text">'+(this.Tb||"Need Text")+"</span></div>",bc:"button","aria-live":"polite",tabIndex:0},c);return s.b.prototype.i.call(this,a,c)};r.P=function(){return"vjs-control "+s.b.prototype.P.call(this)};r.A=m();r.$a=function(){s.c(document,"keyup",s.bind(this,this.ca))};r.ca=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.A()};
r.Za=function(){s.z(document,"keyup",s.bind(this,this.ca))};s.Ma=s.b.extend();function D(a,c){a.Y(c);c.c("click",s.bind(a,function(){this.ja()}))}s.Ma.prototype.i=function(){var a=this.options().Vb||"ul";this.T=s.i(a,{className:"vjs-menu-content"});a=s.b.prototype.i.call(this,"div",{append:this.T,className:"vjs-menu"});a.appendChild(this.T);s.c(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};s.na=s.C.extend({s:function(a,c){s.C.call(this,a,c);this.selected(c.selected)}});
s.na.prototype.i=function(a,c){return s.C.prototype.i.call(this,"li",s.e.v({className:"vjs-menu-item",innerHTML:this.f.label},c))};s.na.prototype.A=function(){this.selected(f)};s.na.prototype.selected=function(a){a?(this.t("vjs-selected"),this.a.setAttribute("aria-selected",f)):(this.B("vjs-selected"),this.a.setAttribute("aria-selected",j))};
s.mb=s.C.extend({s:function(a,c){s.C.call(this,a,c);var d=new s.Ma(this.d);this.options().title&&d.p().appendChild(s.i("li",{className:"vjs-menu-title",innerHTML:s.S(this.Zb),cc:-1}));if(this.I=b)for(var e=0;e<this.I.length;e++)D(d,this.I[e]);this.ba=d;this.Y(this.ba);this.I&&0===this.I.length&&this.aa();this.c("keyup",this.ca);this.a.setAttribute("aria-haspopup",f);this.a.setAttribute("role","button")}});r=s.mb.prototype;r.Q=j;r.P=function(){return this.className+" vjs-menu-button "+s.C.prototype.P.call(this)};
r.$a=m();r.Za=m();r.A=function(){this.G("mouseout",s.bind(this,function(){this.ba.ja();this.a.blur()}));this.Q?E(this):F(this)};r.ca=function(a){a.preventDefault();32==a.which||13==a.which?this.Q?E(this):F(this):27==a.which&&this.Q&&E(this)};function F(a){a.Q=f;a.ba.Ya();a.a.setAttribute("aria-pressed",f);a.I&&0<a.I.length&&a.I[0].p().focus()}function E(a){a.Q=j;a.ba.ja();a.a.setAttribute("aria-pressed",j)}
s.L=s.b.extend({s:function(a,c,d){this.w=a;c=s.e.v(G(a),c);this.l={};this.ab=c.poster;this.$=c.controls;c.customControlsOnMobile!==f&&(s.La||s.ma)?(a.controls=c.controls,this.$=j):a.controls=j;s.b.call(this,this,c,d);this.G("play",function(a){s.j(this.a,{type:"firstplay",target:this.a})||(a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation())});this.c("ended",this.yb);this.c("play",this.Db);this.c("firstplay",this.Ab);this.c("pause",this.Cb);this.c("progress",this.Eb);this.c("durationchange",
this.xb);this.c("error",this.zb);this.c("fullscreenchange",this.Bb);s.da[this.za]=this;c.plugins&&s.e.U(c.plugins,function(a,c){this[a](c)},this)}});r=s.L.prototype;r.f=s.options;r.q=function(){s.da[this.za]=h;this.w&&this.w.player&&(this.w.player=h);this.a&&this.a.player&&(this.a.player=h);clearInterval(this.fa);this.W();this.k&&this.k.q();s.b.prototype.q.call(this)};
function G(a){var c={sources:[],tracks:[]};s.e.v(c,s.ya(a));if(a.hasChildNodes())for(var d,e=a.childNodes,g=0,k=e.length;g<k;g++)a=e[g],d=a.nodeName.toLowerCase(),"source"===d?c.sources.push(s.ya(a)):"track"===d&&c.tracks.push(s.ya(a));return c}
r.i=function(){var a=this.a=s.b.prototype.i.call(this,"div"),c=this.w;c.removeAttribute("width");c.removeAttribute("height");if(c.hasChildNodes())for(var d=c.childNodes.length,e=0,g=c.childNodes;e<d;e++)("source"==g[0].nodeName.toLowerCase()||"track"==g[0].nodeName.toLowerCase())&&c.removeChild(g[0]);c.id=c.id||"vjs_video_"+s.m++;a.id=c.id;a.className=c.className;c.id+="_html5_api";c.className="vjs-tech";c.player=a.player=this;this.t("vjs-paused");this.width(this.f.width,f);this.height(this.f.height,
f);c.parentNode&&c.parentNode.insertBefore(a,c);s.Aa(c,a);return a};
function H(a,c,d){a.k?(a.J=j,a.k.q(),a.Ea&&(a.Ea=j,clearInterval(a.fa)),a.Fa&&I(a),a.k=j):"Html5"!==c&&a.w&&(a.a.removeChild(a.w),a.w.Fb=h,a.w=h);a.X=c;a.J=j;var e=s.e.v({source:d,parentEl:a.a},a.f[c.toLowerCase()]);d&&(d.src==a.l.src&&0<a.l.currentTime&&(e.startTime=a.l.currentTime),a.l.src=d.src);a.k=new window.videojs[c](a,e);a.k.K(function(){this.d.ia();if(!this.r.Ga){var a=this.d;a.Ea=f;a.fa=setInterval(s.bind(a,function(){if(this.l.ra<this.buffered().end(0))this.j("progress");else if(1==(this.duration()?
this.buffered().end(0)/this.duration():0))clearInterval(this.fa),this.j("progress")}),500);a.k.G("progress",function(){this.r.Ga=f;var a=this.d;a.Ea=j;clearInterval(a.fa)})}this.r.Ja||(a=this.d,a.Fa=f,a.c("play",a.eb),a.c("pause",a.W),a.k.G("timeupdate",function(){this.r.Ja=f;I(this.d)}))})}function I(a){a.Fa=j;a.W();a.z("play",a.eb);a.z("pause",a.W)}r.eb=function(){this.Pa&&this.W();this.Pa=setInterval(s.bind(this,function(){this.j("timeupdate")}),250)};r.W=function(){clearInterval(this.Pa)};
r.yb=function(){this.f.loop&&(this.currentTime(0),this.play())};r.Db=function(){s.B(this.a,"vjs-paused");s.t(this.a,"vjs-playing")};r.Ab=function(){this.f.starttime&&this.currentTime(this.f.starttime)};r.Cb=function(){s.B(this.a,"vjs-playing");s.t(this.a,"vjs-paused")};r.Eb=function(){1==(this.duration()?this.buffered().end(0)/this.duration():0)&&this.j("loadedalldata")};r.xb=function(){this.duration(J(this,"duration"))};r.zb=function(a){s.log("Video Error",a)};
r.Bb=function(){this.F?this.t("vjs-fullscreen"):this.B("vjs-fullscreen")};function K(a,c,d){if(a.k&&a.k.J)a.k.K(function(){this[c](d)});else try{a.k[c](d)}catch(e){throw s.log(e),e;}}function J(a,c){if(a.k.J)try{return a.k[c]()}catch(d){throw a.k[c]===b?s.log("Video.js: "+c+" method not defined for "+a.X+" playback technology.",d):"TypeError"==d.name?(s.log("Video.js: "+c+" unavailable on "+a.X+" playback technology element.",d),a.k.J=j):s.log(d),d;}}r.play=function(){K(this,"play");return this};
r.pause=function(){K(this,"pause");return this};r.paused=function(){return J(this,"paused")===j?j:f};r.currentTime=function(a){return a!==b?(this.l.$b=a,K(this,"setCurrentTime",a),this.Fa&&this.j("timeupdate"),this):this.l.currentTime=J(this,"currentTime")||0};r.duration=function(a){return a!==b?(this.l.duration=parseFloat(a),this):this.l.duration};r.buffered=function(){var a=J(this,"buffered"),c=this.l.ra=this.l.ra||0;a&&(0<a.length&&a.end(0)!==c)&&(c=a.end(0),this.l.ra=c);return s.wa(0,c)};
r.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.l.volume=a,K(this,"setVolume",a),s.Jb(a),this;a=parseFloat(J(this,"volume"));return isNaN(a)?1:a};r.muted=function(a){return a!==b?(K(this,"setMuted",a),this):J(this,"muted")||j};r.ha=function(){return J(this,"supportsFullScreen")||j};
r.Ha=function(){var a=s.Ia.Ha;this.F=f;a?(s.c(document,a.xa,s.bind(this,function(c){this.F=document[a.F];this.F===j&&s.z(document,a.xa,arguments.callee);this.j("fullscreenchange")})),this.a[a.cb]()):this.k.ha()?K(this,"enterFullScreen"):(this.ub=f,this.pb=document.documentElement.style.overflow,s.c(document,"keydown",s.bind(this,this.Sa)),document.documentElement.style.overflow="hidden",s.t(document.body,"vjs-full-window"),this.j("enterFullWindow"),this.j("fullscreenchange"));return this};
r.Sa=function(a){if(27===a.keyCode)if(this.F===f)if(a=s.Ia.Ha,this.F=j,a)document[a.ta]();else this.k.ha()?K(this,"exitFullScreen"):(L(this),this.j("fullscreenchange"));else L(this)};function L(a){a.ub=j;s.z(document,"keydown",a.Sa);document.documentElement.style.overflow=a.pb;s.B(document.body,"vjs-full-window");a.j("exitFullWindow")}
r.src=function(a){if(a instanceof Array){var c;a:{c=a;for(var d=0,e=this.f.techOrder;d<e.length;d++){var g=s.S(e[d]),k=window.videojs[g];if(k.isSupported())for(var l=0,t=c;l<t.length;l++){var q=t[l];if(k.canPlaySource(q)){c={source:q,k:g};break a}}}c=j}c?(a=c.source,c=c.k,c==this.X?this.src(a):H(this,c,a)):this.a.appendChild(s.i("p",{innerHTML:'Sorry, no compatible source and playback technology were found for this video. Try using another browser like <a href="http://bit.ly/ccMUEC">Chrome</a> or download the latest <a href="http://adobe.ly/mwfN1">Adobe Flash Player</a>.'}))}else a instanceof
Object?window.videojs[this.X].canPlaySource(a)?this.src(a.src):this.src([a]):(this.l.src=a,this.J?(K(this,"src",a),"auto"==this.f.preload&&this.load(),this.f.autoplay&&this.play()):this.K(function(){this.src(a)}));return this};r.load=function(){K(this,"load");return this};r.currentSrc=function(){return J(this,"currentSrc")||this.l.src||""};r.ea=function(a){return a!==b?(K(this,"setPreload",a),this.f.preload=a,this):J(this,"preload")};
r.autoplay=function(a){return a!==b?(K(this,"setAutoplay",a),this.f.autoplay=a,this):J(this,"autoplay")};r.loop=function(a){return a!==b?(K(this,"setLoop",a),this.f.loop=a,this):J(this,"loop")};r.poster=function(a){a!==b&&(this.ab=a);return this.ab};r.controls=function(a){a!==b&&this.$!==a&&(this.$=!!a,this.j("controlschange"));return this.$};var M,N,O;O=document.createElement("div");N={};
O.Ub!==b?(N.cb="requestFullscreen",N.ta="exitFullscreen",N.xa="fullscreenchange",N.F="fullScreen"):(document.mozCancelFullScreen?(M="moz",N.F=M+"FullScreen"):(M="webkit",N.F=M+"IsFullScreen"),O[M+"RequestFullScreen"]&&(N.cb=M+"RequestFullScreen",N.ta=M+"CancelFullScreen"),N.xa=M+"fullscreenchange");document[N.ta]&&(s.Ia.Ha=N);
s.N=s.b.extend({s:function(a,c){s.b.call(this,a,c);a.controls()||this.disable();a.G("play",s.bind(this,function(){var a,c=s.bind(this,this.M),g=s.bind(this,this.V);this.M();"ontouchstart"in window||(this.d.c("mouseover",c),this.d.c("mouseout",g),this.d.c("pause",s.bind(this,this.Ya)),this.d.c("play",s.bind(this,this.ja)));a=j;this.d.c("touchstart",function(){a=f});this.d.c("touchmove",function(){a=j});this.d.c("touchend",s.bind(this,function(c){var e;a&&(e=this.p().className.search("fade-in"),-1!==
e?this.V():this.M());a=j;this.d.paused()||c.preventDefault()}))}))}});s.N.prototype.f={ac:"play",children:{}};s.N.prototype.i=function(){return s.i("div",{className:"vjs-control-bar"})};s.N.prototype.M=function(){s.b.prototype.M.call(this);this.d.j("controlsvisible")};s.N.prototype.V=function(){s.b.prototype.V.call(this);this.d.j("controlshidden")};s.o=s.b.extend({s:function(a,c,d){s.b.call(this,a,c,d)}});s.o.prototype.A=s.ma?m():function(){this.d.controls()&&(this.d.paused()?this.d.play():this.d.pause())};
s.o.prototype.r={Ob:f,tb:j,Ga:j,Ja:j};s.media={};s.media.ka="play pause paused currentTime setCurrentTime duration buffered volume setVolume muted setMuted width height supportsFullScreen enterFullScreen src load currentSrc preload setPreload autoplay setAutoplay loop setLoop error networkState readyState seeking initialTime startOffsetTime played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks defaultPlaybackRate playbackRate mediaGroup controller controls defaultMuted".split(" ");
function P(){var a=s.media.ka[i];return function(){throw Error('The "'+a+"\" method is not available on the playback technology's API");}}for(var i=s.media.ka.length-1;0<=i;i--)s.o.prototype[s.media.ka[i]]=P();
s.h=s.o.extend({s:function(a,c,d){this.r.Ob=s.h.nb();this.r.vb=!s.La;this.r.tb=f;s.o.call(this,a,c,d);(c=c.source)&&this.a.currentSrc==c.src?a.j("loadstart"):c&&(this.a.src=c.src);a.K(function(){this.f.autoplay&&this.paused()&&(this.w.poster=h,this.play())});this.c("click",this.A);for(a=s.h.la.length-1;0<=a;a--)s.c(this.a,s.h.la[a],s.bind(this.d,this.rb));this.ia()}});r=s.h.prototype;r.q=function(){s.o.prototype.q.call(this)};
r.i=function(){var a=this.d,c=a.w;if(!c||this.r.vb===j)c?(c.player=h,a.w=h,a.p().removeChild(c),c=c.cloneNode(j)):c=s.i("video",{id:a.id()+"_html5_api",className:"vjs-tech"}),c.player=a,s.Aa(c,a.p());for(var d=["autoplay","preload","loop","muted"],e=d.length-1;0<=e;e--){var g=d[e];a.f[g]!==h&&(c[g]=a.f[g])}return c};r.rb=function(a){this.j(a);a.stopPropagation()};r.play=function(){this.a.play()};r.pause=function(){this.a.pause()};r.paused=function(){return this.a.paused};r.currentTime=function(){return this.a.currentTime};
r.Ib=function(a){try{this.a.currentTime=a}catch(c){s.log(c,"Video is not ready. (Video.js)")}};r.duration=function(){return this.a.duration||0};r.buffered=function(){return this.a.buffered};r.volume=function(){return this.a.volume};r.Nb=function(a){this.a.volume=a};r.muted=function(){return this.a.muted};r.Lb=function(a){this.a.muted=a};r.width=function(){return this.a.offsetWidth};r.height=function(){return this.a.offsetHeight};
r.ha=function(){return"function"==typeof this.a.webkitEnterFullScreen&&(/Android/.test(s.D)||!/Chrome|Mac OS X 10.5/.test(s.D))?f:j};r.src=function(a){this.a.src=a};r.load=function(){this.a.load()};r.currentSrc=function(){return this.a.currentSrc};r.ea=function(){return this.a.ea};r.Mb=function(a){this.a.ea=a};r.autoplay=function(){return this.a.autoplay};r.Hb=function(a){this.a.autoplay=a};r.loop=function(){return this.a.loop};r.Kb=function(a){this.a.loop=a};s.h.isSupported=function(){return!!document.createElement("video").canPlayType};
s.h.sa=function(a){return!!document.createElement("video").canPlayType(a.type)};s.h.nb=function(){var a=s.pa.volume;s.pa.volume=a/2+0.1;return a!==s.pa.volume};s.h.la="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");
s.ma&&3>s.gb&&(document.createElement("video").constructor.prototype.canPlayType=function(a){return a&&-1!=a.toLowerCase().indexOf("video/mp4")?"maybe":""});
s.g=s.o.extend({s:function(a,c,d){s.o.call(this,a,c,d);d=c.source;var e=c.parentEl,g=this.a=s.i("div",{id:a.id()+"_temp_flash"}),k=a.id()+"_flash_api";a=a.f;var l=s.e.v({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:a.autoplay,preload:a.ea,loop:a.loop,muted:a.muted},c.flashVars),t=s.e.v({wmode:"opaque",bgcolor:"#000000"},c.params),q=s.e.v({id:k,name:k,"class":"vjs-tech"},c.attributes);d&&(l.src=encodeURIComponent(s.Ta(d.src)));
s.Aa(g,e);c.startTime&&this.K(function(){this.load();this.play();this.currentTime(c.startTime)});if(c.iFrameMode===f&&!s.hb){var y=s.i("iframe",{id:k+"_iframe",name:k+"_iframe",className:"vjs-tech",scrolling:"no",marginWidth:0,marginHeight:0,frameBorder:0});l.readyFunction="ready";l.eventProxyFunction="events";l.errorEventProxyFunction="errors";s.c(y,"load",s.bind(this,function(){var a,d=y.contentWindow;a=y.contentDocument?y.contentDocument:y.contentWindow.document;a.write(s.g.Ua(c.swf,l,t,q));d.player=
this.d;d.ready=s.bind(this.d,function(c){c=a.getElementById(c);var d=this.k;d.a=c;s.c(c,"click",d.bind(d.A));s.g.ua(d)});d.events=s.bind(this.d,function(a,c){this&&"flash"===this.X&&this.j(c)});d.errors=s.bind(this.d,function(a,c){s.log("Flash Error",c)})}));g.parentNode.replaceChild(y,g)}else s.g.qb(c.swf,g,l,t,q)}});r=s.g.prototype;r.q=function(){s.o.prototype.q.call(this)};r.play=function(){this.a.vjs_play()};r.pause=function(){this.a.vjs_pause()};
r.src=function(a){a=s.Ta(a);this.a.vjs_src(a);if(this.d.autoplay()){var c=this;setTimeout(function(){c.play()},0)}};r.load=function(){this.a.vjs_load()};r.poster=function(){this.a.vjs_getProperty("poster")};r.buffered=function(){return s.wa(0,this.a.vjs_getProperty("buffered"))};r.ha=p(j);var Q=s.g.prototype,R="preload currentTime defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "),S="error currentSrc networkState readyState seeking initialTime duration startOffsetTime paused played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks".split(" ");
function T(){var a=R[U],c=a.charAt(0).toUpperCase()+a.slice(1);Q["set"+c]=function(c){return this.a.vjs_setProperty(a,c)}}function V(a){Q[a]=function(){return this.a.vjs_getProperty(a)}}var U;for(U=0;U<R.length;U++)V(R[U]),T();for(U=0;U<S.length;U++)V(S[U]);s.g.isSupported=function(){return 10<=s.g.version()[0]};s.g.sa=function(a){if(a.type in s.g.sb)return"maybe"};s.g.sb={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};
s.g.onReady=function(a){a=s.p(a);var c=a.player||a.parentNode.player,d=c.k;a.player=c;d.a=a;d.c("click",d.A);s.g.ua(d)};s.g.ua=function(a){a.p().vjs_getProperty?a.ia():setTimeout(function(){s.g.ua(a)},50)};s.g.onEvent=function(a,c){s.p(a).player.j(c)};s.g.onError=function(a,c){s.p(a).player.j("error");s.log("Flash Error",c,a)};
s.g.version=function(){var a="0,0,0";try{a=(new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(c){try{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(d){}}return a.split(",")};
s.g.qb=function(a,c,d,e,g){a=s.g.Ua(a,d,e,g);a=s.i("div",{innerHTML:a}).childNodes[0];d=c.parentNode;c.parentNode.replaceChild(a,c);var k=d.childNodes[0];setTimeout(function(){k.style.display="block"},1E3)};
s.g.Ua=function(a,c,d,e){var g="",k="",l="";c&&s.e.U(c,function(a,c){g+=a+"="+c+"&"});d=s.e.v({movie:a,flashvars:g,allowScriptAccess:"always",allowNetworking:"all"},d);s.e.U(d,function(a,c){k+='<param name="'+a+'" value="'+c+'" />'});e=s.e.v({data:a,width:"100%",height:"100%"},e);s.e.U(e,function(a,c){l+=a+'="'+c+'" '});return'<object type="application/x-shockwave-flash"'+l+">"+k+"</object>"};
s.lb=s.b.extend({s:function(a,c,d){s.b.call(this,a,c,d);if(!a.f.sources||0===a.f.sources.length){c=0;for(d=a.f.techOrder;c<d.length;c++){var e=s.S(d[c]),g=window.videojs[e];if(g&&g.isSupported()){H(a,e);break}}}else a.src(a.f.sources)}});
if("undefined"!==typeof window.JSON&&"function"===window.JSON.parse)s.JSON=window.JSON;else{s.JSON={};var W=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;s.JSON.parse=function(a,c){function d(a,e){var l,t,q=a[e];if(q&&"object"===typeof q)for(l in q)Object.prototype.hasOwnProperty.call(q,l)&&(t=d(q,l),t!==b?q[l]=t:delete q[l]);return c.call(a,e,q)}var e;a=String(a);W.lastIndex=0;W.test(a)&&(a=a.replace(W,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));
if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof c?d({"":e},""):e;throw new SyntaxError("JSON.parse(): invalid or malformed JSON data");}}
s.Na=function(){var a,c,d=document.getElementsByTagName("video");if(d&&0<d.length)for(var e=0,g=d.length;e<g;e++)if((c=d[e])&&c.getAttribute)c.player===b&&(a=c.getAttribute("data-setup"),a!==h&&(a=s.JSON.parse(a||"{}"),u(c,a)));else{s.qa();break}else s.Pb||s.qa()};s.qa=function(){setTimeout(s.Na,1)};s.G(window,"load",function(){s.Pb=f});s.qa();s.oa=s.C.extend({s:function(a,c){s.C.call(this,a,c);(!a.poster()||!a.controls())&&this.aa();a.c("play",s.bind(this,this.V))}});
s.oa.prototype.i=function(){var a=s.i("div",{className:"vjs-poster",tabIndex:-1}),c=this.d.poster();c&&("backgroundSize"in a.style?a.style.backgroundImage='url("'+c+'")':a.appendChild(s.i("img",{src:c})));return a};s.oa.prototype.A=function(){this.d.play()};s.Gb=function(a,c){s.L.prototype[a]=c};var X=this;X.Qb=f;function Y(a,c){var d=a.split("."),e=X;!(d[0]in e)&&e.execScript&&e.execScript("var "+d[0]);for(var g;d.length&&(g=d.shift());)!d.length&&c!==b?e[g]=c:e=e[g]?e[g]:e[g]={}};Y("videojs",s);Y("_V_",s);Y("videojs.options",s.options);Y("videojs.cache",s.R);Y("videojs.Component",s.b);s.b.prototype.dispose=s.b.prototype.q;s.b.prototype.createEl=s.b.prototype.i;s.b.prototype.el=s.b.prototype.p;s.b.prototype.addChild=s.b.prototype.Y;s.b.prototype.children=s.b.prototype.children;s.b.prototype.on=s.b.prototype.c;s.b.prototype.off=s.b.prototype.z;s.b.prototype.one=s.b.prototype.G;s.b.prototype.trigger=s.b.prototype.j;s.b.prototype.triggerReady=s.b.prototype.ia;
s.b.prototype.show=s.b.prototype.show;s.b.prototype.hide=s.b.prototype.aa;s.b.prototype.width=s.b.prototype.width;s.b.prototype.height=s.b.prototype.height;s.b.prototype.dimensions=s.b.prototype.ob;s.b.prototype.ready=s.b.prototype.K;Y("videojs.Player",s.L);s.L.prototype.dispose=s.L.prototype.q;Y("videojs.MediaLoader",s.lb);Y("videojs.ControlBar",s.N);Y("videojs.PosterImage",s.oa);Y("videojs.MediaTechController",s.o);s.o.prototype.r.progressEvents=s.o.prototype.r.Ga;
s.o.prototype.r.timeupdateEvents=s.o.prototype.r.Ja;Y("videojs.Html5",s.h);s.h.Events=s.h.la;s.h.isSupported=s.h.isSupported;s.h.canPlaySource=s.h.sa;s.h.prototype.setCurrentTime=s.h.prototype.Ib;s.h.prototype.setVolume=s.h.prototype.Nb;s.h.prototype.setMuted=s.h.prototype.Lb;s.h.prototype.setPreload=s.h.prototype.Mb;s.h.prototype.setAutoplay=s.h.prototype.Hb;s.h.prototype.setLoop=s.h.prototype.Kb;Y("videojs.Flash",s.g);s.g.isSupported=s.g.isSupported;s.g.canPlaySource=s.g.sa;s.g.onReady=s.g.onReady;
Y("videojs.autoSetup",s.Na);Y("videojs.plugin",s.Gb);Y("videojs.createTimeRange",s.wa);})();//@ sourceMappingURL=video.js.map