From 70fbf7fc8a49b1acc927eda9ac98530bd0661007 Mon Sep 17 00:00:00 2001 From: Steve Heffernan Date: Thu, 17 Jan 2013 20:33:53 -0500 Subject: [PATCH] Updated events to support event.stopImmediatePropagation(). Added a first play event. --- .jshintrc | 3 +- src/js/component.js | 6 +- src/js/events.js | 19 ++-- src/js/exports.js | 1 - src/js/media.flash.js | 3 + src/js/media.html5.js | 21 ++-- src/js/player.js | 42 +++++++- test/index.html | 1 + test/unit/component.js | 27 +++-- test/unit/events.js | 17 ++++ test/unit/mediafaker.js | 33 ++++++ test/unit/player.js | 32 +++++- test/video.test.js | 219 ++++++++++++++++++++-------------------- 13 files changed, 274 insertions(+), 150 deletions(-) create mode 100644 test/unit/mediafaker.js diff --git a/.jshintrc b/.jshintrc index 4835fca2b..12ee76612 100644 --- a/.jshintrc +++ b/.jshintrc @@ -15,6 +15,7 @@ "_V_", "videojs", "vjs", - "goog" + "goog", + "console" ] } diff --git a/src/js/component.js b/src/js/component.js index 464453bd5..cae7edcb9 100644 --- a/src/js/component.js +++ b/src/js/component.js @@ -21,12 +21,12 @@ vjs.Component = function(player, options, ready){ options = this.options = this.mergeOptions(this.options, options); // Get ID from options, element, or create using player ID and unique ID - this.id_ = options.id || ((options.el && options.el.id) ? options.el.id : player.id + '_component_' + vjs.guid++ ); + this.id_ = options['id'] || ((options['el'] && options['el']['id']) ? options['el']['id'] : player.id() + '_component_' + vjs.guid++ ); - this.name_ = options.name || null; + this.name_ = options['name'] || null; // Create element if one wasn't provided in potions - this.el_ = (options.el) ? options.el : this.createEl(); + this.el_ = options['el'] || this.createEl(); this.children_ = []; this.childIndex_ = {}; diff --git a/src/js/events.js b/src/js/events.js index 56b8c696d..0b8b88754 100644 --- a/src/js/events.js +++ b/src/js/events.js @@ -40,18 +40,16 @@ vjs.on = function(elem, type, fn){ var handlers = data.handlers[event.type]; - /* Was making a copy of handlers to protect - * against removal of listeners mid loop. - * Removing for v4 to test if we still need it. */ - // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off. if (handlers) { - var handlersCopy = []; - for (var i = 0, j = handlers.length; i < j; i++) { - handlersCopy[i] = handlers[i]; - } + // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off. + var handlersCopy = handlers.slice(0); for (var m = 0, n = handlersCopy.length; m < n; m++) { - handlersCopy[m].call(elem, event); + if (event.isImmediatePropagationStopped()) { + break; + } else { + handlersCopy[m].call(elem, event); + } } } }; @@ -286,6 +284,9 @@ vjs.trigger = function(elem, event) { targetData.disabled = false; } } + + // Inform the triggerer if the default was prevented by returning false + return !event.isDefaultPrevented(); /* Original version of js ninja events wasn't complete. * We've since updated to the latest version, but keeping this around * for now just in case. diff --git a/src/js/exports.js b/src/js/exports.js index a80b73778..5663eea19 100644 --- a/src/js/exports.js +++ b/src/js/exports.js @@ -116,7 +116,6 @@ goog.exportProperty(vjs.Html5.prototype, 'setAutoplay', vjs.Html5.prototype.setA goog.exportProperty(vjs.Html5.prototype, 'setLoop', vjs.Html5.prototype.setLoop); goog.exportSymbol('videojs.Flash', vjs.Flash); -goog.exportProperty(vjs.Flash, 'Events', vjs.Flash.Events); goog.exportProperty(vjs.Flash, 'isSupported', vjs.Flash.isSupported); goog.exportProperty(vjs.Flash, 'canPlaySource', vjs.Flash.canPlaySource); goog.exportProperty(vjs.Flash, 'onReady', vjs.Flash['onReady']); diff --git a/src/js/media.flash.js b/src/js/media.flash.js index d4af14b15..4c2985b97 100644 --- a/src/js/media.flash.js +++ b/src/js/media.flash.js @@ -369,6 +369,9 @@ vjs.Flash.checkReady = function(tech){ // Trigger events from the swf on the player vjs.Flash['onEvent'] = function(swfID, eventName){ + // Triggering play in the play method to allow for preventDefault + if (eventName === 'play') return; + var player = vjs.el(swfID)['player']; player.trigger(eventName); }; diff --git a/src/js/media.html5.js b/src/js/media.html5.js index 5e4ca79b9..d5afab48a 100644 --- a/src/js/media.html5.js +++ b/src/js/media.html5.js @@ -48,9 +48,6 @@ vjs.Html5 = function(player, options, ready){ goog.inherits(vjs.Html5, vjs.MediaTechController); vjs.Html5.prototype.dispose = function(){ - // this.player_.tag = false; - this.removeTriggers(); - goog.base(this, 'dispose'); }; @@ -71,12 +68,12 @@ vjs.Html5.prototype.createEl = function(){ } newEl = vjs.createElement('video', { - id: el.id || player.id + '_html5_api', + id: el.id || player.id() + '_html5_api', className: el.className || 'vjs-tech' }); el = newEl; - vjs.insertFirst(el, player.el); + vjs.insertFirst(el, player.el()); } // Update specific tag settings, in case they were overridden @@ -99,15 +96,15 @@ vjs.Html5.prototype.setupTriggers = function(){ vjs.on(this.el_, vjs.Html5.Events[i], vjs.bind(this.player_, this.eventHandler)); } }; -vjs.Html5.prototype.removeTriggers = function(){ - for (var i = vjs.Html5.Events.length - 1; i >= 0; i--) { - vjs.off(this.el_, vjs.Html5.Events[i], vjs.bind(this.player_, this.eventHandler)); - } - // console.log('removeTriggers', vjs.getData(this.el_)); -}; +// Triggers removed using this.off when disposed + vjs.Html5.prototype.eventHandler = function(e){ - // console.log('eventHandler', e.type, e, this.el_) + // We'll be triggring play ourselves, thank you. + if (e.type === 'play') return; + this.trigger(e); + + // No need for media events to bubble up. e.stopPropagation(); }; diff --git a/src/js/player.js b/src/js/player.js index 1133c016d..a3cc330f1 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -30,6 +30,20 @@ vjs.Player = function(tag, options, ready){ // Inits and embeds any child components in opts vjs.Component.call(this, this, opts, ready); + // Firstplay event implimentation. Not sold on the event yet. + // Could probably just check currentTime==0? + this.one('play', function(e){ + var fpEvent = { type: 'firstplay', target: this.el_ }; + // Using vjs.trigger so we can check if default was prevented + var keepGoing = vjs.trigger(this.el_, fpEvent); + + if (!keepGoing) { + e.preventDefault(); + e.stopPropagation(); + e.stopImmediatePropagation(); + } + }); + this.on('ended', this.onEnded); this.on('play', this.onPlay); this.on('pause', this.onPause); @@ -52,7 +66,7 @@ vjs.Player.prototype.dispose = function(){ // Ensure that tracking progress and time progress will stop and plater deleted this.stopTrackingProgress(); - // this.stopTrackingCurrentTime(); + this.stopTrackingCurrentTime(); if (this.tech) { this.tech.dispose(); } @@ -361,7 +375,7 @@ vjs.Player.prototype.getCache = function(){ // Pass values to the playback tech vjs.Player.prototype.techCall = function(method, arg){ // If it's not ready yet, call method when it is - if (!this.tech.isReady_) { + if (this.tech && this.tech.isReady_) { this.tech.ready(function(){ this[method](arg); }); @@ -379,7 +393,11 @@ vjs.Player.prototype.techCall = function(method, arg){ // Get calls can't wait for the tech, and sometimes don't need to. vjs.Player.prototype.techGet = function(method){ - // Make sure tech is ready + // Make sure there is a tech + // if (!this.tech) { + // return; + // } + if (this.tech.isReady_) { // Flash likes to die and reload when you hide or reposition it. @@ -410,9 +428,23 @@ vjs.Player.prototype.techGet = function(method){ return; }; -// http://dev.w3.org/html5/spec/video.html#dom-media-play +/** + * Start media playback + * http://dev.w3.org/html5/spec/video.html#dom-media-play + * We're triggering the 'play' event here instead of relying on the + * media element to allow using event.preventDefault() to stop + * play from happening if desired. Usecase: preroll ads. + */ vjs.Player.prototype.play = function(){ - this.techCall('play'); + // Create an event object so we can check for preventDefault after + var e = { type: 'play', target: this.el_ }; + + this.trigger(e); + + if (!e.isDefaultPrevented()) { + this.techCall('play'); + } + return this; }; diff --git a/test/index.html b/test/index.html index 9d97c9a5b..1e6970307 100644 --- a/test/index.html +++ b/test/index.html @@ -21,6 +21,7 @@ 'test/unit/lib.js', 'test/unit/events.js', 'test/unit/component.js', + 'test/unit/mediafaker.js', 'test/unit/player.js', 'test/unit/core.js', 'test/unit/media.html5.js' diff --git a/test/unit/component.js b/test/unit/component.js index e57d95a3e..f2d098137 100644 --- a/test/unit/component.js +++ b/test/unit/component.js @@ -1,13 +1,20 @@ module("Component"); +var getFakePlayer = function(){ + return { + // Fake player requries an ID + id: function(){ return 'player_1'; } + } +}; + test('should create an element', function(){ - var comp = new vjs.Component({}, {}); + var comp = new vjs.Component(getFakePlayer(), {}); ok(comp.el().nodeName); }); test('should add a child component', function(){ - var comp = new vjs.Component({}); + var comp = new vjs.Component(getFakePlayer()); var child = comp.addChild("component"); @@ -19,7 +26,7 @@ test('should add a child component', function(){ }); test('should init child coponents from options', function(){ - var comp = new vjs.Component({}, { + var comp = new vjs.Component(getFakePlayer(), { children: { 'component': true } @@ -58,7 +65,7 @@ test('should do a deep merge of child options', function(){ }); test('should dispose of component and children', function(){ - var comp = new vjs.Component({}); + var comp = new vjs.Component(getFakePlayer()); // Add a child var child = comp.addChild("Component"); @@ -80,7 +87,7 @@ test('should dispose of component and children', function(){ }); test('should add and remove event listeners to element', function(){ - var comp = new vjs.Component({}, {}); + var comp = new vjs.Component(getFakePlayer(), {}); // No need to make this async because we're triggering events inline. // We're going to trigger the event after removing the listener, @@ -99,7 +106,7 @@ test('should add and remove event listeners to element', function(){ }); test('should trigger a listener once using one()', function(){ - var comp = new vjs.Component({}, {}); + var comp = new vjs.Component(getFakePlayer(), {}); expect(1); @@ -122,7 +129,7 @@ test('should trigger a listener when ready', function(){ ok(true, 'ready method listener fired') }; - var comp = new vjs.Component({}, {}, optionsReadyListener); + var comp = new vjs.Component(getFakePlayer(), {}, optionsReadyListener); comp.triggerReady(); @@ -133,7 +140,7 @@ test('should trigger a listener when ready', function(){ }); test('should add and remove a CSS class', function(){ - var comp = new vjs.Component({}, {}); + var comp = new vjs.Component(getFakePlayer(), {}); comp.addClass('test-class'); ok(comp.el().className.indexOf('test-class') !== -1); @@ -142,7 +149,7 @@ test('should add and remove a CSS class', function(){ }); test('should show and hide an element', function(){ - var comp = new vjs.Component({}, {}); + var comp = new vjs.Component(getFakePlayer(), {}); comp.hide(); ok(comp.el().style.display === 'none'); @@ -152,7 +159,7 @@ test('should show and hide an element', function(){ test('should change the width and height of a component', function(){ var container = document.createElement('div'); - var comp = new vjs.Component({}, {}); + var comp = new vjs.Component(getFakePlayer(), {}); var el = comp.el(); var fixture = document.getElementById('qunit-fixture'); diff --git a/test/unit/events.js b/test/unit/events.js index 71bd048ab..ea930eafe 100644 --- a/test/unit/events.js +++ b/test/unit/events.js @@ -72,3 +72,20 @@ test('should listen only once', function(){ vjs.trigger(el, 'click'); // 1 click vjs.trigger(el, 'click'); // No click should happen. }); + +test('should stop immediate propagtion', function(){ + expect(1); + + var el = document.createElement('div'); + + vjs.on(el, 'test', function(e){ + ok(true, 'First listener fired'); + e.stopImmediatePropagation(); + }); + + vjs.on(el, 'test', function(e){ + ok(false, 'Second listener fired'); + }); + + vjs.trigger(el, 'test'); +}); diff --git a/test/unit/mediafaker.js b/test/unit/mediafaker.js new file mode 100644 index 000000000..332623f17 --- /dev/null +++ b/test/unit/mediafaker.js @@ -0,0 +1,33 @@ +// Fake a media playback tech controller so that player tests +// can run without HTML5 or Flash, of which PhantomJS supports neither. + +vjs.MediaFaker = function(player, options, onReady){ + goog.base(this, player, options, onReady); + + this.triggerReady(); +}; +goog.inherits(vjs.MediaFaker, vjs.MediaTechController); + +// Support everything +vjs.MediaFaker.isSupported = function(){ return true; }; +vjs.MediaFaker.canPlaySource = function(srcObj){ return true; }; +vjs.MediaFaker.prototype.features = { + progressEvents: true, + timeupdateEvents: true +}; +vjs.MediaFaker.prototype.createEl = function(){ + var el = goog.base(this, 'createEl', 'div', { + className: 'vjs-tech' + }); + + vjs.insertFirst(el, this.player_.el()); + + return el; +}; + +vjs.MediaFaker.prototype.currentTime = function(){ return 0; }; +vjs.MediaFaker.prototype.volume = function(){ return 0; }; + +goog.exportSymbol('videojs.MediaFaker', vjs.MediaFaker); +goog.exportProperty(vjs.MediaFaker, 'isSupported', vjs.MediaFaker.isSupported); +goog.exportProperty(vjs.MediaFaker, 'canPlaySource', vjs.MediaFaker.canPlaySource); \ No newline at end of file diff --git a/test/unit/player.js b/test/unit/player.js index 9174480d2..6a2020d16 100644 --- a/test/unit/player.js +++ b/test/unit/player.js @@ -13,7 +13,11 @@ var PlayerTest = { var fixture = document.getElementById('qunit-fixture'); fixture.appendChild(videoTag); - return player = new vjs.Player(videoTag, playerOptions); + var opts = vjs.merge({ + 'techOrder': ['mediaFaker'] + }, playerOptions); + + return player = new vjs.Player(videoTag, opts); } }; @@ -181,3 +185,29 @@ test('should load a media controller', function(){ player.dispose(); }); + +test('should not play if firstplay event prevents default', function(){ + expect(1); + var player = PlayerTest.makePlayer({ + 'preload': 'none', + 'autoplay': false, + 'sources': [ + { 'src': "http://google.com", 'type': 'video/mp4' }, + { 'src': "http://google.com", 'type': 'video/webm' } + ] + }); + + player.on('firstplay', function(e){ + ok(true, 'firstplay triggered'); + + e.preventDefault(); + }); + + player.on('play', function(){ + ok(false, 'play triggered anyway') + }); + + player.play(); + + player.dispose(); +}); diff --git a/test/video.test.js b/test/video.test.js index 899c479d1..8ed887e53 100644 --- a/test/video.test.js +++ b/test/video.test.js @@ -1,119 +1,122 @@ -(function() {var c=void 0,f=!0,h=null,k=!1;function l(a){return function(){return this[a]}}function m(a){return function(){return a}}var n,aa=this;aa.Yb=f;function s(a,b){var d=a.split("."),e=aa;!(d[0]in e)&&e.execScript&&e.execScript("var "+d[0]);for(var g;d.length&&(g=d.shift());)!d.length&&b!==c?e[g]=b:e=e[g]?e[g]:e[g]={}}function t(a,b){function d(){}d.prototype=b.prototype;a.h=b.prototype;a.prototype=new d;a.prototype.constructor=a};document.createElement("video");document.createElement("audio");function u(a,b,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(u.O[a])return u.O[a];a=u.f(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new v(a,b,d)}var x=u; -u.options={techOrder:["html5","flash"],html5:{},flash:{rc:"http://vjs.zencdn.net/c/video-js.swf"},width:300,height:150,defaultVolume:0,children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{}}};u.O={};u.hc={};u.e=function(a,b,d){var e=u.getData(a);e.q||(e.q={});e.q[b]||(e.q[b]=[]);d.p||(d.p=u.p++);e.q[b].push(d);e.I||(e.disabled=k,e.I=function(b){if(!e.disabled){b=u.Ta(b);var d=e.q[b.type];if(d){for(var j=[],r=0,q=d.length;re?"0"+e:e)+":")+(10>d?"0"+d:d)};u.tb=function(){document.body.focus();document.onselectstart=m(k)};u.Ub=function(){document.onselectstart=m(f)};u.trim=function(a){return a.toString().replace(/^\s+/,"").replace(/\s+$/,"")};u.round=function(a,b){b||(b=0);return Math.round(a*Math.pow(10,b))/Math.pow(10,b)}; -u.xa=function(a){return{length:1,start:m(0),end:function(){return a}}}; +u.g=function(a,b){var d=u.$a(a)?u.getData(a):{},e=a.parentNode||a.ownerDocument;"string"===typeof b&&(b={type:b,target:a});b=u.Wa(b);d.J&&d.J.call(a,b);if(e&&!b.Ea())u.g(e,b);else if(!e&&!b.ka()&&(d=u.getData(b.target),b.target[b.type])){d.disabled=f;if("function"===typeof b.target[b.type])b.target[b.type]();d.disabled=j}return!b.ka()};u.z=function(a,b,d){u.e(a,b,function(){u.j(a,b,arguments.callee);d.apply(this,arguments)})};u.hc={};u.d=function(a,b){var d=document.createElement(a||"div"),e;for(e in b)b.hasOwnProperty(e)&&(d[e]=b[e]);return d};u.I=function(a){return a.charAt(0).toUpperCase()+a.slice(1)};u.T=function(a,b){if(a)for(var d in a)a.hasOwnProperty(d)&&b.call(this,d,a[d])};u.s=function(a,b){if(!b)return a;for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);return a};u.bind=function(a,b,d){function e(){return b.apply(a,arguments)}b.p||(b.p=u.p++);e.p=d?d+"_"+b.p:b.p;return e};u.M={};u.p=1;u.expando="vdata"+(new Date).getTime(); +u.getData=function(a){var b=a[u.expando];b||(b=a[u.expando]=u.p++,u.M[b]={});return u.M[b]};u.$a=function(a){a=a[u.expando];return!(!a||u.la(u.M[a]))};u.Oa=function(a){var b=a[u.expando];if(b){delete u.M[b];try{delete a[u.expando]}catch(d){a.removeAttribute?a.removeAttribute(u.expando):a[u.expando]=h}}};u.la=function(a){for(var b in a)if(a[b]!==h)return j;return f};u.m=function(a,b){-1==(" "+a.className+" ").indexOf(" "+b+" ")&&(a.className=""===a.className?b:a.className+" "+b)}; +u.u=function(a,b){if(-1!=a.className.indexOf(b)){var d=a.className.split(" ");d.splice(d.indexOf(b),1);a.className=d.join(" ")}};u.qb=u.d("video");u.B=navigator.userAgent;u.ob=!!u.B.match(/iPad/i);u.nb=!!u.B.match(/iPhone/i);u.pb=!!u.B.match(/iPod/i);u.mb=u.ob||u.nb||u.pb;var ba=u,ca;var da=u.B.match(/OS (\d+)_/i);ca=da&&da[1]?da[1]:c;ba.ac=ca;u.kb=!!u.B.match(/Android.*AppleWebKit/i);var ea=u,fa=u.B.match(/Android (\d+)\./i);ea.jb=fa&&fa[1]?fa[1]:h;u.lb=function(){return!!u.B.match("Firefox")}; +u.N=function(a){var b={};if(a&&a.attributes&&0e?"0"+e:e)+":")+(10>d?"0"+d:d)};u.ub=function(){document.body.focus();document.onselectstart=m(j)};u.Wb=function(){document.onselectstart=m(f)};u.trim=function(a){return a.toString().replace(/^\s+/,"").replace(/\s+$/,"")};u.round=function(a,b){b||(b=0);return Math.round(a*Math.pow(10,b))/Math.pow(10,b)}; +u.za=function(a){return{length:1,start:m(0),end:function(){return a}}}; u.get=function(a,b,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(b){}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(p){d(p)}g.onreadystatechange= -function(){4===g.readyState&&(200===g.status||e&&0===g.status?b(g.responseText):d&&d())};try{g.send()}catch(j){d&&d(j)}};u.Pb=function(a){var b=window.localStorage||k;if(b)try{b.volume=a}catch(d){22==d.code||1014==d.code?u.log("LocalStorage Full (VideoJS)",d):u.log("LocalStorage Error (VideoJS)",d)}};u.ha=function(a){a.match(/^https?:\/\//)||(a=u.d("div",{innerHTML:'x'}).firstChild.href);return a}; -u.log=function(){u.log.history=u.log.history||[];u.log.history.push(arguments);window.console&&window.console.log(Array.prototype.slice.call(arguments))};u.yb="getBoundingClientRect"in document.documentElement?function(a){var b;try{b=a.getBoundingClientRect()}catch(d){}if(!b)return 0;a=document.body;return b.left+(window.pageXOffset||a.scrollLeft)-(document.documentElement.clientLeft||a.clientLeft||0)}:function(a){for(var b=a.offsetLeft;a=a.offsetParent;)b+=a.offsetLeft;return b};function y(a,b,d){this.a=a;b=this.options=ga(this,this.options,b);this.J=b.id||(b.f&&b.f.id?b.f.id:a.id+"_component_"+u.p++);this.Fb=b.name||h;this.b=b.f?b.f:this.d();this.B=[];this.fa={};this.D={};if((a=this.options)&&a.children){var e=this;u.S(a.children,function(a,b){b!==k&&!b.Db&&(e[a]=e.C(a,b))})}z(this,d)}n=y.prototype; -n.l=function(){if(this.B)for(var a=this.B.length-1;0<=a;a--)this.B[a].l();this.D=this.fa=this.B=h;this.j();this.b.parentNode&&this.b.parentNode.removeChild(this.b);u.La(this.b);this.b=h};function ga(a,b,d){var e,g,p,j,r;p=Object.prototype.hasOwnProperty;g=Object.prototype.toString;b=b||{};e={};u.S(b,function(a,b){e[a]=b});if(!d)return e;for(j in d)p.call(d,j)&&(b=e[j],r=d[j],e[j]="[object Object]"===g.call(b)&&"[object Object]"===g.call(r)?ga(a,b,r):d[j]);return e}n.d=function(a,b){return u.d(a,b)}; -n.f=l("b");n.id=l("J");n.name=l("Fb");n.children=l("B");n.C=function(a,b){var d,e,g;"string"===typeof a?(e=a,b=b||{},d=b.fc||u.H(e),b.name=e,d=new window.videojs[d](this.a||this,b)):d=a;e=d.name();g=d.id();this.B.push(d);g&&(this.fa[g]=d);e&&(this.D[e]=d);this.b.appendChild(d.f());return d}; -n.removeChild=function(a){"string"===typeof a&&(a=this.D[a]);if(a&&this.B){for(var b=k,d=this.B.length-1;0<=d;d--)if(this.B[d]===a){b=f;this.B.splice(d,1);break}b&&(this.fa[a.id]=h,this.D[a.name]=h,(b=a.f())&&b.parentNode===this.b&&this.b.removeChild(a.f()))}};n.v=m("");n.e=function(a,b){u.e(this.b,a,u.bind(this,b));return this};n.j=function(a,b){u.j(this.b,a,b);return this};n.z=function(a,b){u.z(this.b,a,u.bind(this,b));return this};n.g=function(a,b){u.g(this.b,a,b);return this}; -function z(a,b){b&&(a.U?b.call(a):(a.pa===c&&(a.pa=[]),a.pa.push(b)))}function A(a){a.U=f;var b=a.pa;if(b&&0Google Chrome or download the latest Adobe Flash Player.'}))}else a instanceof -Object?window.videojs[this.P].canPlaySource(a)?this.src(a.src):this.src([a]):(this.n.src=a,this.U?(C(this,"src",a),"auto"==this.options.preload&&this.load(),this.options.autoplay&&this.play()):z(this,function(){this.src(a)}));return this};n.load=function(){C(this,"load");return this};n.currentSrc=function(){return B(this,"currentSrc")||this.n.src||""};n.ba=function(a){return a!==c?(C(this,"setPreload",a),this.options.preload=a,this):B(this,"preload")}; +function(){4===g.readyState&&(200===g.status||e&&0===g.status?b(g.responseText):d&&d())};try{g.send()}catch(k){d&&d(k)}};u.Rb=function(a){var b=window.localStorage||j;if(b)try{b.volume=a}catch(d){22==d.code||1014==d.code?u.log("LocalStorage Full (VideoJS)",d):u.log("LocalStorage Error (VideoJS)",d)}};u.ja=function(a){a.match(/^https?:\/\//)||(a=u.d("div",{innerHTML:'x'}).firstChild.href);return a}; +u.log=function(){u.log.history=u.log.history||[];u.log.history.push(arguments);window.console&&window.console.log(Array.prototype.slice.call(arguments))};u.Bb="getBoundingClientRect"in document.documentElement?function(a){var b;try{b=a.getBoundingClientRect()}catch(d){}if(!b)return 0;a=document.body;return b.left+(window.pageXOffset||a.scrollLeft)-(document.documentElement.clientLeft||a.clientLeft||0)}:function(a){for(var b=a.offsetLeft;a=a.offsetParent;)b+=a.offsetLeft;return b};function y(a,b,d){this.a=a;b=this.options=ga(this,this.options,b);this.K=b.id||(b.el&&b.el.id?b.el.id:a.id()+"_component_"+u.p++);this.Hb=b.name||h;this.b=b.el||this.d();this.C=[];this.ha={};this.G={};if((a=this.options)&&a.children){var e=this;u.T(a.children,function(a,b){b!==j&&!b.Fb&&(e[a]=e.F(a,b))})}z(this,d)}n=y.prototype; +n.l=function(){if(this.C)for(var a=this.C.length-1;0<=a;a--)this.C[a].l();this.G=this.ha=this.C=h;this.j();this.b.parentNode&&this.b.parentNode.removeChild(this.b);u.Oa(this.b);this.b=h};function ga(a,b,d){var e,g,p,k,r;p=Object.prototype.hasOwnProperty;g=Object.prototype.toString;b=b||{};e={};u.T(b,function(a,b){e[a]=b});if(!d)return e;for(k in d)p.call(d,k)&&(b=e[k],r=d[k],e[k]="[object Object]"===g.call(b)&&"[object Object]"===g.call(r)?ga(a,b,r):d[k]);return e}n.d=function(a,b){return u.d(a,b)}; +n.f=l("b");n.id=l("K");n.name=l("Hb");n.children=l("C");n.F=function(a,b){var d,e,g;"string"===typeof a?(e=a,b=b||{},d=b.gc||u.I(e),b.name=e,d=new window.videojs[d](this.a||this,b)):d=a;e=d.name();g=d.id();this.C.push(d);g&&(this.ha[g]=d);e&&(this.G[e]=d);this.b.appendChild(d.f());return d}; +n.removeChild=function(a){"string"===typeof a&&(a=this.G[a]);if(a&&this.C){for(var b=j,d=this.C.length-1;0<=d;d--)if(this.C[d]===a){b=f;this.C.splice(d,1);break}b&&(this.ha[a.id]=h,this.G[a.name]=h,(b=a.f())&&b.parentNode===this.b&&this.b.removeChild(a.f()))}};n.w=m("");n.e=function(a,b){u.e(this.b,a,u.bind(this,b));return this};n.j=function(a,b){u.j(this.b,a,b);return this};n.z=function(a,b){u.z(this.b,a,u.bind(this,b));return this};n.g=function(a,b){u.g(this.b,a,b);return this}; +function z(a,b){b&&(a.W?b.call(a):(a.sa===c&&(a.sa=[]),a.sa.push(b)))}function A(a){a.W=f;var b=a.sa;if(b&&0Google Chrome or download the latest Adobe Flash Player.'}))}else a instanceof +Object?window.videojs[this.Q].canPlaySource(a)?this.src(a.src):this.src([a]):(this.n.src=a,this.W?(C(this,"src",a),"auto"==this.options.preload&&this.load(),this.options.autoplay&&this.play()):z(this,function(){this.src(a)}));return this};n.load=function(){C(this,"load");return this};n.currentSrc=function(){return B(this,"currentSrc")||this.n.src||""};n.ca=function(a){return a!==c?(C(this,"setPreload",a),this.options.preload=a,this):B(this,"preload")}; n.autoplay=function(a){return a!==c?(C(this,"setAutoplay",a),this.options.autoplay=a,this):B(this,"autoplay")};n.loop=function(a){return a!==c?(C(this,"setLoop",a),this.options.loop=a,this):B(this,"loop")};n.controls=function(){return this.options.controls};n.poster=function(){return B(this,"poster")};n.error=function(){return B(this,"error")};var qa,ra,sa,ta; -if(document.dc!==c)qa="requestFullscreen",ra="exitFullscreen",sa="fullscreenchange",ta="fullScreen";else for(var ua=["moz","webkit"],va=ua.length-1;0<=va;va--){var D=ua[va];if(("moz"!=D||document.mozFullScreenEnabled)&&document[D+"CancelFullScreen"]!==c)qa=D+"RequestFullScreen",ra=D+"CancelFullScreen",sa=D+"fullscreenchange",ta="webkit"==D?D+"IsFullScreen":D+"FullScreen"}qa&&(u.Ma.qa={Lb:qa,ub:ra,T:sa,N:ta}); -function wa(a,b,d){y.call(this,a,b,d);if(!a.options.sources||0===a.options.sources.length){b=0;for(d=a.options.techOrder;b'+(this.K||"Need Text")+"",Mb:"button",tabIndex:0},b);return G.h.d.call(this,a,b)};n.k=function(){};n.la=function(){u.e(document,"keyup",u.bind(this,this.aa))};n.aa=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.k()};n.ka=function(){u.j(document,"keyup",u.bind(this,this.aa))};function H(a,b){G.call(this,a,b)}t(H,G);H.prototype.K="Play"; -H.prototype.v=function(){return"vjs-play-button "+H.h.v.call(this)};H.prototype.k=function(){this.a.play()};function I(a,b){G.call(this,a,b)}t(I,G);I.prototype.K="Play";I.prototype.v=function(){return"vjs-pause-button "+I.h.v.call(this)};I.prototype.k=function(){this.a.pause()};function xa(a,b){G.call(this,a,b);a.e("play",u.bind(this,this.Ja));a.e("pause",u.bind(this,this.Ia))}t(xa,G);n=xa.prototype;n.K="Play";n.v=function(){return"vjs-play-control "+xa.h.v.call(this)}; -n.k=function(){this.a.paused()?this.a.play():this.a.pause()};n.Ja=function(){u.u(this.b,"vjs-paused");u.m(this.b,"vjs-playing")};n.Ia=function(){u.u(this.b,"vjs-playing");u.m(this.b,"vjs-paused")};function J(a,b){G.call(this,a,b)}t(J,G);J.prototype.K="Fullscreen";J.prototype.v=function(){return"vjs-fullscreen-control "+J.h.v.call(this)};J.prototype.k=function(){this.a.N?oa(this.a):this.a.qa()};function K(a,b){G.call(this,a,b);a.e("play",u.bind(this,this.s));a.e("ended",u.bind(this,this.show))} +if(document.ec!==c)qa="requestFullscreen",ra="exitFullscreen",sa="fullscreenchange",ta="fullScreen";else for(var ua=["moz","webkit"],va=ua.length-1;0<=va;va--){var D=ua[va];if(("moz"!=D||document.mozFullScreenEnabled)&&document[D+"CancelFullScreen"]!==c)qa=D+"RequestFullScreen",ra=D+"CancelFullScreen",sa=D+"fullscreenchange",ta="webkit"==D?D+"IsFullScreen":D+"FullScreen"}qa&&(u.Pa.ta={Nb:qa,wb:ra,U:sa,O:ta}); +function wa(a,b,d){y.call(this,a,b,d);if(!a.options.sources||0===a.options.sources.length){b=0;for(d=a.options.techOrder;b'+(this.L||"Need Text")+"",Ob:"button",tabIndex:0},b);return G.h.d.call(this,a,b)};n.k=function(){};n.oa=function(){u.e(document,"keyup",u.bind(this,this.ba))};n.ba=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.k()};n.na=function(){u.j(document,"keyup",u.bind(this,this.ba))};function H(a,b){G.call(this,a,b)}t(H,G);H.prototype.L="Play"; +H.prototype.w=function(){return"vjs-play-button "+H.h.w.call(this)};H.prototype.k=function(){this.a.play()};function I(a,b){G.call(this,a,b)}t(I,G);I.prototype.L="Play";I.prototype.w=function(){return"vjs-pause-button "+I.h.w.call(this)};I.prototype.k=function(){this.a.pause()};function xa(a,b){G.call(this,a,b);a.e("play",u.bind(this,this.La));a.e("pause",u.bind(this,this.Ka))}t(xa,G);n=xa.prototype;n.L="Play";n.w=function(){return"vjs-play-control "+xa.h.w.call(this)}; +n.k=function(){this.a.paused()?this.a.play():this.a.pause()};n.La=function(){u.u(this.b,"vjs-paused");u.m(this.b,"vjs-playing")};n.Ka=function(){u.u(this.b,"vjs-playing");u.m(this.b,"vjs-paused")};function J(a,b){G.call(this,a,b)}t(J,G);J.prototype.L="Fullscreen";J.prototype.w=function(){return"vjs-fullscreen-control "+J.h.w.call(this)};J.prototype.k=function(){this.a.O?oa(this.a):this.a.ta()};function K(a,b){G.call(this,a,b);a.e("play",u.bind(this,this.t));a.e("ended",u.bind(this,this.show))} t(K,G);K.prototype.d=function(){return K.h.d.call(this,"div",{className:"vjs-big-play-button",innerHTML:""})};K.prototype.k=function(){this.a.currentTime()&&this.a.currentTime(0);this.a.play()}; -function L(a,b){y.call(this,a,b);a.e("canplay",u.bind(this,this.s));a.e("canplaythrough",u.bind(this,this.s));a.e("playing",u.bind(this,this.s));a.e("seeked",u.bind(this,this.s));a.e("seeking",u.bind(this,this.show));a.e("seeked",u.bind(this,this.s));a.e("error",u.bind(this,this.show));a.e("waiting",u.bind(this,this.show))}t(L,y); -L.prototype.d=function(){var a,b;"string"==typeof this.a.f().style.WebkitBorderRadius||"string"==typeof this.a.f().style.MozBorderRadius||"string"==typeof this.a.f().style.ac||"string"==typeof this.a.f().style.cc?(a="vjs-loading-spinner",b='
'):(a="vjs-loading-spinner-fallback",b="");return L.h.d.call(this, -"div",{className:a,innerHTML:b})};function M(a,b){y.call(this,a,b);a.e("timeupdate",u.bind(this,this.da))}t(M,y);M.prototype.d=function(){var a=M.h.d.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.content=u.d("div",{className:"vjs-current-time-display",innerHTML:"0:00"});a.appendChild(u.d("div").appendChild(this.content));return a};M.prototype.da=function(){var a=this.a.bb?this.a.n.currentTime:this.a.currentTime();this.content.innerHTML=u.o(a,this.a.duration())}; -function N(a,b){y.call(this,a,b);a.e("timeupdate",u.bind(this,this.da))}t(N,y);N.prototype.d=function(){var a=N.h.d.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.content=u.d("div",{className:"vjs-duration-display",innerHTML:"0:00"});a.appendChild(u.d("div").appendChild(this.content));return a};N.prototype.da=function(){this.a.duration()&&(this.content.innerHTML=u.o(this.a.duration()))};function ya(a,b){y.call(this,a,b)}t(ya,y); -ya.prototype.d=function(){return ya.h.d.call(this,"div",{className:"vjs-time-divider",innerHTML:"
/
"})};function O(a,b){y.call(this,a,b);a.e("timeupdate",u.bind(this,this.da))}t(O,y);O.prototype.d=function(){var a=O.h.d.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.content=u.d("div",{className:"vjs-remaining-time-display",innerHTML:"-0:00"});a.appendChild(u.d("div").appendChild(this.content));return a}; -O.prototype.da=function(){this.a.duration()&&(this.content.innerHTML="-"+u.o(this.a.duration()-this.a.currentTime()))};function P(a,b){y.call(this,a,b);this.sb=this.D[this.options.barName];this.handle=this.D[this.options.handleName];a.e(this.$a,u.bind(this,this.update));this.e("mousedown",this.Ha);this.e("focus",this.la);this.e("blur",this.ka);this.a.e("controlsvisible",u.bind(this,this.update));z(a,u.bind(this,this.update))}t(P,y);n=P.prototype; -n.d=function(a,b){b=u.t({Mb:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},b);return P.h.d.call(this,a,b)};n.Ha=function(a){a.preventDefault();u.tb();u.e(document,"mousemove",u.bind(this,this.ma));u.e(document,"mouseup",u.bind(this,this.na));this.ma(a)};n.na=function(){u.Ub();u.j(document,"mousemove",this.ma,k);u.j(document,"mouseup",this.na,k);this.update()}; -n.update=function(){var a,b=this.Wa(),d=this.handle,e=this.sb;isNaN(b)&&(b=0);a=b;if(d){a=this.b.offsetWidth;var g=d.f().offsetWidth;a=g?g/a:0;b*=1-a;a=b+a/2;d.f().style.left=u.round(100*b,2)+"%"}e.f().style.width=u.round(100*a,2)+"%"};function za(a,b){var d=a.b,e=u.yb(d),d=d.offsetWidth,g=a.handle;g&&(g=g.f().offsetWidth,e+=g/2,d-=g);return Math.max(0,Math.min(1,(b.pageX-e)/d))}n.la=function(){u.e(document,"keyup",u.bind(this,this.aa))}; -n.aa=function(a){37==a.which?(a.preventDefault(),this.eb()):39==a.which&&(a.preventDefault(),this.fb())};n.ka=function(){u.j(document,"keyup",u.bind(this,this.aa))};function Aa(a,b){y.call(this,a,b)}t(Aa,y);Aa.prototype.options={children:{seekBar:{}}};Aa.prototype.d=function(){return Aa.h.d.call(this,"div",{className:"vjs-progress-control vjs-control"})};function Q(a,b){P.call(this,a,b)}t(Q,P);n=Q.prototype; -n.options={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};n.$a="timeupdate";n.d=function(){return Q.h.d.call(this,"div",{className:"vjs-progress-holder"})};n.Wa=function(){return this.a.currentTime()/this.a.duration()};n.Ha=function(a){Q.h.Ha.call(this,a);this.a.bb=f;this.Vb=!this.a.paused();this.a.pause()};n.ma=function(a){a=za(this,a)*this.a.duration();a==this.a.duration()&&(a-=0.1);this.a.currentTime(a)}; -n.na=function(a){Q.h.na.call(this,a);this.a.bb=k;this.Vb&&this.a.play()};n.fb=function(){this.a.currentTime(this.a.currentTime()+1)};n.eb=function(){this.a.currentTime(this.a.currentTime()-1)};function Ba(a,b){y.call(this,a,b);a.e("progress",u.bind(this,this.update))}t(Ba,y);Ba.prototype.d=function(){return Ba.h.d.call(this,"div",{className:"vjs-load-progress",innerHTML:'Loaded: 0%'})}; -Ba.prototype.update=function(){this.b.style&&(this.b.style.width=u.round(100*ma(this.a),2)+"%")};function Ca(a,b){y.call(this,a,b)}t(Ca,y);Ca.prototype.d=function(){return Ca.h.d.call(this,"div",{className:"vjs-play-progress",innerHTML:'Progress: 0%'})};function Da(a,b){y.call(this,a,b)}t(Da,y);Da.prototype.d=function(){return Da.h.d.call(this,"div",{className:"vjs-seek-handle",innerHTML:'00:00'})}; -function Ea(a,b){y.call(this,a,b)}t(Ea,y);Ea.prototype.options={children:{volumeBar:{}}};Ea.prototype.d=function(){return Ea.h.d.call(this,"div",{className:"vjs-volume-control vjs-control"})};function Fa(a,b){P.call(this,a,b)}t(Fa,P);n=Fa.prototype;n.options={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};n.$a="volumechange";n.d=function(){return Fa.h.d.call(this,"div",{className:"vjs-volume-bar"})};n.ma=function(a){this.a.volume(za(this,a))};n.Wa=function(){return this.a.volume()}; -n.fb=function(){this.a.volume(this.a.volume()+0.1)};n.eb=function(){this.a.volume(this.a.volume()-0.1)};function Ga(a,b){y.call(this,a,b)}t(Ga,y);Ga.prototype.d=function(){return Ga.h.d.call(this,"div",{className:"vjs-volume-level",innerHTML:''})};function Ha(a,b){y.call(this,a,b)}t(Ha,y);Ha.prototype.d=function(){return Ha.h.d.call(this,"div",{className:"vjs-volume-handle",innerHTML:''})}; -function R(a,b){G.call(this,a,b);a.e("volumechange",u.bind(this,this.update))}t(R,G);R.prototype.d=function(){return R.h.d.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'
Mute
'})};R.prototype.k=function(){this.a.muted(this.a.muted()?k:f)};R.prototype.update=function(){var a=this.a.volume(),b=3;0===a||this.a.muted()?b=0:0.33>a?b=1:0.67>a&&(b=2);for(a=0;4>a;a++)u.u(this.b,"vjs-vol-"+a);u.m(this.b,"vjs-vol-"+b)}; -function Ia(a,b){G.call(this,a,b);this.a.options.poster||this.s();a.e("play",u.bind(this,this.s))}t(Ia,G);Ia.prototype.d=function(){var a=u.d("img",{className:"vjs-poster",tabIndex:-1});this.a.options.poster&&(a.src=this.a.options.poster);return a};Ia.prototype.k=function(){this.a.play()};function S(a,b){y.call(this,a,b)}t(S,y);function Ja(a,b){a.C(b);b.e("click",u.bind(a,function(){ha(this)}))}S.prototype.d=function(){return S.h.d.call(this,"ul",{className:"vjs-menu"})}; -function T(a,b){G.call(this,a,b);b.selected&&this.m("vjs-selected")}t(T,G);T.prototype.d=function(a,b){return T.h.d.call(this,"li",u.t({className:"vjs-menu-item",innerHTML:this.options.label},b))};T.prototype.k=function(){this.selected(f)};T.prototype.selected=function(a){a?this.m("vjs-selected"):this.u("vjs-selected")};function U(a,b,d){y.call(this,a,b,d)}t(U,y);U.prototype.k=function(){this.a.options.controls&&(this.a.paused()?this.a.play():this.a.pause())};u.media={};u.media.ta="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 Ka(){var a=u.media.ta[i];return function(){throw Error('The "'+a+"\" method is not available on the playback technology's API");}}for(var i=u.media.ta.length-1;0<=i;i--)U.prototype[u.media.ta[i]]=Ka();function V(a,b,d){y.call(this,a,b,d);(b=b.source)&&this.b.currentSrc==b.src?a.g("loadstart"):b&&(this.b.src=b.src);z(a,function(){this.options.autoplay&&this.paused()&&(this.G.poster=h,this.play())});this.e("click",this.k);for(a=La.length-1;0<=a;a--)u.e(this.b,La[a],u.bind(this.a,this.Sa));A(this)}t(V,U);n=V.prototype;n.l=function(){for(var a=La.length-1;0<=a;a--)u.j(this.b,La[a],u.bind(this.a,this.Sa));V.h.l.call(this)}; -n.d=function(){var a=this.a,b=a.G;if(!b||this.F.Eb===k)b&&a.f().removeChild(b),b=u.createElement("video",{id:b.id||a.id+"_html5_api",className:b.className||"vjs-tech"}),u.Z(b,a.f);for(var d=["autoplay","preload","loop","muted"],e=d.length-1;0<=e;e--){var g=d[e];a.options[g]!==h&&(b[g]=a.options[g])}return b};n.Sa=function(a){this.g(a);a.stopPropagation()};n.play=function(){this.b.play()};n.pause=function(){this.b.pause()};n.paused=function(){return this.b.paused};n.currentTime=function(){return this.b.currentTime}; -n.Ob=function(a){try{this.b.currentTime=a}catch(b){u.log(b,"Video is not ready. (Video.js)")}};n.duration=function(){return this.b.duration||0};n.buffered=function(){return this.b.buffered};n.volume=function(){return this.b.volume};n.Tb=function(a){this.b.volume=a};n.muted=function(){return this.b.muted};n.Rb=function(a){this.b.muted=a};n.width=function(){return this.b.offsetWidth};n.height=function(){return this.b.offsetHeight}; -n.sa=function(){return"function"==typeof this.b.webkitEnterFullScreen&&!navigator.userAgent.match("Chrome")&&!navigator.userAgent.match("Mac OS X 10.5")?f:k};n.src=function(a){this.b.src=a};n.load=function(){this.b.load()};n.currentSrc=function(){return this.b.currentSrc};n.ba=function(){return this.b.ba};n.Sb=function(a){this.b.ba=a};n.autoplay=function(){return this.b.autoplay};n.Nb=function(a){this.b.autoplay=a};n.loop=function(){return this.b.loop};n.Qb=function(a){this.b.loop=a};n.error=function(){return this.b.error}; -n.controls=function(){return this.a.options.controls};var La="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");V.prototype.F={ic:u.pb.webkitEnterFullScreen?!u.A.match("Chrome")&&!u.A.match("Mac OS X 10.5")?f:k:k,Eb:!u.lb}; -u.jb&&3>u.ib&&(document.createElement("video").constructor.prototype.canPlayType=function(a){return a&&-1!=a.toLowerCase().indexOf("video/mp4")?"maybe":""});function W(a,b,d){y.call(this,a,b,d);var e=b.source,g=b.Jb;d=this.b=u.d("div",{id:a.id()+"_temp_flash"});var p=a.id()+"_flash_api";a=a.options;var j=u.t({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:a.autoplay,preload:a.ba,loop:a.loop,muted:a.muted},b.flashVars),r=u.t({wmode:"opaque",bgcolor:"#000000"},b.params),q=u.t({id:p,name:p,"class":"vjs-tech"},b.attributes);e&&(j.src=encodeURIComponent(u.ha(e.src))); -u.Z(d,g);b.startTime&&z(this,function(){this.load();this.play();this.currentTime(b.startTime)});if(b.lc===f&&!u.kb){var w=u.d("iframe",{id:p+"_iframe",name:p+"_iframe",className:"vjs-tech",scrolling:"no",marginWidth:0,marginHeight:0,frameBorder:0});j.readyFunction="ready";j.eventProxyFunction="events";j.errorEventProxyFunction="errors";u.e(w,"load",u.bind(this,function(){var a,d=w.contentWindow;a=w.contentDocument?w.contentDocument:w.contentWindow.document;a.write(Ma(b.swf,j,r,q));d.player=this.a; -d.ready=u.bind(this.a,function(b){b=a.getElementById(b);var d=this.i;d.b=b;u.e(b,"click",d.bind(d.k));Na(d)});d.events=u.bind(this.a,function(a,b){this&&"flash"===this.P&&this.g(b)});d.errors=u.bind(this.a,function(a,b){u.log("Flash Error",b)})}));d.parentNode.replaceChild(w,d)}else{a=Ma(b.swf,j,r,q);a=u.d("div",{innerHTML:a}).childNodes[0];e=d.parentNode;d.parentNode.replaceChild(a,d);var gb=e.childNodes[0];setTimeout(function(){gb.style.display="block"},1E3)}}t(W,U);n=W.prototype;n.l=function(){W.h.l.call(this)}; -n.play=function(){this.b.vjs_play()};n.pause=function(){this.b.vjs_pause()};n.src=function(a){a=u.ha(a);this.b.vjs_src(a);if(this.a.autoplay()){var b=this;setTimeout(function(){b.play()},0)}};n.load=function(){this.b.vjs_load()};n.poster=function(){this.b.vjs_getProperty("poster")};n.buffered=function(){return u.xa(this.b.vjs_getProperty("buffered"))};n.sa=m(k); -var Oa=W.prototype,Pa="preload currentTime defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "),Qa="error currentSrc networkState readyState seeking initialTime duration startOffsetTime paused played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks".split(" ");function Ra(){var a=Pa[i],b=a.charAt(0).toUpperCase()+a.slice(1);Oa["set"+b]=function(b){return this.b.vjs_setProperty(a,b)}} -function Sa(a){Oa[a]=function(){return this.b.vjs_getProperty(a)}}for(i=0;i'});e=u.t({data:a,width:"100%",height:"100%"},e);u.S(e,function(a,b){j+=a+'="'+b+'" '});return'"+p+""};function X(a){a.ca=a.ca||[];return a.ca}function Ta(a,b,d){for(var e=a.ca,g=0,p=e.length,j,r;g");this.R.push(b)}this.X=2;this.g("loaded")}; -function Va(a){var b=a.split(":");a=0;var d,e,g;3==b.length?(d=b[0],e=b[1],b=b[2]):(d=0,e=b[0],b=b[1]);b=b.split(/\s+/);b=b.splice(0,1)[0];b=b.split(/\.|,/);g=parseFloat(b[1]);b=b[0];a+=3600*parseFloat(d);a+=60*parseFloat(e);a+=parseFloat(b);g&&(a+=g/1E3);return a} -n.update=function(){if(0=this.ja||this.ja===c?w=this.Aa!==c?this.Aa:0:(g=f,w=this.Da!==c?this.Da:b.length-1);for(;;){q=b[w];if(q.Y<=a)e=Math.max(e,q.Y),q.ea&&(q.ea=k);else if(a'+a[d].text+"";this.b.innerHTML=b;this.g("cuechange")}}};n.reset=function(){this.ja=0;this.Ka=this.a.duration();this.Da=this.Aa=0};function Wa(a,b){Y.call(this,a,b)}t(Wa,Y);Wa.prototype.r="captions";function Xa(a,b){Y.call(this,a,b)}t(Xa,Y);Xa.prototype.r="subtitles";function Ya(a,b){Y.call(this,a,b)} -t(Ya,Y);Ya.prototype.r="chapters";function Za(a,b,d){y.call(this,a,b,d);if(a.options.tracks&&0e.readyState()){this.ec=e;e.e("loaded",u.bind(this,this.wa));return}g=e;break}a=this.V=new S(this.a);a.b.appendChild(u.d("li",{className:"vjs-menu-title",innerHTML:u.H(this.r)}));if(g){e=g.R;for(var j,b=0,d=e.length;b/"})};function za(a,b){y.call(this,a,b);a.e("timeupdate",u.bind(this,this.fa))}t(za,y);za.prototype.d=function(){var a=za.h.d.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.content=u.d("div",{className:"vjs-remaining-time-display",innerHTML:"-0:00"});a.appendChild(u.d("div").appendChild(this.content));return a}; +za.prototype.fa=function(){this.a.duration()&&(this.content.innerHTML="-"+u.o(this.a.duration()-this.a.currentTime()))};function O(a,b){y.call(this,a,b);this.tb=this.G[this.options.barName];this.handle=this.G[this.options.handleName];a.e(this.cb,u.bind(this,this.update));this.e("mousedown",this.Ja);this.e("focus",this.oa);this.e("blur",this.na);this.a.e("controlsvisible",u.bind(this,this.update));z(a,u.bind(this,this.update))}t(O,y);n=O.prototype; +n.d=function(a,b){b=u.s({Ob:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},b);return O.h.d.call(this,a,b)};n.Ja=function(a){a.preventDefault();u.ub();u.e(document,"mousemove",u.bind(this,this.pa));u.e(document,"mouseup",u.bind(this,this.qa));this.pa(a)};n.qa=function(){u.Wb();u.j(document,"mousemove",this.pa,j);u.j(document,"mouseup",this.qa,j);this.update()}; +n.update=function(){var a,b=this.Za(),d=this.handle,e=this.tb;isNaN(b)&&(b=0);a=b;if(d){a=this.b.offsetWidth;var g=d.f().offsetWidth;a=g?g/a:0;b*=1-a;a=b+a/2;d.f().style.left=u.round(100*b,2)+"%"}e.f().style.width=u.round(100*a,2)+"%"};function Aa(a,b){var d=a.b,e=u.Bb(d),d=d.offsetWidth,g=a.handle;g&&(g=g.f().offsetWidth,e+=g/2,d-=g);return Math.max(0,Math.min(1,(b.pageX-e)/d))}n.oa=function(){u.e(document,"keyup",u.bind(this,this.ba))}; +n.ba=function(a){37==a.which?(a.preventDefault(),this.gb()):39==a.which&&(a.preventDefault(),this.hb())};n.na=function(){u.j(document,"keyup",u.bind(this,this.ba))};function Ba(a,b){y.call(this,a,b)}t(Ba,y);Ba.prototype.options={children:{seekBar:{}}};Ba.prototype.d=function(){return Ba.h.d.call(this,"div",{className:"vjs-progress-control vjs-control"})};function P(a,b){O.call(this,a,b)}t(P,O);n=P.prototype; +n.options={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};n.cb="timeupdate";n.d=function(){return P.h.d.call(this,"div",{className:"vjs-progress-holder"})};n.Za=function(){return this.a.currentTime()/this.a.duration()};n.Ja=function(a){P.h.Ja.call(this,a);this.a.eb=f;this.Xb=!this.a.paused();this.a.pause()};n.pa=function(a){a=Aa(this,a)*this.a.duration();a==this.a.duration()&&(a-=0.1);this.a.currentTime(a)}; +n.qa=function(a){P.h.qa.call(this,a);this.a.eb=j;this.Xb&&this.a.play()};n.hb=function(){this.a.currentTime(this.a.currentTime()+1)};n.gb=function(){this.a.currentTime(this.a.currentTime()-1)};function Ca(a,b){y.call(this,a,b);a.e("progress",u.bind(this,this.update))}t(Ca,y);Ca.prototype.d=function(){return Ca.h.d.call(this,"div",{className:"vjs-load-progress",innerHTML:'Loaded: 0%'})}; +Ca.prototype.update=function(){this.b.style&&(this.b.style.width=u.round(100*ma(this.a),2)+"%")};function Da(a,b){y.call(this,a,b)}t(Da,y);Da.prototype.d=function(){return Da.h.d.call(this,"div",{className:"vjs-play-progress",innerHTML:'Progress: 0%'})};function Ea(a,b){y.call(this,a,b)}t(Ea,y);Ea.prototype.d=function(){return Ea.h.d.call(this,"div",{className:"vjs-seek-handle",innerHTML:'00:00'})}; +function Fa(a,b){y.call(this,a,b)}t(Fa,y);Fa.prototype.options={children:{volumeBar:{}}};Fa.prototype.d=function(){return Fa.h.d.call(this,"div",{className:"vjs-volume-control vjs-control"})};function Ga(a,b){O.call(this,a,b)}t(Ga,O);n=Ga.prototype;n.options={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};n.cb="volumechange";n.d=function(){return Ga.h.d.call(this,"div",{className:"vjs-volume-bar"})};n.pa=function(a){this.a.volume(Aa(this,a))};n.Za=function(){return this.a.volume()}; +n.hb=function(){this.a.volume(this.a.volume()+0.1)};n.gb=function(){this.a.volume(this.a.volume()-0.1)};function Ha(a,b){y.call(this,a,b)}t(Ha,y);Ha.prototype.d=function(){return Ha.h.d.call(this,"div",{className:"vjs-volume-level",innerHTML:''})};function Ia(a,b){y.call(this,a,b)}t(Ia,y);Ia.prototype.d=function(){return Ia.h.d.call(this,"div",{className:"vjs-volume-handle",innerHTML:''})}; +function Q(a,b){G.call(this,a,b);a.e("volumechange",u.bind(this,this.update))}t(Q,G);Q.prototype.d=function(){return Q.h.d.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'
Mute
'})};Q.prototype.k=function(){this.a.muted(this.a.muted()?j:f)};Q.prototype.update=function(){var a=this.a.volume(),b=3;0===a||this.a.muted()?b=0:0.33>a?b=1:0.67>a&&(b=2);for(a=0;4>a;a++)u.u(this.b,"vjs-vol-"+a);u.m(this.b,"vjs-vol-"+b)}; +function Ja(a,b){G.call(this,a,b);this.a.options.poster||this.t();a.e("play",u.bind(this,this.t))}t(Ja,G);Ja.prototype.d=function(){var a=u.d("img",{className:"vjs-poster",tabIndex:-1});this.a.options.poster&&(a.src=this.a.options.poster);return a};Ja.prototype.k=function(){this.a.play()};function R(a,b){y.call(this,a,b)}t(R,y);function Ka(a,b){a.F(b);b.e("click",u.bind(a,function(){ha(this)}))}R.prototype.d=function(){return R.h.d.call(this,"ul",{className:"vjs-menu"})}; +function S(a,b){G.call(this,a,b);b.selected&&this.m("vjs-selected")}t(S,G);S.prototype.d=function(a,b){return S.h.d.call(this,"li",u.s({className:"vjs-menu-item",innerHTML:this.options.label},b))};S.prototype.k=function(){this.selected(f)};S.prototype.selected=function(a){a?this.m("vjs-selected"):this.u("vjs-selected")};function T(a,b,d){y.call(this,a,b,d)}t(T,y);T.prototype.k=function(){this.a.options.controls&&(this.a.paused()?this.a.play():this.a.pause())};u.media={};u.media.va="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 La(){var a=u.media.va[i];return function(){throw Error('The "'+a+"\" method is not available on the playback technology's API");}}for(var i=u.media.va.length-1;0<=i;i--)T.prototype[u.media.va[i]]=La();function U(a,b,d){y.call(this,a,b,d);(b=b.source)&&this.b.currentSrc==b.src?a.g("loadstart"):b&&(this.b.src=b.src);z(a,function(){this.options.autoplay&&this.paused()&&(this.H.poster=h,this.play())});this.e("click",this.k);for(a=Ma.length-1;0<=a;a--)u.e(this.b,Ma[a],u.bind(this.a,this.Ab));A(this)}t(U,T);n=U.prototype;n.l=function(){U.h.l.call(this)}; +n.d=function(){var a=this.a,b=a.H;if(!b||this.D.Gb===j)b&&a.f().removeChild(b),b=u.createElement("video",{id:b.id||a.id()+"_html5_api",className:b.className||"vjs-tech"}),u.V(b,a.f());for(var d=["autoplay","preload","loop","muted"],e=d.length-1;0<=e;e--){var g=d[e];a.options[g]!==h&&(b[g]=a.options[g])}return b};n.Ab=function(a){"play"!==a.type&&(this.g(a),a.stopPropagation())};n.play=function(){this.b.play()};n.pause=function(){this.b.pause()};n.paused=function(){return this.b.paused}; +n.currentTime=function(){return this.b.currentTime};n.Qb=function(a){try{this.b.currentTime=a}catch(b){u.log(b,"Video is not ready. (Video.js)")}};n.duration=function(){return this.b.duration||0};n.buffered=function(){return this.b.buffered};n.volume=function(){return this.b.volume};n.Vb=function(a){this.b.volume=a};n.muted=function(){return this.b.muted};n.Tb=function(a){this.b.muted=a};n.width=function(){return this.b.offsetWidth};n.height=function(){return this.b.offsetHeight}; +n.ua=function(){return"function"==typeof this.b.webkitEnterFullScreen&&!navigator.userAgent.match("Chrome")&&!navigator.userAgent.match("Mac OS X 10.5")?f:j};n.src=function(a){this.b.src=a};n.load=function(){this.b.load()};n.currentSrc=function(){return this.b.currentSrc};n.ca=function(){return this.b.ca};n.Ub=function(a){this.b.ca=a};n.autoplay=function(){return this.b.autoplay};n.Pb=function(a){this.b.autoplay=a};n.loop=function(){return this.b.loop};n.Sb=function(a){this.b.loop=a};n.error=function(){return this.b.error}; +n.controls=function(){return this.a.options.controls};var Ma="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");U.prototype.D={jc:u.qb.webkitEnterFullScreen?!u.B.match("Chrome")&&!u.B.match("Mac OS X 10.5")?f:j:j,Gb:!u.mb}; +u.kb&&3>u.jb&&(document.createElement("video").constructor.prototype.canPlayType=function(a){return a&&-1!=a.toLowerCase().indexOf("video/mp4")?"maybe":""});function V(a,b,d){y.call(this,a,b,d);var e=b.source,g=b.Lb;d=this.b=u.d("div",{id:a.id()+"_temp_flash"});var p=a.id()+"_flash_api";a=a.options;var k=u.s({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:a.autoplay,preload:a.ca,loop:a.loop,muted:a.muted},b.flashVars),r=u.s({wmode:"opaque",bgcolor:"#000000"},b.params),q=u.s({id:p,name:p,"class":"vjs-tech"},b.attributes);e&&(k.src=encodeURIComponent(u.ja(e.src))); +u.V(d,g);b.startTime&&z(this,function(){this.load();this.play();this.currentTime(b.startTime)});if(b.mc===f&&!u.lb){var w=u.d("iframe",{id:p+"_iframe",name:p+"_iframe",className:"vjs-tech",scrolling:"no",marginWidth:0,marginHeight:0,frameBorder:0});k.readyFunction="ready";k.eventProxyFunction="events";k.errorEventProxyFunction="errors";u.e(w,"load",u.bind(this,function(){var a,d=w.contentWindow;a=w.contentDocument?w.contentDocument:w.contentWindow.document;a.write(Na(b.swf,k,r,q));d.player=this.a; +d.ready=u.bind(this.a,function(b){b=a.getElementById(b);var d=this.i;d.b=b;u.e(b,"click",d.bind(d.k));Oa(d)});d.events=u.bind(this.a,function(a,b){this&&"flash"===this.Q&&this.g(b)});d.errors=u.bind(this.a,function(a,b){u.log("Flash Error",b)})}));d.parentNode.replaceChild(w,d)}else{a=Na(b.swf,k,r,q);a=u.d("div",{innerHTML:a}).childNodes[0];e=d.parentNode;d.parentNode.replaceChild(a,d);var hb=e.childNodes[0];setTimeout(function(){hb.style.display="block"},1E3)}}t(V,T);n=V.prototype;n.l=function(){V.h.l.call(this)}; +n.play=function(){this.b.vjs_play()};n.pause=function(){this.b.vjs_pause()};n.src=function(a){a=u.ja(a);this.b.vjs_src(a);if(this.a.autoplay()){var b=this;setTimeout(function(){b.play()},0)}};n.load=function(){this.b.vjs_load()};n.poster=function(){this.b.vjs_getProperty("poster")};n.buffered=function(){return u.za(this.b.vjs_getProperty("buffered"))};n.ua=m(j); +var Pa=V.prototype,Qa="preload currentTime defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "),Ra="error currentSrc networkState readyState seeking initialTime duration startOffsetTime paused played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks".split(" ");function Sa(){var a=Qa[i],b=a.charAt(0).toUpperCase()+a.slice(1);Pa["set"+b]=function(b){return this.b.vjs_setProperty(a,b)}} +function Ta(a){Pa[a]=function(){return this.b.vjs_getProperty(a)}}for(i=0;i'});e=u.s({data:a,width:"100%",height:"100%"},e);u.T(e,function(a,b){k+=a+'="'+b+'" '});return'"+p+""};function W(a){a.ea=a.ea||[];return a.ea}function Ua(a,b,d){for(var e=a.ea,g=0,p=e.length,k,r;g");this.S.push(b)}this.Z=2;this.g("loaded")}; +function Wa(a){var b=a.split(":");a=0;var d,e,g;3==b.length?(d=b[0],e=b[1],b=b[2]):(d=0,e=b[0],b=b[1]);b=b.split(/\s+/);b=b.splice(0,1)[0];b=b.split(/\.|,/);g=parseFloat(b[1]);b=b[0];a+=3600*parseFloat(d);a+=60*parseFloat(e);a+=parseFloat(b);g&&(a+=g/1E3);return a} +n.update=function(){if(0=this.ma||this.ma===c?w=this.Ca!==c?this.Ca:0:(g=f,w=this.Fa!==c?this.Fa:b.length-1);for(;;){q=b[w];if(q.$<=a)e=Math.max(e,q.$),q.ga&&(q.ga=j);else if(a'+a[d].text+"";this.b.innerHTML=b;this.g("cuechange")}}};n.reset=function(){this.ma=0;this.Ma=this.a.duration();this.Fa=this.Ca=0};function Xa(a,b){X.call(this,a,b)}t(Xa,X);Xa.prototype.r="captions";function Ya(a,b){X.call(this,a,b)}t(Ya,X);Ya.prototype.r="subtitles";function Za(a,b){X.call(this,a,b)} +t(Za,X);Za.prototype.r="chapters";function $a(a,b,d){y.call(this,a,b,d);if(a.options.tracks&&0e.readyState()){this.fc=e;e.e("loaded",u.bind(this,this.ya));return}g=e;break}a=this.X=new R(this.a);a.b.appendChild(u.d("li",{className:"vjs-menu-title",innerHTML:u.I(this.r)}));if(g){e=g.S;for(var k,b=0,d=e.length;b