mirror of
https://github.com/videojs/video.js.git
synced 2025-04-15 11:56:32 +02:00
Fixed instances where options was still using a non-string key
This commit is contained in:
parent
70fbf7fc8a
commit
487fdc8511
@ -276,10 +276,10 @@ vjs.Component.prototype.addChild = function(child, options){
|
||||
options = options || {};
|
||||
|
||||
// Assume name of set is a lowercased name of the UI Class (PlayButton, etc.)
|
||||
componentClass = options.componentClass || vjs.capitalize(componentName);
|
||||
componentClass = options['componentClass'] || vjs.capitalize(componentName);
|
||||
|
||||
// Set name through options
|
||||
options.name = componentName;
|
||||
options['name'] = componentName;
|
||||
|
||||
// Create a new object & element for this controls set
|
||||
// If there's no .player_, this is a player
|
||||
@ -345,14 +345,14 @@ vjs.Component.prototype.removeChild = function(component){
|
||||
vjs.Component.prototype.initChildren = function(){
|
||||
var options = this.options;
|
||||
|
||||
if (options && options.children) {
|
||||
if (options && options['children']) {
|
||||
var self = this;
|
||||
|
||||
// Loop through components and add them to the player
|
||||
vjs.eachProp(options.children, function(name, opts){
|
||||
vjs.eachProp(options['children'], function(name, opts){
|
||||
|
||||
// Allow for disabling default components
|
||||
// e.g. vjs.options.components.posterImage = false
|
||||
// e.g. vjs.options['children']['posterImage'] = false
|
||||
if (opts === false) return;
|
||||
|
||||
// Allow waiting to add components until a specific event is called
|
||||
@ -361,7 +361,7 @@ vjs.Component.prototype.initChildren = function(){
|
||||
self[name] = self.addChild(name, opts);
|
||||
};
|
||||
|
||||
if (opts.loadEvent) {
|
||||
if (opts['loadEvent']) {
|
||||
// this.one(opts.loadEvent, tempAdd)
|
||||
} else {
|
||||
tempAdd();
|
||||
|
10
src/js/controls.js
vendored
10
src/js/controls.js
vendored
@ -914,7 +914,7 @@ vjs.MuteToggle.prototype.update = function(){
|
||||
vjs.PosterImage = function(player, options){
|
||||
goog.base(this, player, options);
|
||||
|
||||
if (!this.player_.options.poster) {
|
||||
if (!this.player_.options['poster']) {
|
||||
this.hide();
|
||||
}
|
||||
|
||||
@ -931,8 +931,8 @@ vjs.PosterImage.prototype.createEl = function(){
|
||||
});
|
||||
|
||||
// src throws errors if no poster was defined.
|
||||
if (this.player_.options.poster) {
|
||||
el.src = this.player_.options.poster;
|
||||
if (this.player_.options['poster']) {
|
||||
el.src = this.player_.options['poster'];
|
||||
}
|
||||
return el;
|
||||
};
|
||||
@ -976,7 +976,7 @@ vjs.Menu.prototype.createEl = function(){
|
||||
vjs.MenuItem = function(player, options){
|
||||
goog.base(this, player, options);
|
||||
|
||||
if (options.selected) {
|
||||
if (options['selected']) {
|
||||
this.addClass('vjs-selected');
|
||||
}
|
||||
};
|
||||
@ -985,7 +985,7 @@ goog.inherits(vjs.MenuItem, vjs.Button);
|
||||
vjs.MenuItem.prototype.createEl = function(type, props){
|
||||
return goog.base(this, 'createEl', 'li', vjs.merge({
|
||||
className: 'vjs-menu-item',
|
||||
innerHTML: this.options.label
|
||||
innerHTML: this.options['label']
|
||||
}, props));
|
||||
};
|
||||
|
||||
|
@ -18,10 +18,10 @@ goog.require('vjs.MediaTechController');
|
||||
vjs.Flash = function(player, options, ready){
|
||||
goog.base(this, player, options, ready);
|
||||
|
||||
var source = options.source,
|
||||
var source = options['source'],
|
||||
|
||||
// Which element to embed in
|
||||
parentEl = options.parentEl,
|
||||
parentEl = options['parentEl'],
|
||||
|
||||
// Create a temporary element to be replaced by swf object
|
||||
placeHolder = this.el_ = vjs.createEl('div', { id: player.id() + '_temp_flash' }),
|
||||
@ -74,11 +74,11 @@ vjs.Flash = function(player, options, ready){
|
||||
|
||||
// Having issues with Flash reloading on certain page actions (hide/resize/fullscreen) in certain browsers
|
||||
// This allows resetting the playhead when we catch the reload
|
||||
if (options.startTime) {
|
||||
if (options['startTime']) {
|
||||
this.ready(function(){
|
||||
this.load();
|
||||
this.play();
|
||||
this.currentTime(options.startTime);
|
||||
this.currentTime(options['startTime']);
|
||||
});
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ vjs.Flash = function(player, options, ready){
|
||||
// Not sure why that even works, but it causes the browser to look like it's continuously trying to load the page.
|
||||
// Firefox 3.6 keeps calling the iframe onload function anytime I write to it, causing an endless loop.
|
||||
|
||||
if (options.iFrameMode === true && !vjs.IS_FIREFOX) {
|
||||
if (options['iFrameMode'] === true && !vjs.IS_FIREFOX) {
|
||||
|
||||
// Create iFrame with vjs-tech class so it's 100% width/height
|
||||
var iFrm = vjs.createEl('iframe', {
|
||||
@ -124,14 +124,14 @@ vjs.Flash = function(player, options, ready){
|
||||
|
||||
// Tried embedding the flash object in the page first, and then adding a place holder to the iframe, then replacing the placeholder with the page object.
|
||||
// The goal here was to try to load the swf URL in the parent page first and hope that got around the firefox security error
|
||||
// var newObj = vjs.Flash.embed(options.swf, placeHolder, flashVars, params, attributes);
|
||||
// var newObj = vjs.Flash.embed(options['swf'], placeHolder, flashVars, params, attributes);
|
||||
// (in onload)
|
||||
// var temp = vjs.createEl('a', { id:'asdf', innerHTML: 'asdf' } );
|
||||
// iDoc.body.appendChild(temp);
|
||||
|
||||
// Tried embedding the flash object through javascript in the iframe source.
|
||||
// This works in webkit but still triggers the firefox security error
|
||||
// iFrm.src = 'javascript: document.write('"+vjs.Flash.getEmbedCode(options.swf, flashVars, params, attributes)+"');";
|
||||
// iFrm.src = 'javascript: document.write('"+vjs.Flash.getEmbedCode(options['swf'], flashVars, params, attributes)+"');";
|
||||
|
||||
// Tried an actual local iframe just to make sure that works, but it kills the easiness of the CDN version if you require the user to host an iframe
|
||||
// We should add an option to host the iframe locally though, because it could help a lot of issues.
|
||||
|
@ -16,7 +16,7 @@ goog.require('vjs.MediaTechController');
|
||||
vjs.Html5 = function(player, options, ready){
|
||||
goog.base(this, player, options, ready);
|
||||
|
||||
var source = options.source;
|
||||
var source = options['source'];
|
||||
|
||||
// If the element source is already set, we may have missed the loadstart event, and want to trigger it.
|
||||
// We don't want to set the source again and interrupt playback.
|
||||
@ -33,7 +33,7 @@ vjs.Html5 = function(player, options, ready){
|
||||
// In Chrome (15), if you have autoplay + a poster + no controls, the video gets hidden (but audio plays)
|
||||
// This fixes both issues. Need to wait for API, so it updates displays correctly
|
||||
player.ready(function(){
|
||||
if (this.options.autoplay && this.paused()) {
|
||||
if (this.options['autoplay'] && this.paused()) {
|
||||
this.tag.poster = null; // Chrome Fix. Fixed in Chrome v16.
|
||||
this.play();
|
||||
}
|
||||
@ -194,7 +194,7 @@ vjs.Html5.prototype.ended = function(){ return this.el_.ended; };
|
||||
// playbackRate: function(){ return this.el_.playbackRate; },
|
||||
// mediaGroup: function(){ return this.el_.mediaGroup; },
|
||||
// controller: function(){ return this.el_.controller; },
|
||||
vjs.Html5.prototype.controls = function(){ return this.player_.options.controls; };
|
||||
vjs.Html5.prototype.controls = function(){ return this.player_.options['controls']; };
|
||||
vjs.Html5.prototype.defaultMuted = function(){ return this.el_.defaultMuted; };
|
||||
|
||||
/* HTML5 Support Testing ---------------------------------------------------- */
|
||||
|
@ -29,7 +29,7 @@ goog.inherits(vjs.MediaTechController, vjs.Component);
|
||||
* Handle a click on the media element. By default will play the media.
|
||||
*/
|
||||
vjs.MediaTechController.prototype.onClick = function(){
|
||||
if (this.player_.options.controls) {
|
||||
if (this.player_.options['controls']) {
|
||||
if (this.player_.paused()) {
|
||||
this.player_.play();
|
||||
} else {
|
||||
|
@ -746,7 +746,7 @@ vjs.TextTrackMenuItem.prototype.update = function(){
|
||||
*/
|
||||
vjs.OffTextTrackMenuItem = function(player, options){
|
||||
// Create pseudo track info
|
||||
// Requires options.kind
|
||||
// Requires options['kind']
|
||||
options['track'] = {
|
||||
kind: function() { return options['kind']; },
|
||||
player: player,
|
||||
|
@ -1,57 +1,57 @@
|
||||
(function() {var c=void 0,f=!0,h=null,j=!1;function l(a){return function(){return this[a]}}function m(a){return function(){return a}}var n,aa=this;aa.$b=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.P[a])return u.P[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:{sc:"http://vjs.zencdn.net/c/video-js.swf"},width:300,height:150,defaultVolume:0,children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{}}};u.P={};u.ic={};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.J||(e.disabled=j,e.J=function(b){if(!e.disabled){b=u.Wa(b);var d=e.q[b.type];if(d)for(var d=d.slice(0),k=0,r=d.length;k<r&&!b.ab();k++)d[k].call(a,b)}});1==e.q[b].length&&(document.addEventListener?a.addEventListener(b,e.J,j):document.attachEvent&&a.attachEvent("on"+b,e.J))};
|
||||
(function() {var c=void 0,f=!0,h=null,j=!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.P[a])return u.P[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:{qc:"http://vjs.zencdn.net/c/video-js.swf"},width:300,height:150,defaultVolume:0,children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{}}};u.P={};u.fc={};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.J||(e.disabled=j,e.J=function(b){if(!e.disabled){b=u.Wa(b);var d=e.q[b.type];if(d)for(var d=d.slice(0),k=0,r=d.length;k<r&&!b.ab();k++)d[k].call(a,b)}});1==e.q[b].length&&(document.addEventListener?a.addEventListener(b,e.J,j):document.attachEvent&&a.attachEvent("on"+b,e.J))};
|
||||
u.j=function(a,b,d){if(u.$a(a)){var e=u.getData(a);if(e.q)if(b){var g=e.q[b];if(g){if(d){if(d.p)for(e=0;e<g.length;e++)g[e].p===d.p&&g.splice(e--,1)}else e.q[b]=[];u.Ta(a,b)}}else for(g in e.q)b=g,e.q[b]=[],u.Ta(a,b)}};u.Ta=function(a,b){var d=u.getData(a);0===d.q[b].length&&(delete d.q[b],document.removeEventListener?a.removeEventListener(b,d.J,j):document.detachEvent&&a.detachEvent("on"+b,d.J));u.la(d.q)&&(delete d.q,delete d.J,delete d.disabled);u.la(d)&&u.Oa(a)};
|
||||
u.Wa=function(a){function b(){return f}function d(){return j}if(!a||!a.Ea){var e=a||window.event,g;for(g in e)a[g]=e[g];a.target||(a.target=a.srcElement||document);a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;a.preventDefault=function(){a.returnValue=j;a.ka=b};a.ka=d;a.stopPropagation=function(){a.cancelBubble=f;a.Ea=b};a.Ea=d;a.stopImmediatePropagation=function(){a.ab=b;a.stopPropagation()};a.ab=d;a.clientX!=h&&(e=document.documentElement,g=document.body,a.pageX=a.clientX+(e&&
|
||||
e.scrollLeft||g&&g.scrollLeft||0)-(e&&e.clientLeft||g&&g.clientLeft||0),a.pageY=a.clientY+(e&&e.scrollTop||g&&g.scrollTop||0)-(e&&e.clientTop||g&&g.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};
|
||||
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.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.ec={};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.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.Zb=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&&0<a.attributes.length)for(var d=a.attributes,e,g,p=d.length-1;0<=p;p--){e=d[p].name;g=d[p].value;if("boolean"===typeof a[e]||-1!==",autoplay,controls,loop,muted,default,".indexOf(","+e+","))g=g!==h?f:j;b[e]=g}return b};
|
||||
u.Da=function(a,b){var d="";document.defaultView&&document.defaultView.getComputedStyle?d=document.defaultView.getComputedStyle(a,"").getPropertyValue(b):a.currentStyle&&(b=b.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),d=a.currentStyle[b]);return d};u.V=function(a,b){b.firstChild?b.insertBefore(a,b.firstChild):b.appendChild(a)};u.Pa={};u.f=function(a){0===a.indexOf("#")&&(a=a.slice(1));return document.getElementById(a)};
|
||||
u.o=function(a,b){b=b||a;var d=Math.floor(a%60),e=Math.floor(a/60%60),g=Math.floor(a/3600),p=Math.floor(b/60%60),k=Math.floor(b/3600),g=0<g||0<k?g+":":"";return g+(((g||10<=p)&&10>e?"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.o=function(a,b){b=b||a;var d=Math.floor(a%60),e=Math.floor(a/60%60),g=Math.floor(a/3600),p=Math.floor(b/60%60),k=Math.floor(b/3600),g=0<g||0<k?g+":":"";return g+(((g||10<=p)&&10>e?"0"+e:e)+":")+(10>d?"0"+d:d)};u.ub=function(){document.body.focus();document.onselectstart=m(j)};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.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(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:'<a href="'+a+'">x</a>'}).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;
|
||||
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.Pb=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:'<a href="'+a+'">x</a>'}).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.Gb=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.loadEvent&&(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.f=l("b");n.id=l("K");n.name=l("Gb");n.children=l("C");n.F=function(a,b){var d,e,g;"string"===typeof a?(e=a,b=b||{},d=b.componentClass||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&&0<b.length){for(var d=0,e=b.length;d<e;d++)b[d].call(a);a.sa=[];a.g("ready")}}n.m=function(a){u.m(this.b,a);return this};n.u=function(a){u.u(this.b,a);return this};n.show=function(){this.b.style.display="block";return this};n.t=function(){this.b.style.display="none";return this};n.ia=function(){this.u("vjs-fade-out");this.m("vjs-fade-in");return this};
|
||||
n.Ba=function(){this.u("vjs-fade-in");this.m("vjs-fade-out");return this};n.bb=function(){var a=this.b.style;a.display="block";a.opacity=1;a.Yb="visible";return this};function ha(a){a=a.b.style;a.display="";a.opacity="";a.Yb=""}n.width=function(a,b){return ia(this,"width",a,b)};n.height=function(a,b){return ia(this,"height",a,b)};n.yb=function(a,b){return this.width(a,f).height(b)};
|
||||
function ia(a,b,d,e){if(d!==c)return a.b.style[b]=-1!==(""+d).indexOf("%")||-1!==(""+d).indexOf("px")?d:d+"px",e||a.g("resize"),a;if(!a.b)return 0;d=a.b.style[b];e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(a.b["offset"+u.I(b)],10)};function v(a,b,d){this.H=a;var e={};u.s(e,u.options);u.s(e,ja(a));u.s(e,b);this.n={};y.call(this,this,e,d);this.z("play",function(a){u.g(this.b,{type:"firstplay",target:this.b})||(a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation())});this.e("ended",this.Jb);this.e("play",this.La);this.e("pause",this.Ka);this.e("progress",this.Kb);this.e("durationchange",this.Ib);this.e("error",this.Ia);u.P[this.K]=this}t(v,y);n=v.prototype;
|
||||
n.Ba=function(){this.u("vjs-fade-in");this.m("vjs-fade-out");return this};n.bb=function(){var a=this.b.style;a.display="block";a.opacity=1;a.Wb="visible";return this};function ha(a){a=a.b.style;a.display="";a.opacity="";a.Wb=""}n.width=function(a,b){return ia(this,"width",a,b)};n.height=function(a,b){return ia(this,"height",a,b)};n.yb=function(a,b){return this.width(a,f).height(b)};
|
||||
function ia(a,b,d,e){if(d!==c)return a.b.style[b]=-1!==(""+d).indexOf("%")||-1!==(""+d).indexOf("px")?d:d+"px",e||a.g("resize"),a;if(!a.b)return 0;d=a.b.style[b];e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(a.b["offset"+u.I(b)],10)};function v(a,b,d){this.H=a;var e={};u.s(e,u.options);u.s(e,ja(a));u.s(e,b);this.n={};y.call(this,this,e,d);this.z("play",function(a){u.g(this.b,{type:"firstplay",target:this.b})||(a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation())});this.e("ended",this.Ib);this.e("play",this.La);this.e("pause",this.Ka);this.e("progress",this.Jb);this.e("durationchange",this.Hb);this.e("error",this.Ia);u.P[this.K]=this}t(v,y);n=v.prototype;
|
||||
n.l=function(){u.P[this.K]=h;this.H&&this.H.player&&(this.H.player=h);this.b&&this.b.player&&(this.b.player=h);clearInterval(this.ra);this.da();this.i&&this.i.l();v.h.l.call(this)};function ja(a){var b={sources:[],tracks:[]};u.s(b,u.N(a));if(a.hasChildNodes())for(var d,e=a.childNodes,g=0,p=e.length;g<p;g++)a=e[g],d=a.nodeName.toLowerCase(),"source"===d?b.sources.push(u.N(a)):"track"===d&&b.tracks.push(u.N(a));return b}
|
||||
n.d=function(){var a=this.b=v.h.d.call(this,"div"),b=this.H;b.removeAttribute("controls");b.removeAttribute("poster");b.removeAttribute("width");b.removeAttribute("height");if(b.hasChildNodes())for(var d=b.childNodes.length,e=0,g=b.childNodes;e<d;e++)("source"==g[0].nodeName.toLowerCase()||"track"==g[0].nodeName.toLowerCase())&&b.removeChild(g[0]);b.id=b.id||"vjs_video_"+u.p++;a.id=b.id;a.className=b.className;b.id+="_html5_api";b.className="vjs-tech";b.player=a.player=this;this.m("vjs-paused");this.width(this.options.width,
|
||||
f);this.height(this.options.height,f);b.parentNode&&b.parentNode.insertBefore(a,b);u.V(b,a);return a};
|
||||
function ka(a,b,d){a.i?la(a):"Html5"!==b&&a.H&&(a.b.removeChild(a.H),a.H=h);a.Q=b;a.W=j;var e=u.s({source:d,Lb:a.b},a.options[b.toLowerCase()]);d&&(d.src==a.n.src&&0<a.n.currentTime&&(e.startTime=a.n.currentTime),a.n.src=d.src);a.i=new window.videojs[b](a,e);z(a.i,function(){A(this.a);if(!this.D.Na){var a=this.a;a.Ga=f;a.ra=setInterval(u.bind(a,function(){this.n.xa<this.buffered().end(0)?this.g("progress"):1==ma(this)&&(clearInterval(this.ra),this.g("progress"))}),500);a.i.z("progress",function(){this.D.Na=
|
||||
function ka(a,b,d){a.i?la(a):"Html5"!==b&&a.H&&(a.b.removeChild(a.H),a.H=h);a.Q=b;a.W=j;var e=u.s({source:d,mc:a.b},a.options[b.toLowerCase()]);d&&(d.src==a.n.src&&0<a.n.currentTime&&(e.startTime=a.n.currentTime),a.n.src=d.src);a.i=new window.videojs[b](a,e);z(a.i,function(){A(this.a);if(!this.D.Na){var a=this.a;a.Ga=f;a.ra=setInterval(u.bind(a,function(){this.n.xa<this.buffered().end(0)?this.g("progress"):1==ma(this)&&(clearInterval(this.ra),this.g("progress"))}),500);a.i.z("progress",function(){this.D.Na=
|
||||
f;var a=this.a;a.Ga=j;clearInterval(a.ra)})}this.D.Qa||(a=this.a,a.Ha=f,a.e("play",a.ib),a.e("pause",a.da),a.i.z("timeupdate",function(){this.D.Qa=f;na(this.a)}))})}function la(a){a.i.l();a.Ga&&(a.Ga=j,clearInterval(a.ra));a.Ha&&na(a);a.i=j}function na(a){a.Ha=j;a.da();a.j("play",a.ib);a.j("pause",a.da)}n.ib=function(){this.Va&&this.da();this.Va=setInterval(u.bind(this,function(){this.g("timeupdate")}),250)};n.da=function(){clearInterval(this.Va)};
|
||||
n.Jb=function(){this.options.loop&&(this.currentTime(0),this.play())};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")};n.Kb=function(){1==ma(this)&&this.g("loadedalldata")};n.Ib=function(){this.duration(B(this,"duration"))};n.Ia=function(a){u.log("Video Error",a)};function C(a,b,d){if(a.i&&a.i.W)z(a.i,function(){this[b](d)});else try{a.i[b](d)}catch(e){u.log(e)}}
|
||||
n.Ib=function(){this.options.loop&&(this.currentTime(0),this.play())};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")};n.Jb=function(){1==ma(this)&&this.g("loadedalldata")};n.Hb=function(){this.duration(B(this,"duration"))};n.Ia=function(a){u.log("Video Error",a)};function C(a,b,d){if(a.i&&a.i.W)z(a.i,function(){this[b](d)});else try{a.i[b](d)}catch(e){u.log(e)}}
|
||||
function B(a,b){if(a.i.W)try{return a.i[b]()}catch(d){if(a.i[b]===c)u.log("Video.js: "+b+" method not defined for "+a.Q+" playback technology.",d);else{if("TypeError"==d.name)throw u.log("Video.js: "+b+" unavailable on "+a.Q+" playback technology element.",d),a.i.W=j,d;u.log(d)}}}n.play=function(){var a={type:"play",target:this.b};this.g(a);a.ka()||C(this,"play");return this};n.pause=function(){C(this,"pause");return this};n.paused=function(){return B(this,"paused")===j?j:f};
|
||||
n.currentTime=function(a){return a!==c?(this.n.oc=a,C(this,"setCurrentTime",a),this.Ha&&this.g("timeupdate"),this):this.n.currentTime=B(this,"currentTime")||0};n.duration=function(a){return a!==c?(this.n.duration=parseFloat(a),this):this.n.duration};n.buffered=function(){var a=B(this,"buffered"),b=this.n.xa=this.n.xa||0;a&&(0<a.length&&a.end(0)!==b)&&(b=a.end(0),this.n.xa=b);return u.za(b)};function ma(a){return a.duration()?a.buffered().end(0)/a.duration():0}
|
||||
n.volume=function(a){if(a!==c)return a=Math.max(0,Math.min(1,parseFloat(a))),this.n.volume=a,C(this,"setVolume",a),u.Rb(a),this;a=parseFloat(B(this,"volume"));return isNaN(a)?1:a};n.muted=function(a){return a!==c?(C(this,"setMuted",a),this):B(this,"muted")||j};n.ua=function(){return B(this,"supportsFullScreen")||j};
|
||||
n.ta=function(){var a=u.Pa.ta;this.O=f;a?(u.e(document,a.U,u.bind(this,function(){this.O=document[a.O];this.O===j&&u.j(document,a.U,arguments.callee);this.g("fullscreenchange")})),this.i.D.Ya===j&&this.options.flash.iFrameMode!==f&&(this.pause(),la(this),u.e(document,a.U,u.bind(this,function(){u.j(document,a.U,arguments.callee);ka(this,this.Q,{src:this.n.src})}))),this.b[a.Nb]()):this.i.ua()?(this.g("fullscreenchange"),C(this,"enterFullScreen")):(this.g("fullscreenchange"),this.Db=f,this.zb=document.documentElement.style.overflow,
|
||||
n.currentTime=function(a){return a!==c?(this.n.kc=a,C(this,"setCurrentTime",a),this.Ha&&this.g("timeupdate"),this):this.n.currentTime=B(this,"currentTime")||0};n.duration=function(a){return a!==c?(this.n.duration=parseFloat(a),this):this.n.duration};n.buffered=function(){var a=B(this,"buffered"),b=this.n.xa=this.n.xa||0;a&&(0<a.length&&a.end(0)!==b)&&(b=a.end(0),this.n.xa=b);return u.za(b)};function ma(a){return a.duration()?a.buffered().end(0)/a.duration():0}
|
||||
n.volume=function(a){if(a!==c)return a=Math.max(0,Math.min(1,parseFloat(a))),this.n.volume=a,C(this,"setVolume",a),u.Pb(a),this;a=parseFloat(B(this,"volume"));return isNaN(a)?1:a};n.muted=function(a){return a!==c?(C(this,"setMuted",a),this):B(this,"muted")||j};n.ua=function(){return B(this,"supportsFullScreen")||j};
|
||||
n.ta=function(){var a=u.Pa.ta;this.O=f;a?(u.e(document,a.U,u.bind(this,function(){this.O=document[a.O];this.O===j&&u.j(document,a.U,arguments.callee);this.g("fullscreenchange")})),this.i.D.Ya===j&&this.options.flash.iFrameMode!==f&&(this.pause(),la(this),u.e(document,a.U,u.bind(this,function(){u.j(document,a.U,arguments.callee);ka(this,this.Q,{src:this.n.src})}))),this.b[a.Lb]()):this.i.ua()?(this.g("fullscreenchange"),C(this,"enterFullScreen")):(this.g("fullscreenchange"),this.Db=f,this.zb=document.documentElement.style.overflow,
|
||||
u.e(document,"keydown",u.bind(this,this.Xa)),document.documentElement.style.overflow="hidden",u.m(document.body,"vjs-full-window"),u.m(this.b,"vjs-fullscreen"),this.g("enterFullWindow"));return this};function oa(a){var b=u.Pa.ta;a.O=j;b?(a.i.D.Ya===j&&a.options.flash.iFrameMode!==f&&(a.pause(),la(a),u.e(document,b.U,u.bind(a,function(){u.j(document,b.U,arguments.callee);ka(this,this.Q,{src:this.n.src})}))),document[b.wb]()):(a.i.ua()?C(a,"exitFullScreen"):pa(a),a.g("fullscreenchange"))}
|
||||
n.Xa=function(a){27===a.keyCode&&(this.O===f?oa(this):pa(this))};function pa(a){a.Db=j;u.j(document,"keydown",a.Xa);document.documentElement.style.overflow=a.zb;u.u(document.body,"vjs-full-window");u.u(a.b,"vjs-fullscreen");a.g("exitFullWindow")}
|
||||
n.src=function(a){if(a instanceof Array){var b;a:{b=a;for(var d=0,e=this.options.techOrder;d<e.length;d++){var g=u.I(e[d]),p=window.videojs[g];if(p.isSupported())for(var k=0,r=b;k<r.length;k++){var q=r[k];if(p.canPlaySource(q)){b={source:q,i:g};break a}}}b=j}b?(a=b.source,b=b.i,b==this.Q?this.src(a):ka(this,b,a)):this.b.appendChild(u.d("p",{innerHTML:'Sorry, no compatible source and playback technology were found for this video. Try using another browser like <a href="http://www.google.com/chrome">Google Chrome</a> or download the latest <a href="http://get.adobe.com/flashplayer/">Adobe Flash Player</a>.'}))}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.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<d.length;b++){var e=u.I(d[b]),g=window.videojs[e];if(g&&g.isSupported()){ka(a,e);break}}}else a.src(a.options.sources)}t(wa,y);function E(a,b){y.call(this,a,b)}t(E,y);E.prototype.w=function(){return"vjs-control "+E.h.w.call(this)};function F(a,b){y.call(this,a,b);a.z("play",u.bind(this,function(){this.ia();this.a.e("mouseover",u.bind(this,this.ia));this.a.e("mouseout",u.bind(this,this.Ba))}))}t(F,y);n=F.prototype;n.options={Fb:"play",children:{playToggle:{},fullscreenToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},progressControl:{},volumeControl:{},muteToggle:{}}};
|
||||
if(document.cc!==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={Lb: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<d.length;b++){var e=u.I(d[b]),g=window.videojs[e];if(g&&g.isSupported()){ka(a,e);break}}}else a.src(a.options.sources)}t(wa,y);function E(a,b){y.call(this,a,b)}t(E,y);E.prototype.w=function(){return"vjs-control "+E.h.w.call(this)};function F(a,b){y.call(this,a,b);a.z("play",u.bind(this,function(){this.ia();this.a.e("mouseover",u.bind(this,this.ia));this.a.e("mouseout",u.bind(this,this.Ba))}))}t(F,y);n=F.prototype;n.options={lc:"play",children:{playToggle:{},fullscreenToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},progressControl:{},volumeControl:{},muteToggle:{}}};
|
||||
n.d=function(){return u.d("div",{className:"vjs-control-bar"})};n.ia=function(){F.h.ia.call(this);this.a.g("controlsvisible")};n.Ba=function(){F.h.Ba.call(this);this.a.g("controlshidden")};n.bb=function(){this.b.style.opacity="1"};function G(a,b){y.call(this,a,b);this.e("click",this.k);this.e("focus",this.oa);this.e("blur",this.na)}t(G,E);n=G.prototype;
|
||||
n.d=function(a,b){b=u.s({className:this.w(),innerHTML:'<div><span class="vjs-control-text">'+(this.L||"Need Text")+"</span></div>",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";
|
||||
n.d=function(a,b){b=u.s({className:this.w(),innerHTML:'<div><span class="vjs-control-text">'+(this.L||"Need Text")+"</span></div>",Mb:"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:"<span></span>"})};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.t));a.e("canplaythrough",u.bind(this,this.t));a.e("playing",u.bind(this,this.t));a.e("seeked",u.bind(this,this.t));a.e("seeking",u.bind(this,this.show));a.e("seeked",u.bind(this,this.t));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.bc||"string"==typeof this.a.f().style.dc?(a="vjs-loading-spinner",b='<div class="ball1"></div><div class="ball2"></div><div class="ball3"></div><div class="ball4"></div><div class="ball5"></div><div class="ball6"></div><div class="ball7"></div><div class="ball8"></div>'):(a="vjs-loading-spinner-fallback",b="");return L.h.d.call(this,
|
||||
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.$b||"string"==typeof this.a.f().style.bc?(a="vjs-loading-spinner",b='<div class="ball1"></div><div class="ball2"></div><div class="ball3"></div><div class="ball4"></div><div class="ball5"></div><div class="ball6"></div><div class="ball7"></div><div class="ball8"></div>'):(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.fa))}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.fa=function(){var a=this.a.eb?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.fa))}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.fa=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:"<div><span>/</span></div>"})};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.d=function(a,b){b=u.s({Mb:"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.Ub();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:'<span class="vjs-control-text">Loaded: 0%</span>'})};
|
||||
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.Vb=!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.Vb&&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:'<span class="vjs-control-text">Loaded: 0%</span>'})};
|
||||
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:'<span class="vjs-control-text">Progress: 0%</span>'})};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:'<span class="vjs-control-text">00:00</span>'})};
|
||||
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:'<span class="vjs-control-text"></span>'})};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:'<span class="vjs-control-text"></span>'})};
|
||||
@ -59,36 +59,36 @@ function Q(a,b){G.call(this,a,b);a.e("volumechange",u.bind(this,this.update))}t(
|
||||
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.d=function(){var a=this.a,b=a.H;if(!b||this.D.Fb===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.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.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.Sb=function(a){this.b.ca=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 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={gc:u.qb.webkitEnterFullScreen?!u.B.match("Chrome")&&!u.B.match("Mac OS X 10.5")?f:j:j,Fb:!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.parentEl;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.iFrameMode===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<Qa.length;i++)Ta(Qa[i]),Sa();for(i=0;i<Ra.length;i++)Ta(Ra[i]);V.prototype.D={Cb:{"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},Na:j,Qa:j,Ya:j,pc:!u.B.match("Firefox")};V.onReady=function(a){a=u.f(a);var b=a.player||a.parentNode.player,d=b.i;a.player=b;d.b=a;d.e("click",d.k);Oa(d)};function Oa(a){a.f().vjs_getProperty?A(a):setTimeout(function(){Oa(a)},50)}V.onEvent=function(a,b){"play"!==b&&u.f(a).player.g(b)};
|
||||
V.onError=function(a,b){u.f(a).player.g("error");u.log("Flash Error",b,a)};function Na(a,b,d,e){var g="",p="",k="";b&&u.T(b,function(a,b){g+=a+"="+b+"&"});d=u.s({movie:a,flashvars:g,allowScriptAccess:"always",allowNetworking:"all"},d);u.T(d,function(a,b){p+='<param name="'+a+'" value="'+b+'" />'});e=u.s({data:a,width:"100%",height:"100%"},e);u.T(e,function(a,b){k+=a+'="'+b+'" '});return'<object type="application/x-shockwave-flash"'+k+">"+p+"</object>"};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<p;g++)k=e[g],k.id()===b?(k.show(),r=k):d&&(k.A()==d&&0<k.mode())&&k.disable();(b=r?r.A():d?d:j)&&a.g(b+"trackchange")}function X(a,b){y.call(this,a,b);this.K=b.id||"vjs_"+b.kind+"_"+b.language+"_"+u.p++;this.fb=b.src;this.xb=b["default"]||b.dflt;this.tc=b.title;this.nc=b.srclang;this.Eb=b.label;this.S=[];this.Ra=[];this.Y=this.Z=0}t(X,y);n=X.prototype;n.A=l("r");n.src=l("fb");n.Aa=l("xb");n.label=l("Eb");
|
||||
function Ta(a){Pa[a]=function(){return this.b.vjs_getProperty(a)}}for(i=0;i<Qa.length;i++)Ta(Qa[i]),Sa();for(i=0;i<Ra.length;i++)Ta(Ra[i]);V.prototype.D={Cb:{"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},Na:j,Qa:j,Ya:j,nc:!u.B.match("Firefox")};V.onReady=function(a){a=u.f(a);var b=a.player||a.parentNode.player,d=b.i;a.player=b;d.b=a;d.e("click",d.k);Oa(d)};function Oa(a){a.f().vjs_getProperty?A(a):setTimeout(function(){Oa(a)},50)}V.onEvent=function(a,b){"play"!==b&&u.f(a).player.g(b)};
|
||||
V.onError=function(a,b){u.f(a).player.g("error");u.log("Flash Error",b,a)};function Na(a,b,d,e){var g="",p="",k="";b&&u.T(b,function(a,b){g+=a+"="+b+"&"});d=u.s({movie:a,flashvars:g,allowScriptAccess:"always",allowNetworking:"all"},d);u.T(d,function(a,b){p+='<param name="'+a+'" value="'+b+'" />'});e=u.s({data:a,width:"100%",height:"100%"},e);u.T(e,function(a,b){k+=a+'="'+b+'" '});return'<object type="application/x-shockwave-flash"'+k+">"+p+"</object>"};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<p;g++)k=e[g],k.id()===b?(k.show(),r=k):d&&(k.A()==d&&0<k.mode())&&k.disable();(b=r?r.A():d?d:j)&&a.g(b+"trackchange")}function X(a,b){y.call(this,a,b);this.K=b.id||"vjs_"+b.kind+"_"+b.language+"_"+u.p++;this.fb=b.src;this.xb=b["default"]||b.dflt;this.rc=b.title;this.jc=b.srclang;this.Eb=b.label;this.S=[];this.Ra=[];this.Y=this.Z=0}t(X,y);n=X.prototype;n.A=l("r");n.src=l("fb");n.Aa=l("xb");n.label=l("Eb");
|
||||
n.readyState=l("Z");n.mode=l("Y");n.d=function(){return X.h.d.call(this,"div",{className:"vjs-"+this.r+" vjs-text-track"})};n.show=function(){Va(this);this.Y=2;X.h.show.call(this)};n.t=function(){Va(this);this.Y=1;X.h.t.call(this)};n.disable=function(){2==this.Y&&this.t();this.a.j("timeupdate",u.bind(this,this.update,this.K));this.a.j("ended",u.bind(this,this.reset,this.K));this.reset();this.a.G.textTrackDisplay.removeChild(this);this.Y=0};
|
||||
function Va(a){0===a.Z&&a.load();0===a.Y&&(a.a.e("timeupdate",u.bind(a,a.update,a.K)),a.a.e("ended",u.bind(a,a.reset,a.K)),("captions"===a.r||"subtitles"===a.r)&&a.a.G.textTrackDisplay.F(a))}n.load=function(){0===this.Z&&(this.Z=1,u.get(this.fb,u.bind(this,this.Mb),u.bind(this,this.Ia)))};n.Ia=function(a){this.error=a;this.Z=3;this.g("error")};
|
||||
n.Mb=function(a){var b,d;a=a.split("\n");for(var e="",g=1,p=a.length;g<p;g++)if(e=u.trim(a[g])){-1==e.indexOf("--\x3e")?(b=e,e=u.trim(a[++g])):b=this.S.length;b={id:b,index:this.S.length};d=e.split(" --\x3e ");b.startTime=Wa(d[0]);b.$=Wa(d[1]);for(d=[];a[++g]&&(e=u.trim(a[g]));)d.push(e);b.text=d.join("<br/>");this.S.push(b)}this.Z=2;this.g("loaded")};
|
||||
function Va(a){0===a.Z&&a.load();0===a.Y&&(a.a.e("timeupdate",u.bind(a,a.update,a.K)),a.a.e("ended",u.bind(a,a.reset,a.K)),("captions"===a.r||"subtitles"===a.r)&&a.a.G.textTrackDisplay.F(a))}n.load=function(){0===this.Z&&(this.Z=1,u.get(this.fb,u.bind(this,this.Kb),u.bind(this,this.Ia)))};n.Ia=function(a){this.error=a;this.Z=3;this.g("error")};
|
||||
n.Kb=function(a){var b,d;a=a.split("\n");for(var e="",g=1,p=a.length;g<p;g++)if(e=u.trim(a[g])){-1==e.indexOf("--\x3e")?(b=e,e=u.trim(a[++g])):b=this.S.length;b={id:b,index:this.S.length};d=e.split(" --\x3e ");b.startTime=Wa(d[0]);b.$=Wa(d[1]);for(d=[];a[++g]&&(e=u.trim(a[g]));)d.push(e);b.text=d.join("<br/>");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.S.length){var a=this.a.currentTime();if(this.Ma===c||a<this.Ma||this.ma<=a){var b=this.S,d=this.a.duration(),e=0,g=j,p=[],k,r,q,w;a>=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<q.startTime){if(d=Math.min(d,q.startTime),q.ga&&(q.ga=j),!g)break}else g?(p.splice(0,0,q),r===c&&(r=w),k=w):(p.push(q),k===c&&(k=w),r=w),d=Math.min(d,q.$),e=Math.max(e,q.startTime),q.ga=
|
||||
f;if(g)if(0===w)break;else w--;else if(w===b.length-1)break;else w++}this.Ra=p;this.ma=d;this.Ma=e;this.Ca=k;this.Fa=r;a=this.Ra;b="";d=0;for(e=a.length;d<e;d++)b+='<span class="vjs-tt-cue">'+a[d].text+"</span>";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&&0<a.options.tracks.length){b=this.a;a=a.options.tracks;var e;for(d=0;d<a.length;d++){e=a[d];var g=b,p=e.kind,k=e.label,r=e.language,q=e;e=g.ea=g.ea||[];q=q||{};q.kind=p;q.label=k;q.language=r;p=u.I(p||"subtitles");g=new window.videojs[p+"Track"](g,q);e.push(g)}}}t($a,y);$a.prototype.d=function(){return $a.h.d.call(this,"div",{className:"vjs-text-track-display"})};
|
||||
function Y(a,b){var d=this.R=b.track;b.label=d.label();b.selected=d.Aa();S.call(this,a,b);this.a.e(d.A()+"trackchange",u.bind(this,this.update))}t(Y,S);Y.prototype.k=function(){Y.h.k.call(this);Ua(this.a,this.R.id(),this.R.A())};Y.prototype.update=function(){2==this.R.mode()?this.selected(f):this.selected(j)};function ab(a,b){b.track={A:function(){return b.kind},qc:a,label:m("Off"),Aa:m(j),mode:m(j)};Y.call(this,a,b)}t(ab,Y);ab.prototype.k=function(){ab.h.k.call(this);Ua(this.a,this.R.id(),this.R.A())};
|
||||
function Y(a,b){var d=this.R=b.track;b.label=d.label();b.selected=d.Aa();S.call(this,a,b);this.a.e(d.A()+"trackchange",u.bind(this,this.update))}t(Y,S);Y.prototype.k=function(){Y.h.k.call(this);Ua(this.a,this.R.id(),this.R.A())};Y.prototype.update=function(){2==this.R.mode()?this.selected(f):this.selected(j)};function ab(a,b){b.track={A:function(){return b.kind},oc:a,label:m("Off"),Aa:m(j),mode:m(j)};Y.call(this,a,b)}t(ab,Y);ab.prototype.k=function(){ab.h.k.call(this);Ua(this.a,this.R.id(),this.R.A())};
|
||||
ab.prototype.update=function(){for(var a=W(this.a),b=0,d=a.length,e,g=f;b<d;b++)e=a[b],e.A()==this.R.A()&&2==e.mode()&&(g=j);g?this.selected(f):this.selected(j)};function Z(a,b){G.call(this,a,b);this.X=this.ya();0===this.aa.length&&this.t()}t(Z,G);n=Z.prototype;n.ya=function(){var a=new R(this.a);a.f().appendChild(u.d("li",{className:"vjs-menu-title",innerHTML:u.I(this.r)}));Ka(a,new ab(this.a,{kind:this.r}));this.aa=this.Ua();for(var b=0;b<this.aa.length;b++)Ka(a,this.aa[b]);this.F(a);return a};
|
||||
n.Ua=function(){for(var a=[],b,d=0;d<W(this.a).length;d++)b=W(this.a)[d],b.A()===this.r&&a.push(new Y(this.a,{track:b}));return a};n.w=function(){return this.className+" vjs-menu-button "+Z.h.w.call(this)};n.oa=function(){this.X.bb();u.z(this.X.b.childNodes[this.X.b.childNodes.length-1],"blur",u.bind(this,function(){ha(this.X)}))};n.na=function(){};n.k=function(){this.z("mouseout",u.bind(this,function(){ha(this.X);this.b.blur()}))};function bb(a,b){Z.call(this,a,b)}t(bb,Z);bb.prototype.r="captions";
|
||||
bb.prototype.L="Captions";bb.prototype.className="vjs-captions-button";function cb(a,b){Z.call(this,a,b)}t(cb,Z);cb.prototype.r="subtitles";cb.prototype.L="Subtitles";cb.prototype.className="vjs-subtitles-button";function db(a,b){Z.call(this,a,b)}t(db,Z);n=db.prototype;n.r="chapters";n.L="Chapters";n.className="vjs-chapters-button";n.Ua=function(){for(var a=[],b,d=0;d<W(this.a).length;d++)b=W(this.a)[d],b.A()===this.r&&a.push(new Y(this.a,{track:b}));return a};
|
||||
n.ya=function(){for(var a=W(this.a),b=0,d=a.length,e,g,p=this.aa=[];b<d;b++)if(e=a[b],e.A()==this.r&&e.Aa()){if(2>e.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<d;b++)k=e[b],k=new eb(this.a,{track:g,cue:k}),p.push(k),a.F(k)}this.F(a);0<this.aa.length&&this.show();return a};
|
||||
n.ya=function(){for(var a=W(this.a),b=0,d=a.length,e,g,p=this.aa=[];b<d;b++)if(e=a[b],e.A()==this.r&&e.Aa()){if(2>e.readyState()){this.dc=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<d;b++)k=e[b],k=new eb(this.a,{track:g,cue:k}),p.push(k),a.F(k)}this.F(a);0<this.aa.length&&this.show();return a};
|
||||
function eb(a,b){var d=this.R=b.track,e=this.cue=b.cue,g=a.currentTime();b.label=e.text;b.selected=e.startTime<=g&&g<e.$;S.call(this,a,b);d.e("cuechange",u.bind(this,this.update))}t(eb,S);eb.prototype.k=function(){eb.h.k.call(this);this.a.currentTime(this.cue.startTime);this.update(this.cue.startTime)};eb.prototype.update=function(){var a=this.cue,b=this.a.currentTime();a.startTime<=b&&b<a.$?this.selected(f):this.selected(j)};
|
||||
u.s(F.prototype.options.children,{subtitlesButton:{},captionsButton:{},chaptersButton:{}});if(JSON&&"function"===JSON.parse)u.JSON=JSON;else{u.JSON={};var fb=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;u.JSON.parse=function(a,b){function d(a,e){var k,r,q=a[e];if(q&&"object"===typeof q)for(k in q)Object.prototype.hasOwnProperty.call(q,k)&&(r=d(q,k),r!==c?q[k]=r:delete q[k]);return b.call(a,e,q)}var e;a=String(a);fb.lastIndex=0;fb.test(a)&&(a=a.replace(fb,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 b?d({"":e},""):e;throw new SyntaxError("JSON.parse");}};u.wa=function(){var a,b,d=document.getElementsByTagName("video");if(d&&0<d.length)for(var e=0,g=d.length;e<g;e++)if((b=d[e])&&b.getAttribute)b.player===c&&(a=b.getAttribute("data-setup"),a!==h&&(a=u.JSON.parse(a||"{}"),x(b,a)));else{u.Sa();break}else u.Zb||u.Sa()};u.Sa=function(){setTimeout(u.wa,1)};u.z(window,"load",function(){u.Zb=f});u.wa();s("videojs",u);s("_V_",u);s("videojs.options",u.options);s("videojs.cache",u.M);s("videojs.Component",y);y.prototype.dispose=y.prototype.l;y.prototype.createEl=y.prototype.d;y.prototype.getEl=y.prototype.lc;y.prototype.addChild=y.prototype.F;y.prototype.getChildren=y.prototype.kc;y.prototype.on=y.prototype.e;y.prototype.off=y.prototype.j;y.prototype.one=y.prototype.z;y.prototype.trigger=y.prototype.g;y.prototype.show=y.prototype.show;y.prototype.hide=y.prototype.t;y.prototype.width=y.prototype.width;
|
||||
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 b?d({"":e},""):e;throw new SyntaxError("JSON.parse");}};u.wa=function(){var a,b,d=document.getElementsByTagName("video");if(d&&0<d.length)for(var e=0,g=d.length;e<g;e++)if((b=d[e])&&b.getAttribute)b.player===c&&(a=b.getAttribute("data-setup"),a!==h&&(a=u.JSON.parse(a||"{}"),x(b,a)));else{u.Sa();break}else u.Xb||u.Sa()};u.Sa=function(){setTimeout(u.wa,1)};u.z(window,"load",function(){u.Xb=f});u.wa();s("videojs",u);s("_V_",u);s("videojs.options",u.options);s("videojs.cache",u.M);s("videojs.Component",y);y.prototype.dispose=y.prototype.l;y.prototype.createEl=y.prototype.d;y.prototype.getEl=y.prototype.ic;y.prototype.addChild=y.prototype.F;y.prototype.getChildren=y.prototype.hc;y.prototype.on=y.prototype.e;y.prototype.off=y.prototype.j;y.prototype.one=y.prototype.z;y.prototype.trigger=y.prototype.g;y.prototype.show=y.prototype.show;y.prototype.hide=y.prototype.t;y.prototype.width=y.prototype.width;
|
||||
y.prototype.height=y.prototype.height;y.prototype.dimensions=y.prototype.yb;s("videojs.Player",v);s("videojs.MediaLoader",wa);s("videojs.PosterImage",Ja);s("videojs.LoadingSpinner",L);s("videojs.BigPlayButton",K);s("videojs.ControlBar",F);s("videojs.TextTrackDisplay",$a);s("videojs.Control",E);s("videojs.ControlBar",F);s("videojs.Button",G);s("videojs.PlayButton",H);s("videojs.PauseButton",I);s("videojs.PlayToggle",xa);s("videojs.FullscreenToggle",J);s("videojs.BigPlayButton",K);
|
||||
s("videojs.LoadingSpinner",L);s("videojs.CurrentTimeDisplay",M);s("videojs.DurationDisplay",N);s("videojs.TimeDivider",ya);s("videojs.RemainingTimeDisplay",za);s("videojs.Slider",O);s("videojs.ProgressControl",Ba);s("videojs.SeekBar",P);s("videojs.LoadProgressBar",Ca);s("videojs.PlayProgressBar",Da);s("videojs.SeekHandle",Ea);s("videojs.VolumeControl",Fa);s("videojs.VolumeBar",Ga);s("videojs.VolumeLevel",Ha);s("videojs.VolumeHandle",Ia);s("videojs.MuteToggle",Q);s("videojs.PosterImage",Ja);
|
||||
s("videojs.Menu",R);s("videojs.MenuItem",S);s("videojs.SubtitlesButton",cb);s("videojs.CaptionsButton",bb);s("videojs.ChaptersButton",db);s("videojs.MediaTechController",T);s("videojs.Html5",U);U.Events=Ma;U.isSupported=function(){return!!document.createElement("video").canPlayType};U.canPlaySource=function(a){return!!document.createElement("video").canPlayType(a.type)};U.prototype.setCurrentTime=U.prototype.Qb;U.prototype.setVolume=U.prototype.Vb;U.prototype.setMuted=U.prototype.Tb;
|
||||
U.prototype.setPreload=U.prototype.Ub;U.prototype.setAutoplay=U.prototype.Pb;U.prototype.setLoop=U.prototype.Sb;s("videojs.Flash",V);
|
||||
s("videojs.Menu",R);s("videojs.MenuItem",S);s("videojs.SubtitlesButton",cb);s("videojs.CaptionsButton",bb);s("videojs.ChaptersButton",db);s("videojs.MediaTechController",T);s("videojs.Html5",U);U.Events=Ma;U.isSupported=function(){return!!document.createElement("video").canPlayType};U.canPlaySource=function(a){return!!document.createElement("video").canPlayType(a.type)};U.prototype.setCurrentTime=U.prototype.Ob;U.prototype.setVolume=U.prototype.Tb;U.prototype.setMuted=U.prototype.Rb;
|
||||
U.prototype.setPreload=U.prototype.Sb;U.prototype.setAutoplay=U.prototype.Nb;U.prototype.setLoop=U.prototype.Qb;s("videojs.Flash",V);
|
||||
V.isSupported=function(){var a="0,0,0";try{a=(new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(b){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 10<=a.split(",")[0]};V.canPlaySource=function(a){if(a.type in V.prototype.D.Cb)return"maybe"};
|
||||
V.onReady=V.onReady;s("videojs.TextTrack",X);X.prototype.label=X.prototype.label;s("videojs.CaptionsTrack",Xa);s("videojs.SubtitlesTrack",Ya);s("videojs.ChaptersTrack",Za);s("videojs.autoSetup",u.wa);module("Component");function $(){return{id:m("player_1")}}test("should create an element",function(){var a=new y($(),{});ok(a.f().nodeName)});test("should add a child component",function(){var a=new y($()),b=a.F("component");ok(1===a.children().length);ok(a.children()[0]===b);ok(a.f().childNodes[0]===b.f());ok(a.G.component===b);var d=ok,e=b.id();d(a.ha[e]===b)});
|
||||
test("should init child coponents from options",function(){var a=new y($(),{children:{component:f}});ok(1===a.children().length);ok(1===a.f().childNodes.length)});
|
||||
@ -102,7 +102,7 @@ test("should return a video player instance",function(){document.getElementById(
|
||||
test("should remove all listeners from an element",function(){expect(2);var a=document.createElement("div");u.e(a,"fake1",function(){ok(f,"Fake1 Triggered")});u.e(a,"fake2",function(){ok(f,"Fake2 Triggered")});u.g(a,"fake1");u.g(a,"fake2");u.j(a);u.g(a,"fake1");u.g(a,"fake2")});test("should listen only once",function(){expect(1);var a=document.createElement("div");u.z(a,"click",function(){ok(f,"Click Triggered")});u.g(a,"click");u.g(a,"click")});
|
||||
test("should stop immediate propagtion",function(){expect(1);var a=document.createElement("div");u.e(a,"test",function(a){ok(f,"First listener fired");a.stopImmediatePropagation()});u.e(a,"test",function(){ok(j,"Second listener fired")});u.g(a,"test")});module("Lib");test("should create an element",function(){var a=u.d(),b=u.d("span",{"data-test":"asdf",innerHTML:"fdsa"});ok("DIV"===a.nodeName);ok("SPAN"===b.nodeName);ok("asdf"===b["data-test"]);ok("fdsa"===b.innerHTML)});test("should make a string start with an uppercase letter",function(){var a=u.I("bar");ok("Bar"===a)});test("should loop through each property on an object",function(){var a={rb:1,sb:2,c:3};u.T(a,function(b,d){a[b]=d+3});deepEqual(a,{rb:4,sb:5,c:6})});
|
||||
test("should add context to a function",function(){var a={test:"obj"};u.bind(a,function(){ok(this===a)})()});test("should add and remove a class name on an element",function(){var a=document.createElement("div");u.m(a,"test-class");ok("test-class"===a.className,"class added");u.m(a,"test-class");ok("test-class"===a.className,"same class not duplicated");u.m(a,"test-class2");ok("test-class test-class2"===a.className,"added second class");u.u(a,"test-class");ok("test-class2"===a.className,"removed first class")});
|
||||
test("should get and remove data from an element",function(){var a=document.createElement("div"),b=u.getData(a),d=a[u.expando];ok("object"===typeof b,"data object created");var e={cc:"fdsa"};b.test=e;ok(u.getData(a).test===e,"data added");u.Oa(a);ok(!u.M[d],"cached item nulled");ok(a[u.expando]===h||a[u.expando]===c,"element data id removed")});
|
||||
test("should get and remove data from an element",function(){var a=document.createElement("div"),b=u.getData(a),d=a[u.expando];ok("object"===typeof b,"data object created");var e={ac:"fdsa"};b.test=e;ok(u.getData(a).test===e,"data added");u.Oa(a);ok(!u.M[d],"cached item nulled");ok(a[u.expando]===h||a[u.expando]===c,"element data id removed")});
|
||||
test("should read tag attributes from elements, including HTML5 in all browsers",function(){var a=document.createElement("div"),b;b='<video id="vid1" controls autoplay loop muted preload="none" src="http://google.com" poster="http://www2.videojs.com/img/video-js-html5-video-player.png" data-test="asdf" data-empty-string=""></video><video id="vid2"><source id="source" src="http://google.com" type="video/mp4" media="fdsa" title="test" >';b+='<track id="track" default src="http://google.com" kind="captions" srclang="en" label="testlabel" title="test" >';
|
||||
a.innerHTML+=b;document.getElementById("qunit-fixture").appendChild(a);a=u.N(document.getElementById("vid2"));b=u.N(document.getElementById("source"));var d=u.N(document.getElementById("track"));deepEqual(u.N(document.getElementById("vid1")),{autoplay:f,controls:f,"data-test":"asdf","data-empty-string":"",id:"vid1",loop:f,muted:f,poster:"http://www2.videojs.com/img/video-js-html5-video-player.png",preload:"none",src:"http://google.com"});deepEqual(a,{id:"vid2"});deepEqual(b,{title:"test",media:"fdsa",
|
||||
type:"video/mp4",src:"http://google.com",id:"source"});deepEqual(d,{"default":f,id:"track",kind:"captions",label:"testlabel",src:"http://google.com",srclang:"en",title:"test"})});
|
||||
@ -118,5 +118,5 @@ ok(2===b.options.sources.length);ok("http://google.com"===b.options.sources[0].s
|
||||
b,"player referenceable from global list");ok(a.id!==b.id,"tag ID no longer is the same as player ID");ok(a.className!==b.f().className,"tag classname updated");b.l();ok(a.player===h,"tag player ref killed");ok(!u.P.example_1,"global player ref killed");ok(b.f()===h,"player el killed")});
|
||||
test("should set the width and height of the player",function(){var a=ib({width:123,height:"100%"});ok(123===a.width());ok("123px"===a.f().style.width);var b=document.getElementById("qunit-fixture"),d=document.createElement("div");b.appendChild(d);d.appendChild(a.f());d.style.height="1000px";ok(1E3===a.height());a.l()});
|
||||
test("should accept options from multiple sources and override in correct order",function(){var a=gb(),b=document.createElement("div"),d=document.getElementById("qunit-fixture");b.appendChild(a);d.appendChild(b);var d=new v(a),e=d.f();ok(e.parentNode===b,"player placed at same level as tag");ok(a.parentNode!==b,"tag removed from original place");d.l()});
|
||||
test("should load a media controller",function(){var a=ib({ca:"none",rc:[{src:"http://google.com",type:"video/mp4"},{src:"http://google.com",type:"video/webm"}]});ok(-1!==a.f().children[0].className.indexOf("vjs-tech"),"media controller loaded");a.l()});
|
||||
test("should load a media controller",function(){var a=ib({ca:"none",pc:[{src:"http://google.com",type:"video/mp4"},{src:"http://google.com",type:"video/webm"}]});ok(-1!==a.f().children[0].className.indexOf("vjs-tech"),"media controller loaded");a.l()});
|
||||
test("should not play if firstplay event prevents default",function(){expect(1);var a=ib({preload:"none",autoplay:j,sources:[{src:"http://google.com",type:"video/mp4"},{src:"http://google.com",type:"video/webm"}]});a.e("firstplay",function(a){ok(f,"firstplay triggered");a.preventDefault()});a.e("play",function(){ok(j,"play triggered anyway")});a.play();a.l()});module("Setup");})();//@ sourceMappingURL=video.js.map
|
||||
|
Loading…
x
Reference in New Issue
Block a user