webshims-rails 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/webshims-rails/version.rb +2 -2
- data/vendor/assets/javascripts/webshims/minified/polyfiller.js +30 -29
- data/vendor/assets/javascripts/webshims/minified/shims/combos/1.js +12 -12
- data/vendor/assets/javascripts/webshims/minified/shims/combos/10.js +76 -76
- data/vendor/assets/javascripts/webshims/minified/shims/combos/11.js +12 -12
- data/vendor/assets/javascripts/webshims/minified/shims/combos/12.js +12 -12
- data/vendor/assets/javascripts/webshims/minified/shims/combos/13.js +27 -27
- data/vendor/assets/javascripts/webshims/minified/shims/combos/16.js +12 -12
- data/vendor/assets/javascripts/webshims/minified/shims/combos/17.js +14 -14
- data/vendor/assets/javascripts/webshims/minified/shims/combos/18.js +63 -60
- data/vendor/assets/javascripts/webshims/minified/shims/combos/19.js +59 -59
- data/vendor/assets/javascripts/webshims/minified/shims/combos/20.js +1 -1
- data/vendor/assets/javascripts/webshims/minified/shims/combos/22.js +1 -1
- data/vendor/assets/javascripts/webshims/minified/shims/combos/24.js +67 -67
- data/vendor/assets/javascripts/webshims/minified/shims/combos/25.js +59 -58
- data/vendor/assets/javascripts/webshims/minified/shims/combos/26.js +81 -80
- data/vendor/assets/javascripts/webshims/minified/shims/combos/27.js +103 -102
- data/vendor/assets/javascripts/webshims/minified/shims/combos/6.js +34 -31
- data/vendor/assets/javascripts/webshims/minified/shims/combos/7.js +41 -38
- data/vendor/assets/javascripts/webshims/minified/shims/combos/8.js +35 -35
- data/vendor/assets/javascripts/webshims/minified/shims/combos/9.js +67 -67
- data/vendor/assets/javascripts/webshims/minified/shims/dom-extend.js +17 -17
- data/vendor/assets/javascripts/webshims/minified/shims/form-number-date-api.js +10 -8
- data/vendor/assets/javascripts/webshims/minified/shims/form-number-date-ui.js +24 -23
- data/vendor/assets/javascripts/webshims/minified/shims/mediaelement-swf.js +1 -1
- data/vendor/assets/javascripts/webshims/minified/shims/styles/shim.css +9 -0
- data/vendor/assets/javascripts/webshims/minified/shims/track-ui.js +9 -9
- data/vendor/assets/javascripts/webshims/minified/shims/track.js +21 -20
- data/vendor/assets/javascripts/webshims/polyfiller.js +144 -140
- data/vendor/assets/javascripts/webshims/shims/combos/1.js +10 -6
- data/vendor/assets/javascripts/webshims/shims/combos/10.js +11 -7
- data/vendor/assets/javascripts/webshims/shims/combos/11.js +10 -6
- data/vendor/assets/javascripts/webshims/shims/combos/12.js +10 -6
- data/vendor/assets/javascripts/webshims/shims/combos/13.js +10 -6
- data/vendor/assets/javascripts/webshims/shims/combos/16.js +10 -6
- data/vendor/assets/javascripts/webshims/shims/combos/17.js +10 -6
- data/vendor/assets/javascripts/webshims/shims/combos/18.js +986 -924
- data/vendor/assets/javascripts/webshims/shims/combos/19.js +10 -6
- data/vendor/assets/javascripts/webshims/shims/combos/20.js +1 -1
- data/vendor/assets/javascripts/webshims/shims/combos/22.js +1 -1
- data/vendor/assets/javascripts/webshims/shims/combos/24.js +10 -6
- data/vendor/assets/javascripts/webshims/shims/combos/25.js +820 -768
- data/vendor/assets/javascripts/webshims/shims/combos/26.js +820 -768
- data/vendor/assets/javascripts/webshims/shims/combos/27.js +821 -769
- data/vendor/assets/javascripts/webshims/shims/combos/6.js +986 -924
- data/vendor/assets/javascripts/webshims/shims/combos/7.js +986 -924
- data/vendor/assets/javascripts/webshims/shims/combos/8.js +10 -6
- data/vendor/assets/javascripts/webshims/shims/combos/9.js +11 -7
- data/vendor/assets/javascripts/webshims/shims/dom-extend.js +10 -6
- data/vendor/assets/javascripts/webshims/shims/form-number-date-api.js +77 -77
- data/vendor/assets/javascripts/webshims/shims/form-number-date-ui.js +909 -847
- data/vendor/assets/javascripts/webshims/shims/mediaelement-swf.js +1 -1
- data/vendor/assets/javascripts/webshims/shims/styles/shim.css +9 -0
- data/vendor/assets/javascripts/webshims/shims/track-ui.js +300 -291
- data/vendor/assets/javascripts/webshims/shims/track.js +810 -762
- metadata +10 -5
@@ -1,103 +1,104 @@
|
|
1
|
-
(function(){var a=Function.prototype.call,
|
2
|
-
if(!Array.isArray)Array.isArray=function(a){return"[object Array]"==l(a)};if(!Array.prototype.forEach)Array.prototype.forEach=function(a,
|
3
|
-
function(a,
|
4
|
-
for(var
|
5
|
-
|
6
|
-
|
7
|
-
!0,
|
8
|
-
a=[this.getUTCFullYear(),this.getUTCMonth()+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()];for(
|
9
|
-
if(!String.prototype.trim||a.trim()){var a="["+a+"]",
|
10
|
-
a!==a?a=-1:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(0<a||-1)*Math.floor(Math.abs(a)));return a},
|
11
|
-
(function(a,
|
12
|
-
if(!
|
13
|
-
|
14
|
-
typeof a&&"function"!==typeof a||null===a)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object");var j;if(Object.defineProperty&&Object.getOwnPropertyDescriptor)try{return j=Object.getOwnPropertyDescriptor(a,
|
15
|
-
n;if(
|
16
|
-
jQuery.webshims.register("dom-extend",function(a,
|
17
|
-
!0)),null==b&&(b=""),a.prop(
|
18
|
-
"shadowData");return a&&a[
|
19
|
-
("attr"==
|
20
|
-
|
21
|
-
|
22
|
-
b[0]&&a.nodeName(b[0],
|
23
|
-
d
|
24
|
-
return b}}(),extendUNDEFProp:function(
|
25
|
-
a(
|
26
|
-
k)||a.data(
|
27
|
-
|
28
|
-
{set:function(a){
|
29
|
-
reflectProperties:function(
|
30
|
-
a.isFunction(g.value)&&
|
31
|
-
|
32
|
-
d,c){
|
33
|
-
a.removeAttribute(
|
34
|
-
if(a.langObj[
|
35
|
-
a.each({defineNodeNamesProperty:"defineNodeNameProperty",defineNodeNamesProperties:"defineNodeNameProperties",createElements:"createElement"},function(a,
|
36
|
-
(function(a,
|
37
|
-
|
38
|
-
(function(a,
|
39
|
-
test:
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
function(){var
|
44
|
-
"f4a","fla"],"application/x-mpegURL":["m3u8","m3u"]},video:{"video/ogg":["ogg","ogv","ogm"],"video/mpeg":["mpg","mpeg","mpe"],"video/mp4":["mp4","mpg4","m4v"],"video/quicktime":["mov","qt"],"video/x-msvideo":["avi"],"video/x-ms-asf":["asf","asx"],"video/flv":["flv","f4v"],"video/3gpp":["3gp","3gpp"],"video/webm":["webm"],"application/x-mpegURL":["m3u8","m3u"],"video/MP2T":["ts"]}};
|
45
|
-
-1!=
|
46
|
-
else{var
|
47
|
-
|
48
|
-
a(
|
49
|
-
|
50
|
-
(!l||
|
51
|
-
"canPlayType",{prop:{value:function(
|
52
|
-
|
53
|
-
a.type&&(
|
54
|
-
jQuery.webshims.register("mediaelement-swf",function(a,
|
55
|
-
muted:!1};Object.keys(v);var x=a.extend({isActive:"html5",activating:"html5",wasSwfReady:!1,_bufferedEnd:0,_bufferedStart:0,_metadata:!1,_durationCalcs:-1,_callMeta:!1,currentTime:0,_ppFlag:l},
|
56
|
-
"jwplayer/"+(
|
57
|
-
|
58
|
-
{updatemediaelementdimensions:!0,flashblocker:!0,swfstageresize:!0,mediaelementapichange:!0});j.jwEvents={View:{PLAY:function(a){var
|
59
|
-
!1;if(
|
60
|
-
a.duration;b._lastDuration=b.duration;if(a.height||a.width)b.videoHeight=a.height||0,b.videoWidth=a.width||0;if(!b.networkState)b.networkState=2;1>b.readyState&&
|
61
|
-
|
62
|
-
|
63
|
-
"jQuery.webshims.mediaelement.jwEvents."+d+"."+a)}catch(e){return c=!1}})});return c},
|
64
|
-
"video"==b._elemNodeName){var c,d,e,f,g,
|
65
|
-
"poster");if(f&&(d="auto"==b._elem.style.width,e="auto"==b._elem.style.height,d||e))c&&(c.remove(),c=!1),c=a('<img style="position: absolute; height: auto; width: auto; top: 0px; left: 0px; visibility: hidden;" />'),c.bind("load error alreadycomplete",function(){clearTimeout(k);var b=this,d=b.naturalWidth||b.width||b.offsetWidth,e=b.naturalHeight||b.height||b.offsetHeight;e&&d?(
|
66
|
-
|
67
|
-
|
68
|
-
!0;c.tryedReframeing=0;
|
69
|
-
|
70
|
-
d){d||(d=
|
71
|
-
var I=function(){var a="_bufferedEnd,_bufferedStart,_metadata,_ppFlag,currentSrc,currentTime,duration,ended,networkState,paused,videoHeight,videoWidth,_callMeta,_durationCalcs".split(","),b=a.length;return function(
|
72
|
-
a(d).width(),height:d.style.height||a(d).height()})};j.createSWF=function(
|
73
|
-
|
74
|
-
|
75
|
-
"third",
|
76
|
-
display:"block"})},9),w||(clearTimeout(w),w=setTimeout(function(){var
|
77
|
-
1)};var
|
78
|
-
|
79
|
-
a||"third"!=
|
80
|
-
arguments)});["play","pause"].forEach(function(a){
|
81
|
-
if(
|
82
|
-
(a[b][d]=null)}catch(
|
1
|
+
(function(){var a=Function.prototype.call,h=Object.prototype,i=Array.prototype.slice,m,l;if(!Function.prototype.bind)Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var f=i.call(arguments,1),d=function(){if(this instanceof d){var c=function(){};c.prototype=b.prototype;var c=new c,k=b.apply(c,f.concat(i.call(arguments)));return null!==k&&Object(k)===k?k:c}return b.apply(a,f.concat(i.call(arguments)))};return d};l=a.bind(h.toString);m=a.bind(h.hasOwnProperty);
|
2
|
+
if(!Array.isArray)Array.isArray=function(a){return"[object Array]"==l(a)};if(!Array.prototype.forEach)Array.prototype.forEach=function(a,g){var f=b(this),d=0,c=f.length>>>0;if("[object Function]"!=l(a))throw new TypeError;for(;d<c;)d in f&&a.call(g,f[d],d,f),d++};if(!Array.prototype.map)Array.prototype.map=function(a,g){var f=b(this),d=f.length>>>0,c=Array(d);if("[object Function]"!=l(a))throw new TypeError;for(var k=0;k<d;k++)k in f&&(c[k]=a.call(g,f[k],k,f));return c};if(!Array.prototype.filter)Array.prototype.filter=
|
3
|
+
function(a,g){var f=b(this),d=f.length>>>0,c=[];if("[object Function]"!=l(a))throw new TypeError;for(var k=0;k<d;k++)k in f&&a.call(g,f[k],k,f)&&c.push(f[k]);return c};if(!Array.prototype.every)Array.prototype.every=function(a,g){var f=b(this),d=f.length>>>0;if("[object Function]"!=l(a))throw new TypeError;for(var c=0;c<d;c++)if(c in f&&!a.call(g,f[c],c,f))return!1;return!0};if(!Array.prototype.some)Array.prototype.some=function(a,g){var f=b(this),d=f.length>>>0;if("[object Function]"!=l(a))throw new TypeError;
|
4
|
+
for(var c=0;c<d;c++)if(c in f&&a.call(g,f[c],c,f))return!0;return!1};if(!Array.prototype.reduce)Array.prototype.reduce=function(a){var g=b(this),f=g.length>>>0;if("[object Function]"!=l(a))throw new TypeError;if(!f&&1==arguments.length)throw new TypeError;var d=0,c;if(2<=arguments.length)c=arguments[1];else{do{if(d in g){c=g[d++];break}if(++d>=f)throw new TypeError;}while(1)}for(;d<f;d++)d in g&&(c=a.call(void 0,c,g[d],d,g));return c};if(!Array.prototype.reduceRight)Array.prototype.reduceRight=function(a){var g=
|
5
|
+
b(this),f=g.length>>>0;if("[object Function]"!=l(a))throw new TypeError;if(!f&&1==arguments.length)throw new TypeError;var d,f=f-1;if(2<=arguments.length)d=arguments[1];else{do{if(f in g){d=g[f--];break}if(0>--f)throw new TypeError;}while(1)}do f in this&&(d=a.call(void 0,d,g[f],f,g));while(f--);return d};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a){var g=b(this),f=g.length>>>0;if(!f)return-1;var d=0;1<arguments.length&&(d=u(arguments[1]));for(d=0<=d?d:f-Math.abs(d);d<f;d++)if(d in
|
6
|
+
g&&g[d]===a)return d;return-1};if(!Array.prototype.lastIndexOf)Array.prototype.lastIndexOf=function(a){var g=b(this),f=g.length>>>0;if(!f)return-1;var d=f-1;1<arguments.length&&(d=u(arguments[1]));for(d=0<=d?d:f-Math.abs(d);0<=d;d--)if(d in g&&a===g[d])return d;return-1};if(2!=[1,2].splice(0).length){var q=Array.prototype.splice;Array.prototype.splice=function(a,b){return!arguments.length?[]:q.apply(this,[void 0===a?0:a,void 0===b?this.length-a:b].concat(i.call(arguments,2)))}}if(!Object.keys){var j=
|
7
|
+
!0,r="toString,toLocaleString,valueOf,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,constructor".split(","),n=r.length,o;for(o in{toString:null})j=!1;Object.keys=function(a){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError("Object.keys called on a non-object");var b=[],f;for(f in a)m(a,f)&&b.push(f);if(j)for(f=0;f<n;f++){var d=r[f];m(a,d)&&b.push(d)}return b}}if(!Date.prototype.toISOString)Date.prototype.toISOString=function(){var a,b,f;if(!isFinite(this))throw new RangeError;
|
8
|
+
a=[this.getUTCFullYear(),this.getUTCMonth()+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()];for(b=a.length;b--;)f=a[b],10>f&&(a[b]="0"+f);return a.slice(0,3).join("-")+"T"+a.slice(3).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"};if(!Date.now)Date.now=function(){return(new Date).getTime()};if(!Date.prototype.toJSON)Date.prototype.toJSON=function(){if("function"!=typeof this.toISOString)throw new TypeError;return this.toISOString()};a="\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";
|
9
|
+
if(!String.prototype.trim||a.trim()){var a="["+a+"]",s=RegExp("^"+a+a+"*"),t=RegExp(a+a+"*$");String.prototype.trim=function(){return(""+this).replace(s,"").replace(t,"")}}if("0".split(void 0,0).length){var v=String.prototype.split;String.prototype.split=function(a,b){return void 0===a&&0===b?[]:v.apply(this,arguments)}}if("".substr&&"b"!=="0b".substr(-1)){var x=String.prototype.substr;String.prototype.substr=function(a,b){return x.call(this,0>a?0>(a=this.length+a)?0:a:a,b)}}var u=function(a){a=+a;
|
10
|
+
a!==a?a=-1:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(0<a||-1)*Math.floor(Math.abs(a)));return a},p="a"!="a"[0],b=function(a){if(null==a)throw new TypeError;return p&&"string"==typeof a&&a?a.split(""):Object(a)}})();
|
11
|
+
(function(a,h){var i=!(!Object.create||!Object.defineProperties||!Object.getOwnPropertyDescriptor);i&&!a.browser.msie&&Object.defineProperty&&Object.prototype.__defineGetter__&&function(){try{var a=document.createElement("foo");Object.defineProperty(a,"bar",{get:function(){return!0}});i=!!a.bar}catch(h){i=!1}a=null}();Modernizr.objectAccessor=!(!(i||Object.prototype.__defineGetter__&&Object.prototype.__lookupSetter__)||a.browser.opera&&!(11<=h.browserVersion));Modernizr.advancedObjectProperties=i;
|
12
|
+
if(!i||!Object.create||!Object.defineProperties||!Object.getOwnPropertyDescriptor||!Object.defineProperty){var m=Function.prototype.call.bind(Object.prototype.hasOwnProperty);h.objectCreate=function(a,i,j,m){var n;n=function(){};n.prototype=a;n=new n;if(!m&&!("__proto__"in n)&&!Modernizr.objectAccessor)n.__proto__=a;i&&h.defineProperties(n,i);if(j)n.options=jQuery.extend(!0,{},n.options||{},j),j=n.options;n._create&&jQuery.isFunction(n._create)&&n._create(j);return n};h.defineProperties=function(a,
|
13
|
+
i){for(var j in i)m(i,j)&&h.defineProperty(a,j,i[j]);return a};h.defineProperty=function(a,h,j){if("object"!=typeof j||null===j)return a;if(m(j,"value"))return a[h]=j.value,a;a.__defineGetter__&&("function"==typeof j.get&&a.__defineGetter__(h,j.get),"function"==typeof j.set&&a.__defineSetter__(h,j.set));return a};h.getPrototypeOf=function(a){return Object.getPrototypeOf&&Object.getPrototypeOf(a)||a.__proto__||a.constructor&&a.constructor.prototype};h.getOwnPropertyDescriptor=function(a,h){if("object"!==
|
14
|
+
typeof a&&"function"!==typeof a||null===a)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object");var j;if(Object.defineProperty&&Object.getOwnPropertyDescriptor)try{return j=Object.getOwnPropertyDescriptor(a,h)}catch(i){}j={configurable:!0,enumerable:!0,writable:!0,value:void 0};var n=a.__lookupGetter__&&a.__lookupGetter__(h),o=a.__lookupSetter__&&a.__lookupSetter__(h);if(!n&&!o){if(!m(a,h))return;j.value=a[h];return j}delete j.writable;delete j.value;j.get=j.set=void 0;if(n)j.get=
|
15
|
+
n;if(o)j.set=o;return j}}})(jQuery,jQuery.webshims);
|
16
|
+
jQuery.webshims.register("dom-extend",function(a,h,i,m,l){var q=h.modules,j=/\s*,\s*/,r={},n={},o={},s={},t={},v=a.fn.val,x=function(d,c,k,b,e){return e?v.call(a(d)):v.call(a(d),k)};a.fn.val=function(d){var c=this[0];arguments.length&&null==d&&(d="");if(!arguments.length)return!c||1!==c.nodeType?v.call(this):a.prop(c,"value",d,"val",!0);if(a.isArray(d))return v.apply(this,arguments);var k=a.isFunction(d);return this.each(function(b){c=this;1===c.nodeType&&(k?(b=d.call(c,b,a.prop(c,"value",l,"val",
|
17
|
+
!0)),null==b&&(b=""),a.prop(c,"value",b,"val")):a.prop(c,"value",d,"val"))})};var u="_webshimsLib"+Math.round(1E3*Math.random()),p=function(d,c,k){d=d.jquery?d[0]:d;if(!d)return k||{};var b=a.data(d,u);k!==l&&(b||(b=a.data(d,u,{})),c&&(b[c]=k));return c?b&&b[c]:b};[{name:"getNativeElement",prop:"nativeElement"},{name:"getShadowElement",prop:"shadowElement"},{name:"getShadowFocusElement",prop:"shadowFocusElement"}].forEach(function(d){a.fn[d.name]=function(){return this.map(function(){var a=p(this,
|
18
|
+
"shadowData");return a&&a[d.prop]||this})}});["removeAttr","prop","attr"].forEach(function(d){r[d]=a[d];a[d]=function(c,k,b,e,h){var w="val"==e,f=!w?r[d]:x;if(!c||!n[k]||1!==c.nodeType||!w&&e&&"attr"==d&&a.attrFn[k])return f(c,k,b,e,h);var B=(c.nodeName||"").toLowerCase(),g=o[B],j="attr"==d&&(!1===b||null===b)?"removeAttr":d,i,v,m;g||(g=o["*"]);g&&(g=g[k]);g&&(i=g[j]);if(i){if("value"==k)v=i.isVal,i.isVal=w;if("removeAttr"===j)return i.value.call(c);if(b===l)return i.get?i.get.call(c):i.value;i.set&&
|
19
|
+
("attr"==d&&!0===b&&(b=k),m=i.set.call(c,b));if("value"==k)i.isVal=v}else m=f(c,k,b,e,h);if((b!==l||"removeAttr"===j)&&t[B]&&t[B][k]){var q;q="removeAttr"==j?!1:"prop"==j?!!b:!0;t[B][k].forEach(function(a){if(!a.only||(a.only="prop"==d)||"attr"==a.only&&"prop"!=d)a.call(c,b,q,w?"val":j,d)})}return m};s[d]=function(c,b,e){o[c]||(o[c]={});o[c][b]||(o[c][b]={});var f=o[c][b][d],g=function(a,c,h){return c&&c[a]?c[a]:h&&h[a]?h[a]:"prop"==d&&"value"==b?function(a){return e.isVal?x(this,b,a,!1,0===arguments.length):
|
20
|
+
r[d](this,b,a)}:"prop"==d&&"value"==a&&e.value.apply?function(a){var c=r[d](this,b);c&&c.apply&&(c=c.apply(this,arguments));return c}:function(a){return r[d](this,b,a)}};o[c][b][d]=e;if(e.value===l){if(!e.set)e.set=e.writeable?g("set",e,f):h.cfg.useStrict&&"prop"==b?function(){throw b+" is readonly on "+c;}:a.noop;if(!e.get)e.get=g("get",e,f)}["value","get","set"].forEach(function(a){e[a]&&(e["_sup"+a]=g(a,f))})}});var b=!a.browser.msie||8<parseInt(a.browser.version,10),e=function(){var a=h.getPrototypeOf(m.createElement("foobar")),
|
21
|
+
c=Object.prototype.hasOwnProperty;return function(k,e,f){var j=m.createElement(k),w=h.getPrototypeOf(j);if(b&&w&&a!==w&&(!j[e]||!c.call(j,e))){var y=j[e];f._supvalue=function(){return y&&y.apply?y.apply(this,arguments):y};w[e]=f.value}else f._supvalue=function(){var a=p(this,"propValue");return a&&a[e]&&a[e].apply?a[e].apply(this,arguments):a&&a[e]},g.extendValue(k,e,f.value);f.value._supvalue=f._supvalue}}(),g=function(){var d={};h.addReady(function(c,b){var k={},e=function(d){k[d]||(k[d]=a(c.getElementsByTagName(d)),
|
22
|
+
b[0]&&a.nodeName(b[0],d)&&(k[d]=k[d].add(b)))};a.each(d,function(a,d){e(a);!d||!d.forEach?h.warn("Error: with "+a+"-property. methods: "+d):d.forEach(function(d){k[a].each(d)})});k=null});var c,b=a([]),e=function(b,k){d[b]?d[b].push(k):d[b]=[k];a.isDOMReady&&(c||a(m.getElementsByTagName(b))).each(k)};return{createTmpCache:function(d){a.isDOMReady&&(c=c||a(m.getElementsByTagName(d)));return c||b},flushTmpCache:function(){c=null},content:function(d,c){e(d,function(){var d=a.attr(this,c);null!=d&&a.attr(this,
|
23
|
+
c,d)})},createElement:function(a,d){e(a,d)},extendValue:function(d,c,b){e(d,function(){a(this).each(function(){p(this,"propValue",{})[c]=this[c];this[c]=b})})}}}(),f=function(a,c){if(a.defaultValue===l)a.defaultValue="";if(!a.removeAttr)a.removeAttr={value:function(){a[c||"prop"].set.call(this,a.defaultValue);a.removeAttr._supvalue.call(this)}};if(!a.attr)a.attr={}};a.extend(h,{getID:function(){var d=(new Date).getTime();return function(c){var c=a(c),b=c.attr("id");b||(d++,b="ID-"+d,c.attr("id",b));
|
24
|
+
return b}}(),extendUNDEFProp:function(d,c){a.each(c,function(a,c){a in d||(d[a]=c)})},createPropDefault:f,data:p,moveToFirstEvent:function(){var d=a._data?"_data":"data";return function(c,b,e){if((c=(a[d](c,"events")||{})[b])&&1<c.length)b=c.pop(),e||(e="bind"),"bind"==e&&c.delegateCount?c.splice(c.delegateCount,0,b):c.unshift(b)}}(),addShadowDom:function(){var d,c,b,e,f={init:!1,start:function(){if(!this.init&&m.body)this.init=!0,this.height=a(m).height(),this.width=a(m).width(),setInterval(function(){var d=
|
25
|
+
a(m).height(),c=a(m).width();if(d!=f.height||c!=f.width)f.height=d,f.width=c,e({type:"docresize"})},600)}};e=function(e){clearTimeout(d);d=setTimeout(function(){if("resize"==e.type){var d=a(i).width(),h=a(i).width();if(h==c&&d==b)return;c=h;b=d;if(m.body)f.height=a(m).height(),f.width=a(m).width()}a.event.trigger("updateshadowdom")},40)};a(i).bind("resize",e);a.event.customEvent.updateshadowdom=!0;return function(d,c,b){b=b||{};d.jquery&&(d=d[0]);c.jquery&&(c=c[0]);var e=a.data(d,u)||a.data(d,u,{}),
|
26
|
+
k=a.data(c,u)||a.data(c,u,{}),g={};if(b.shadowFocusElement){if(b.shadowFocusElement){if(b.shadowFocusElement.jquery)b.shadowFocusElement=b.shadowFocusElement[0];g=a.data(b.shadowFocusElement,u)||a.data(b.shadowFocusElement,u,g)}}else b.shadowFocusElement=c;e.hasShadow=c;g.nativeElement=k.nativeElement=d;g.shadowData=k.shadowData=e.shadowData={nativeElement:d,shadowElement:c,shadowFocusElement:b.shadowFocusElement};b.shadowChilds&&b.shadowChilds.each(function(){p(this,"shadowData",k.shadowData)});
|
27
|
+
if(b.data)g.shadowData.data=k.shadowData.data=e.shadowData.data=b.data;b=null;h.ready("DOM",function(){f.start()})}}(),propTypes:{standard:function(a){f(a);if(!a.prop)a.prop={set:function(c){a.attr.set.call(this,""+c)},get:function(){return a.attr.get.call(this)||a.defaultValue}}},"boolean":function(a){f(a);if(!a.prop)a.prop={set:function(c){c?a.attr.set.call(this,""):a.removeAttr.value.call(this)},get:function(){return null!=a.attr.get.call(this)}}},src:function(){var d=m.createElement("a");d.style.display=
|
28
|
+
"none";return function(c,b){f(c);if(!c.prop)c.prop={set:function(a){c.attr.set.call(this,a)},get:function(){var c=this.getAttribute(b),e;if(null==c)return"";d.setAttribute("href",c+"");if(!a.support.hrefNormalized){try{a(d).insertAfter(this),e=d.getAttribute("href",4)}catch(f){e=d.getAttribute("href",4)}a(d).detach()}return e||d.href}}}}(),enumarated:function(a){f(a);if(!a.prop)a.prop={set:function(c){a.attr.set.call(this,c)},get:function(){var c=(a.attr.get.call(this)||"").toLowerCase();if(!c||-1==
|
29
|
+
a.limitedTo.indexOf(c))c=a.defaultValue;return c}}}},reflectProperties:function(d,c){"string"==typeof c&&(c=c.split(j));c.forEach(function(c){h.defineNodeNamesProperty(d,c,{prop:{set:function(d){a.attr(this,c,d)},get:function(){return a.attr(this,c)||""}}})})},defineNodeNameProperty:function(d,c,b){n[c]=!0;if(b.reflect)h.propTypes[b.propType||"standard"](b,c);["prop","attr","removeAttr"].forEach(function(f){var g=b[f];g&&(g="prop"===f?a.extend({writeable:!0},g):a.extend({},g,{writeable:!0}),s[f](d,
|
30
|
+
c,g),"*"!=d&&h.cfg.extendNative&&"prop"==f&&g.value&&a.isFunction(g.value)&&e(d,c,g),b[f]=g)});b.initAttr&&g.content(d,c);return b},defineNodeNameProperties:function(a,c,b,e){for(var f in c)!e&&c[f].initAttr&&g.createTmpCache(a),b&&!c[f][b]&&(c[f][b]={},["value","set","get"].forEach(function(a){a in c[f]&&(c[f][b][a]=c[f][a],delete c[f][a])})),c[f]=h.defineNodeNameProperty(a,f,c[f]);e||g.flushTmpCache();return c},createElement:function(d,c,b){var e;a.isFunction(c)&&(c={after:c});g.createTmpCache(d);
|
31
|
+
c.before&&g.createElement(d,c.before);b&&(e=h.defineNodeNameProperties(d,b,!1,!0));c.after&&g.createElement(d,c.after);g.flushTmpCache();return e},onNodeNamesPropertyModify:function(d,c,b,e){"string"==typeof d&&(d=d.split(j));a.isFunction(b)&&(b={set:b});d.forEach(function(a){t[a]||(t[a]={});"string"==typeof c&&(c=c.split(j));b.initAttr&&g.createTmpCache(a);c.forEach(function(c){t[a][c]||(t[a][c]=[],n[c]=!0);if(b.set){if(e)b.set.only=e;t[a][c].push(b.set)}b.initAttr&&g.content(a,c)});g.flushTmpCache()})},
|
32
|
+
defineNodeNamesBooleanProperty:function(d,c,b){b||(b={});if(a.isFunction(b))b.set=b;h.defineNodeNamesProperty(d,c,{attr:{set:function(a){this.setAttribute(c,a);b.set&&b.set.call(this,!0)},get:function(){return null==this.getAttribute(c)?l:c}},removeAttr:{value:function(){this.removeAttribute(c);b.set&&b.set.call(this,!1)}},reflect:!0,propType:"boolean",initAttr:b.initAttr||!1})},contentAttr:function(a,c,b){if(a.nodeName){if(b===l)return a=a.attributes[c]||{},b=a.specified?a.value:null,null==b?l:b;
|
33
|
+
"boolean"==typeof b?b?a.setAttribute(c,c):a.removeAttribute(c):a.setAttribute(c,b)}},activeLang:function(){var b=[],c={},e,f,g=/:\/\/|^\.*\//,j=function(c,b,d){return b&&d&&-1!==a.inArray(b,d.availabeLangs||[])?(c.loading=!0,d=d.langSrc,g.test(d)||(d=h.cfg.basePath+d),h.loader.loadScript(d+b+".js",function(){c.langObj[b]?(c.loading=!1,y(c,!0)):a(function(){c.langObj[b]&&y(c,!0);c.loading=!1})}),!0):!1},w=function(a){c[a]&&c[a].forEach(function(a){a.callback()})},y=function(a,c){if(a.activeLang!=e&&
|
34
|
+
a.activeLang!==f){var b=q[a.module].options;if(a.langObj[e]||f&&a.langObj[f])a.activeLang=e,a.callback(a.langObj[e]||a.langObj[f],e),w(a.module);else if(!c&&!j(a,e,b)&&!j(a,f,b)&&a.langObj[""]&&""!==a.activeLang)a.activeLang="",a.callback(a.langObj[""],e),w(a.module)}};return function(g){if("string"==typeof g&&g!==e)e=g,f=e.split("-")[0],e==f&&(f=!1),a.each(b,function(a,c){y(c)});else if("object"==typeof g)if(g.register)c[g.register]||(c[g.register]=[]),c[g.register].push(g),g.callback();else{if(!g.activeLang)g.activeLang=
|
35
|
+
"";b.push(g);y(g)}return e}}()});a.each({defineNodeNamesProperty:"defineNodeNameProperty",defineNodeNamesProperties:"defineNodeNameProperties",createElements:"createElement"},function(a,c){h[a]=function(a,b,d,e){"string"==typeof a&&(a=a.split(j));var f={};a.forEach(function(a){f[a]=h[c](a,b,d,e)});return f}});h.isReady("webshimLocalization",!0)});
|
36
|
+
(function(a,h){var i=a.webshims.browserVersion;if(!(a.browser.mozilla&&5<i)&&(!a.browser.msie||12>i&&7<i)){var m={article:"article",aside:"complementary",section:"region",nav:"navigation",address:"contentinfo"},l=function(a,h){a.getAttribute("role")||a.setAttribute("role",h)};a.webshims.addReady(function(i,j){a.each(m,function(h,t){for(var v=a(h,i).add(j.filter(h)),m=0,n=v.length;m<n;m++)l(v[m],t)});if(i===h){var r=h.getElementsByTagName("header")[0],n=h.getElementsByTagName("footer"),o=n.length;
|
37
|
+
r&&!a(r).closest("section, article")[0]&&l(r,"banner");o&&(r=n[o-1],a(r).closest("section, article")[0]||l(r,"contentinfo"))}})}})(jQuery,document);
|
38
|
+
(function(a,h,i){var m=h.audio&&h.video,l=!1,q=i.cfg.mediaelement,j=i.bugs,r=function(){i.ready("mediaelement-swf",function(){if(!i.mediaelement.createSWF)i.modules["mediaelement-swf"].test=a.noop,i.reTest(["mediaelement-swf"],m)})},n;if(m){var o=document.createElement("video");h.videoBuffered="buffered"in o;l="loop"in o;i.capturingEvents("play,playing,waiting,paused,ended,durationchange,loadedmetadata,canplay,volumechange".split(","));h.videoBuffered||(i.addPolyfill("mediaelement-native-fix",{f:"mediaelement",
|
39
|
+
test:h.videoBuffered,d:["dom-support"]}),i.reTest("mediaelement-native-fix"))}if(m&&!q.preferFlash){var s=function(h){var j=h.target.parentNode;!q.preferFlash&&(a(h.target).is("audio, video")||j&&a("source:last",j)[0]==h.target)&&i.ready("DOM mediaelement",function(){n&&r();i.ready("WINDOWLOAD mediaelement-swf",function(){setTimeout(function(){n&&!q.preferFlash&&i.mediaelement.createSWF&&!a(h.target).closest("audio, video").is(".nonnative-api-active")?(q.preferFlash=!0,document.removeEventListener("error",
|
40
|
+
s,!0),a("audio, video").mediaLoad(),i.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+h.target.src)):n||document.removeEventListener("error",s,!0)},20)})})};document.addEventListener("error",s,!0);a("audio, video").each(function(){this.error&&s({target:this})})}j.track=!1;h.track&&function(){if(!j.track)j.track="number"!=typeof a("<track />")[0].readyState;if(!j.track)try{new TextTrackCue(2,3,"")}catch(h){j.track=!0}var l=i.cfg.track,m=function(b){a(b.target).filter("track").each(n)},
|
41
|
+
n=function(){if(j.track||!l.override&&3==a.prop(this,"readyState"))l.override=!0,i.reTest("track"),document.removeEventListener("error",m,!0),this&&a.nodeName(this,"track")?i.error("track support was overwritten. Please check your vtt including your vtt mime-type"):i.info("track support was overwritten. due to bad browser support")},p=function(){document.addEventListener("error",m,!0);j.track?n():a("track").each(n)};l.override||(i.isReady("track")?p():a(p))}();i.register("mediaelement-core",function(a,
|
42
|
+
i,o,s,p){n=swfobject.hasFlashPlayerVersion("9.0.115");var b=i.mediaelement,e=function(c,d){var c=a(c),e={src:c.attr("src")||"",elem:c,srcProp:c.prop("src")};if(!e.src)return e;var f=c.attr("type");if(f)e.type=f,e.container=a.trim(f.split(";")[0]);else if(d||(d=c[0].nodeName.toLowerCase(),"source"==d&&(d=(c.closest("video, audio")[0]||{nodeName:"video"}).nodeName.toLowerCase())),f=b.getTypeForSrc(e.src,d))e.type=f,e.container=f;if(f=c.attr("media"))e.media=f;return e},g=!n&&"postMessage"in o&&m,f=
|
43
|
+
function(){var c;return function(){!c&&g&&(c=!0,i.loader.loadScript("https://www.youtube.com/player_api"),a(function(){i.polyfill("mediaelement-yt")}))}}(),d=function(){n?r():f()};i.addPolyfill("mediaelement-yt",{test:!g,d:["dom-support"]});b.mimeTypes={audio:{"audio/ogg":["ogg","oga","ogm"],'audio/ogg;codecs="opus"':"opus","audio/mpeg":["mp2","mp3","mpga","mpega"],"audio/mp4":"mp4,mpg4,m4r,m4a,m4p,m4b,aac".split(","),"audio/wav":["wav"],"audio/3gpp":["3gp","3gpp"],"audio/webm":["webm"],"audio/fla":["flv",
|
44
|
+
"f4a","fla"],"application/x-mpegURL":["m3u8","m3u"]},video:{"video/ogg":["ogg","ogv","ogm"],"video/mpeg":["mpg","mpeg","mpe"],"video/mp4":["mp4","mpg4","m4v"],"video/quicktime":["mov","qt"],"video/x-msvideo":["avi"],"video/x-ms-asf":["asf","asx"],"video/flv":["flv","f4v"],"video/3gpp":["3gp","3gpp"],"video/webm":["webm"],"application/x-mpegURL":["m3u8","m3u"],"video/MP2T":["ts"]}};b.mimeTypes.source=a.extend({},b.mimeTypes.audio,b.mimeTypes.video);b.getTypeForSrc=function(c,d){if(-1!=c.indexOf("youtube.com/watch?")||
|
45
|
+
-1!=c.indexOf("youtube.com/v/"))return"video/youtube";var c=c.split("?")[0].split("."),c=c[c.length-1],e;a.each(b.mimeTypes[d],function(a,b){if(-1!==b.indexOf(c))return e=a,!1});return e};b.srces=function(c,b){c=a(c);if(b)c.removeAttr("src").removeAttr("type").find("source").remove(),a.isArray(b)||(b=[b]),b.forEach(function(a){var b=s.createElement("source");"string"==typeof a&&(a={src:a});b.setAttribute("src",a.src);a.type&&b.setAttribute("type",a.type);a.media&&b.setAttribute("media",a.media);c.append(b)});
|
46
|
+
else{var b=[],d=c[0].nodeName.toLowerCase(),f=e(c,d);f.src?b.push(f):a("source",c).each(function(){f=e(this,d);f.src&&b.push(f)});return b}};a.fn.loadMediaSrc=function(c,d){return this.each(function(){d!==p&&(a(this).removeAttr("poster"),d&&a.attr(this,"poster",d));b.srces(this,c);a(this).mediaLoad()})};b.swfMimeTypes="video/3gpp,video/x-msvideo,video/quicktime,video/x-m4v,video/mp4,video/m4p,video/x-flv,video/flv,audio/mpeg,audio/aac,audio/mp4,audio/x-m4a,audio/m4a,audio/mp3,audio/x-fla,audio/fla,youtube/flv,jwplayer/jwplayer,video/youtube".split(",");
|
47
|
+
b.canThirdPlaySrces=function(c,d){var e="";if(n||g)c=a(c),d=d||b.srces(c),a.each(d,function(a,c){if(c.container&&c.src&&(n&&-1!=b.swfMimeTypes.indexOf(c.container)||g&&"video/youtube"==c.container))return e=c,!1});return e};var c={};b.canNativePlaySrces=function(d,e){var f="";if(m){var d=a(d),g=(d[0].nodeName||"").toLowerCase();if(!c[g])return f;e=e||b.srces(d);a.each(e,function(a,b){if(b.type&&c[g].prop._supvalue.call(d[0],b.type))return f=b,!1})}return f};b.setError=function(c,b){b||(b="can't play sources");
|
48
|
+
a(c).pause().data("mediaerror",b);i.warn("mediaelementError: "+b);setTimeout(function(){a(c).data("mediaerror")&&a(c).trigger("mediaerror")},1)};var k=function(){var a;return function(c,e,h){i.ready(n?"mediaelement-swf":"mediaelement-yt",function(){b.createSWF?b.createSWF(c,e,h):a||(a=!0,d(),k(c,e,h))});!a&&g&&!b.createSWF&&f()}}(),z=function(a,c,d,e,f){d||!1!==d&&c&&"third"==c.isActive?(d=b.canThirdPlaySrces(a,e))?k(a,d,c):f?b.setError(a,!1):z(a,c,!1,e,!0):(d=b.canNativePlaySrces(a,e))?c&&"third"==
|
49
|
+
c.isActive&&b.setActive(a,"html5",c):f?(b.setError(a,!1),c&&"third"==c.isActive&&b.setActive(a,"html5",c)):z(a,c,!0,e,!0)},A=/^(?:embed|object|datalist)$/i,D=function(c,d){var e=i.data(c,"mediaelementBase")||i.data(c,"mediaelementBase",{}),f=b.srces(c),g=c.parentNode;clearTimeout(e.loadTimer);a.data(c,"mediaerror",!1);if(f.length&&g&&!(1!=g.nodeType||A.test(g.nodeName||"")))d=d||i.data(c,"mediaelement"),z(c,d,q.preferFlash||p,f)};a(s).bind("ended",function(c){var b=i.data(c.target,"mediaelement");
|
50
|
+
(!l||b&&"html5"!=b.isActive||a.prop(c.target,"loop"))&&setTimeout(function(){!a.prop(c.target,"paused")&&a.prop(c.target,"loop")&&a(c.target).prop("currentTime",0).play()},1)});l||i.defineNodeNamesBooleanProperty(["audio","video"],"loop");["audio","video"].forEach(function(d){var e=i.defineNodeNameProperty(d,"load",{prop:{value:function(){var a=i.data(this,"mediaelement");D(this,a);m&&(!a||"html5"==a.isActive)&&e.prop._supvalue&&e.prop._supvalue.apply(this,arguments)}}});c[d]=i.defineNodeNameProperty(d,
|
51
|
+
"canPlayType",{prop:{value:function(e){var f="";m&&c[d].prop._supvalue&&(f=c[d].prop._supvalue.call(this,e),"no"==f&&(f=""));!f&&n&&(e=a.trim((e||"").split(";")[0]),-1!=b.swfMimeTypes.indexOf(e)&&(f="maybe"));return f}}})});i.onNodeNamesPropertyModify(["audio","video"],["src","poster"],{set:function(){var a=this,c=i.data(a,"mediaelementBase")||i.data(a,"mediaelementBase",{});clearTimeout(c.loadTimer);c.loadTimer=setTimeout(function(){D(a);a=null},9)}});o=function(){i.addReady(function(c,b){a("video, audio",
|
52
|
+
c).add(b.filter("video, audio")).each(function(){a.browser.msie&&8<i.browserVersion&&a.prop(this,"paused")&&!a.prop(this,"readyState")&&a(this).is('audio[preload="none"][controls]:not([autoplay])')?a(this).prop("preload","metadata").mediaLoad():D(this);if(m){var c,b,d=this,e=function(){var c=a.prop(d,"buffered");if(c){for(var b="",e=0,f=c.length;e<f;e++)b+=c.end(e);return b}},f=function(){var c=e();c!=b&&(b=c,a(d).triggerHandler("progress"))};a(this).bind("play loadstart progress",function(a){"progress"==
|
53
|
+
a.type&&(b=e());clearTimeout(c);c=setTimeout(f,999)}).bind("emptied stalled mediaerror abort suspend",function(a){"emptied"==a.type&&(b=!1);clearTimeout(c)})}})})};h.track&&!j.track&&i.defineProperty(TextTrack.prototype,"shimActiveCues",{get:function(){return this._shimActiveCues||this.activeCues}});m?(i.isReady("mediaelement-core",!0),o(),i.ready("WINDOWLOAD mediaelement",d)):i.ready("mediaelement-swf",o);a(function(){i.loader.loadList(["track-ui"])})})})(jQuery,Modernizr,jQuery.webshims);
|
54
|
+
jQuery.webshims.register("mediaelement-swf",function(a,h,i,m,l,q){var j=h.mediaelement,r=i.swfobject,n=Modernizr.audio&&Modernizr.video,o=r.hasFlashPlayerVersion("9.0.115"),s=0,i={paused:!0,ended:!1,currentSrc:"",duration:i.NaN,readyState:0,networkState:0,videoHeight:0,videoWidth:0,error:null,buffered:{start:function(a){if(a)h.error("buffered index size error");else return 0},end:function(a){if(a)h.error("buffered index size error");else return 0},length:0}},t=Object.keys(i),v={currentTime:0,volume:1,
|
55
|
+
muted:!1};Object.keys(v);var x=a.extend({isActive:"html5",activating:"html5",wasSwfReady:!1,_bufferedEnd:0,_bufferedStart:0,_metadata:!1,_durationCalcs:-1,_callMeta:!1,currentTime:0,_ppFlag:l},i,v),u=/^jwplayer-/,p=function(a){if(a=m.getElementById(a.replace(u,"")))return a=h.data(a,"mediaelement"),"third"==a.isActive?a:null},b=function(a){return(a=h.data(a,"mediaelement"))&&"third"==a.isActive?a:null},e=function(c,b){b=a.Event(b);b.preventDefault();a.event.trigger(b,l,c)},g=q.playerPath||h.cfg.basePath+
|
56
|
+
"jwplayer/"+(q.playerName||"player.swf"),f=q.pluginPath||h.cfg.basePath+"swf/jwwebshims.swf";h.extendUNDEFProp(q.jwParams,{allowscriptaccess:"always",allowfullscreen:"true",wmode:"transparent"});h.extendUNDEFProp(q.jwVars,{screencolor:"ffffffff"});h.extendUNDEFProp(q.jwAttrs,{bgcolor:"#000000"});var d=function(c,b){var d=c.duration;if(!(d&&0<c._durationCalcs)){try{if(c.duration=c.jwapi.getPlaylist()[0].duration,!c.duration||0>=c.duration||c.duration===c._lastDuration)c.duration=d}catch(f){}c.duration&&
|
57
|
+
c.duration!=c._lastDuration?(e(c._elem,"durationchange"),("audio"==c._elemNodeName||c._callMeta)&&j.jwEvents.Model.META(a.extend({duration:c.duration},b),c),c._durationCalcs--):c._durationCalcs++}},c=function(a,b){3>a&&clearTimeout(b._canplaythroughTimer);if(3<=a&&3>b.readyState)b.readyState=a,e(b._elem,"canplay"),clearTimeout(b._canplaythroughTimer),b._canplaythroughTimer=setTimeout(function(){c(4,b)},4E3);if(4<=a&&4>b.readyState)b.readyState=a,e(b._elem,"canplaythrough");b.readyState=a};a.extend(a.event.customEvent,
|
58
|
+
{updatemediaelementdimensions:!0,flashblocker:!0,swfstageresize:!0,mediaelementapichange:!0});j.jwEvents={View:{PLAY:function(a){var c=p(a.id);if(c&&!c.stopPlayPause&&(c._ppFlag=!0,c.paused==a.state)){c.paused=!a.state;if(c.ended)c.ended=!1;e(c._elem,a.state?"play":"pause")}}},Model:{BUFFER:function(b){var e=p(b.id);if(e&&"percentage"in b&&e._bufferedEnd!=b.percentage){e.networkState=100==b.percentage?1:2;(isNaN(e.duration)||5<b.percentage&&25>b.percentage||100===b.percentage)&&d(e,b);if(e.ended)e.ended=
|
59
|
+
!1;if(e.duration){2<b.percentage&&20>b.percentage?c(3,e):20<b.percentage&&c(4,e);if(e._bufferedEnd&&e._bufferedEnd>b.percentage)e._bufferedStart=e.currentTime||0;e._bufferedEnd=b.percentage;e.buffered.length=1;if(100==b.percentage)e.networkState=1,c(4,e);a.event.trigger("progress",l,e._elem,!0)}}},META:function(a,b){if(b=b&&b.networkState?b:p(a.id))if("duration"in a){if(!b._metadata||!((!a.height||b.videoHeight==a.height)&&a.duration===b.duration)){b._metadata=!0;var d=b.duration;if(a.duration)b.duration=
|
60
|
+
a.duration;b._lastDuration=b.duration;if(a.height||a.width)b.videoHeight=a.height||0,b.videoWidth=a.width||0;if(!b.networkState)b.networkState=2;1>b.readyState&&c(1,b);b.duration&&d!==b.duration&&e(b._elem,"durationchange");e(b._elem,"loadedmetadata")}}else b._callMeta=!0},TIME:function(a){var b=p(a.id);if(b&&b.currentTime!==a.position){b.currentTime=a.position;b.duration&&b.duration<b.currentTime&&d(b,a);2>b.readyState&&c(2,b);if(b.ended)b.ended=!1;e(b._elem,"timeupdate")}},STATE:function(a){var b=
|
61
|
+
p(a.id);if(b)switch(a.newstate){case "BUFFERING":if(b.ended)b.ended=!1;c(1,b);e(b._elem,"waiting");break;case "PLAYING":b.paused=!1;b._ppFlag=!0;b.duration||d(b,a);3>b.readyState&&c(3,b);if(b.ended)b.ended=!1;e(b._elem,"playing");break;case "PAUSED":if(!b.paused&&!b.stopPlayPause)b.paused=!0,b._ppFlag=!0,e(b._elem,"pause");break;case "COMPLETED":4>b.readyState&&c(4,b),b.ended=!0,e(b._elem,"ended")}}},Controller:{ERROR:function(a){var b=p(a.id);b&&j.setError(b._elem,a.message)},SEEK:function(a){var b=
|
62
|
+
p(a.id);if(b){if(b.ended)b.ended=!1;if(b.paused)try{b.jwapi.sendEvent("play","false")}catch(c){}if(b.currentTime!=a.position)b.currentTime=a.position,e(b._elem,"timeupdate")}},VOLUME:function(a){var b=p(a.id);if(b&&(a=a.percentage/100,b.volume!=a))b.volume=a,e(b._elem,"volumechange")},MUTE:function(a){if(!a.state){var b=p(a.id);if(b&&b.muted!=a.state)b.muted=a.state,e(b._elem,"volumechange")}}}};var k=function(b){var c=!0;a.each(j.jwEvents,function(d,e){a.each(e,function(a){try{b.jwapi["add"+d+"Listener"](a,
|
63
|
+
"jQuery.webshims.mediaelement.jwEvents."+d+"."+a)}catch(e){return c=!1}})});return c},z=function(a){var b=a.actionQueue.length,c=0,d;if(b&&"third"==a.isActive)for(;a.actionQueue.length&&b>c;)c++,d=a.actionQueue.shift(),a.jwapi[d.fn].apply(a.jwapi,d.args);if(a.actionQueue.length)a.actionQueue=[]},A=function(b){b&&(b._ppFlag===l&&a.prop(b._elem,"autoplay")||!b.paused)&&setTimeout(function(){if("third"==b.isActive&&(b._ppFlag===l||!b.paused))try{a(b._elem).play()}catch(c){}},1)},D=function(b){if(b&&
|
64
|
+
"video"==b._elemNodeName){var c,d,e,f,g,h,k,i,j=function(j,l){if(l&&j&&!(1>l||1>j||"third"!=b.isActive))if(c&&(c.remove(),c=!1),f=j,g=l,clearTimeout(k),d="auto"==b._elem.style.width,e="auto"==b._elem.style.height,d||e){h=h||a(b._elem).getShadowElement();var m;d&&!e?(m=h.height(),j*=m/l,l=m):!d&&e&&(m=h.width(),l*=m/j,j=m);i=!0;setTimeout(function(){i=!1},9);h.css({width:j,height:l})}},l=function(){if(!("third"!=b.isActive||a.prop(b._elem,"readyState")&&a.prop(this,"videoWidth"))){var f=a.prop(b._elem,
|
65
|
+
"poster");if(f&&(d="auto"==b._elem.style.width,e="auto"==b._elem.style.height,d||e))c&&(c.remove(),c=!1),c=a('<img style="position: absolute; height: auto; width: auto; top: 0px; left: 0px; visibility: hidden;" />'),c.bind("load error alreadycomplete",function(){clearTimeout(k);var b=this,d=b.naturalWidth||b.width||b.offsetWidth,e=b.naturalHeight||b.height||b.offsetHeight;e&&d?(j(d,e),b=null):setTimeout(function(){d=b.naturalWidth||b.width||b.offsetWidth;e=b.naturalHeight||b.height||b.offsetHeight;
|
66
|
+
j(d,e);c&&(c.remove(),c=!1);b=null},9);a(this).unbind()}).prop("src",f).appendTo("body").each(function(){this.complete||this.error?a(this).triggerHandler("alreadycomplete"):(clearTimeout(k),k=setTimeout(function(){a(b._elem).triggerHandler("error")},9999))})}};a(b._elem).bind("loadedmetadata",function(){j(a.prop(this,"videoWidth"),a.prop(this,"videoHeight"))}).bind("emptied",l).bind("swfstageresize updatemediaelementdimensions",function(){i||j(f,g)}).bind("emptied",function(){f=void 0;g=void 0}).triggerHandler("swfstageresize");
|
67
|
+
l();a.prop(b._elem,"readyState")&&j(a.prop(b._elem,"videoWidth"),a.prop(b._elem,"videoHeight"))}};j.playerResize=function(b){b&&(b=m.getElementById(b.replace(u,"")))&&a(b).triggerHandler("swfstageresize")};a(m).bind("emptied",function(a){a=b(a.target);A(a)});var w;j.jwPlayerReady=function(b){var c=p(b.id),d=0,e=function(){if(!(9<d))if(d++,k(c)){if(c.wasSwfReady)a(c._elem).mediaLoad();else{var f=parseFloat(b.version,10);(5.1>f||6<=f)&&h.warn("mediaelement-swf is only testet with jwplayer 5.6+")}c.wasSwfReady=
|
68
|
+
!0;c.tryedReframeing=0;z(c);A(c)}else clearTimeout(c.reframeTimer),c.reframeTimer=setTimeout(e,9*d),2<d&&9>c.tryedReframeing&&(c.tryedReframeing++,c.shadowElem.css({overflow:"visible"}),setTimeout(function(){c.shadowElem.css({overflow:"hidden"})},16))};if(c&&c.jwapi){if(!c.tryedReframeing)c.tryedReframeing=0;clearTimeout(w);c.jwData=b;c.shadowElem.removeClass("flashblocker-assumed");a.prop(c._elem,"volume",c.volume);a.prop(c._elem,"muted",c.muted);e()}};var y=a.noop;if(n){var B={play:1,playing:1},
|
69
|
+
F="play,pause,playing,canplay,progress,waiting,ended,loadedmetadata,durationchange,emptied".split(","),G=F.map(function(a){return a+".webshimspolyfill"}).join(" "),H=function(b){var c=h.data(b.target,"mediaelement");c&&(b.originalEvent&&b.originalEvent.type===b.type)==("third"==c.activating)&&(b.stopImmediatePropagation(),B[b.type]&&c.isActive!=c.activating&&a(b.target).pause())},y=function(b){a(b).unbind(G).bind(G,H);F.forEach(function(a){h.moveToFirstEvent(b,a)})};y(m)}j.setActive=function(b,c,
|
70
|
+
d){d||(d=h.data(b,"mediaelement"));if(d&&d.isActive!=c){"html5"!=c&&"third"!=c&&h.warn("wrong type for mediaelement activating: "+c);var e=h.data(b,"shadowData");d.activating=c;a(b).pause();d.isActive=c;"third"==c?(e.shadowElement=e.shadowFocusElement=d.shadowElem[0],a(b).addClass("swf-api-active nonnative-api-active").hide().getShadowElement().show()):(a(b).removeClass("swf-api-active nonnative-api-active").show().getShadowElement().hide(),e.shadowElement=e.shadowFocusElement=!1);a(b).trigger("mediaelementapichange")}};
|
71
|
+
var I=function(){var a="_bufferedEnd,_bufferedStart,_metadata,_ppFlag,currentSrc,currentTime,duration,ended,networkState,paused,videoHeight,videoWidth,_callMeta,_durationCalcs".split(","),b=a.length;return function(d){if(d){var f=b,g=d.networkState;for(c(0,d);--f;)delete d[a[f]];d.actionQueue=[];d.buffered.length=0;g&&e(d._elem,"emptied")}}}(),E=function(b,c){var d=b._elem,e=b.shadowElem;a(d)[c?"addClass":"removeClass"]("webshims-controls");"audio"==b._elemNodeName&&!c?e.css({width:0,height:0}):e.css({width:d.style.width||
|
72
|
+
a(d).width(),height:d.style.height||a(d).height()})};j.createSWF=function(b,c,d){if(o){1>s?s=1:s++;var e=a.extend({},q.jwVars,{image:a.prop(b,"poster")||"",file:c.srcProp}),k=a(b).data("jwvars")||{};d||(d=h.data(b,"mediaelement"));if(d&&d.swfCreated)j.setActive(b,"third",d),I(d),d.currentSrc=c.srcProp,a.extend(e,k),q.changeJW(e,b,c,d,"load"),C(b,"sendEvent",["LOAD",e]);else{var i=a.prop(b,"controls"),l="jwplayer-"+h.getID(b),m=a.extend({},q.jwParams,a(b).data("jwparams")),z=b.nodeName.toLowerCase(),
|
73
|
+
p=a.extend({},q.jwAttrs,{name:l,id:l},a(b).data("jwattrs")),A=a('<div class="polyfill-'+z+' polyfill-mediaelement" id="wrapper-'+l+'"><div id="'+l+'"></div>').css({position:"relative",overflow:"hidden"}),d=h.data(b,"mediaelement",h.objectCreate(x,{actionQueue:{value:[]},shadowElem:{value:A},_elemNodeName:{value:z},_elem:{value:b},currentSrc:{value:c.srcProp},swfCreated:{value:!0},buffered:{value:{start:function(a){if(a>=d.buffered.length)h.error("buffered index size error");else return 0},end:function(a){if(a>=
|
74
|
+
d.buffered.length)h.error("buffered index size error");else return(d.duration-d._bufferedStart)*d._bufferedEnd/100+d._bufferedStart},length:0}}}));E(d,i);A.insertBefore(b);n&&a.extend(d,{volume:a.prop(b,"volume"),muted:a.prop(b,"muted")});a.extend(e,{id:l,controlbar:i?q.jwVars.controlbar||("video"==z?"over":"bottom"):"video"==z?"none":"bottom",icons:""+(i&&"video"==z)},k,{playerready:"jQuery.webshims.mediaelement.jwPlayerReady"});e.plugins=e.plugins?e.plugins+(","+f):f;h.addShadowDom(b,A);y(b);j.setActive(b,
|
75
|
+
"third",d);q.changeJW(e,b,c,d,"embed");a(b).bind("updatemediaelementdimensions updateshadowdom",function(){E(d,a.prop(b,"controls"))});D(d);r.embedSWF(g,l,"100%","100%","9.0.0",!1,e,m,p,function(c){if(c.success)d.jwapi=c.ref,i||a(c.ref).attr("tabindex","-1").css("outline","none"),setTimeout(function(){if(!c.ref.parentNode&&A[0].parentNode||"none"==c.ref.style.display)A.addClass("flashblocker-assumed"),a(b).trigger("flashblocker"),h.warn("flashblocker assumed");a(c.ref).css({minHeight:"2px",minWidth:"2px",
|
76
|
+
display:"block"})},9),w||(clearTimeout(w),w=setTimeout(function(){var b=a(c.ref);1<b[0].offsetWidth&&1<b[0].offsetHeight&&0===location.protocol.indexOf("file:")?h.error("Add your local development-directory to the local-trusted security sandbox: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html"):(2>b[0].offsetWidth||2>b[0].offsetHeight)&&h.warn("JS-SWF connection can't be established on hidden or unconnected flash objects")},8E3))})}}else setTimeout(function(){a(b).mediaLoad()},
|
77
|
+
1)};var C=function(a,c,d,e){return(e=e||b(a))?(e.jwapi&&e.jwapi[c]?e.jwapi[c].apply(e.jwapi,d||[]):(e.actionQueue.push({fn:c,args:d}),10<e.actionQueue.length&&setTimeout(function(){5<e.actionQueue.length&&e.actionQueue.shift()},99)),e):!1};["audio","video"].forEach(function(c){var d={},f,g=function(a){"audio"==c&&("videoHeight"==a||"videoWidth"==a)||(d[a]={get:function(){var c=b(this);return c?c[a]:n&&f[a].prop._supget?f[a].prop._supget.apply(this):x[a]},writeable:!1})},k=function(a,b){g(a);delete d[a].writeable;
|
78
|
+
d[a].set=b};k("volume",function(a){var c=b(this);if(c){if(a*=100,!isNaN(a)){var d=c.muted;(0>a||100<a)&&h.error("volume greater or less than allowed "+a/100);C(this,"sendEvent",["VOLUME",a],c);if(d)try{c.jwapi.sendEvent("mute","true")}catch(g){}a/=100;if(!(c.volume==a||"third"!=c.isActive))c.volume=a,e(c._elem,"volumechange")}}else if(f.volume.prop._supset)return f.volume.prop._supset.apply(this,arguments)});k("muted",function(a){var c=b(this);if(c){if(a=!!a,C(this,"sendEvent",["mute",""+a],c),!(c.muted==
|
79
|
+
a||"third"!=c.isActive))c.muted=a,e(c._elem,"volumechange")}else if(f.muted.prop._supset)return f.muted.prop._supset.apply(this,arguments)});k("currentTime",function(a){var c=b(this);if(c){if(a*=1,!isNaN(a)){if(c.paused)clearTimeout(c.stopPlayPause),c.stopPlayPause=setTimeout(function(){c.paused=!0;c.stopPlayPause=!1},50);C(this,"sendEvent",["SEEK",""+a],c);if(c.paused){if(0<c.readyState)c.currentTime=a,e(c._elem,"timeupdate");try{c.jwapi.sendEvent("play","false")}catch(d){}}}}else if(f.currentTime.prop._supset)return f.currentTime.prop._supset.apply(this,
|
80
|
+
arguments)});["play","pause"].forEach(function(a){d[a]={value:function(){var c=b(this);if(c)c.stopPlayPause&&clearTimeout(c.stopPlayPause),C(this,"sendEvent",["play","play"==a],c),setTimeout(function(){if("third"==c.isActive&&(c._ppFlag=!0,c.paused!=("play"!=a)))c.paused="play"!=a,e(c._elem,a)},1);else if(f[a].prop._supvalue)return f[a].prop._supvalue.apply(this,arguments)}}});t.forEach(g);h.onNodeNamesPropertyModify(c,"controls",function(d,e){var f=b(this);a(this)[e?"addClass":"removeClass"]("webshims-controls");
|
81
|
+
if(f){try{C(this,e?"showControls":"hideControls",[c],f)}catch(g){h.warn("you need to generate a crossdomain.xml")}"audio"==c&&E(f,e);a(f.jwapi).attr("tabindex",e?"0":"-1")}});f=h.defineNodeNameProperties(c,d,"prop")});if(o){var J=a.cleanData,K=a.browser.msie&&9>h.browserVersion,L={object:1,OBJECT:1};a.cleanData=function(a){var b,c,d;if(a&&(c=a.length)&&s)for(b=0;b<c;b++)if(L[a[b].nodeName]){if("sendEvent"in a[b]){s--;try{a[b].sendEvent("play",!1)}catch(e){}}if(K)try{for(d in a[b])"function"==typeof a[b][d]&&
|
82
|
+
(a[b][d]=null)}catch(f){}}return J.apply(this,arguments)}}n||(["poster","src"].forEach(function(a){h.defineNodeNamesProperty("src"==a?["audio","video","source"]:["video"],a,{reflect:!0,propType:"src"})}),["autoplay","controls"].forEach(function(a){h.defineNodeNamesBooleanProperty(["audio","video"],a)}),h.defineNodeNamesProperties(["audio","video"],{HAVE_CURRENT_DATA:{value:2},HAVE_ENOUGH_DATA:{value:4},HAVE_FUTURE_DATA:{value:3},HAVE_METADATA:{value:1},HAVE_NOTHING:{value:0},NETWORK_EMPTY:{value:0},
|
83
83
|
NETWORK_IDLE:{value:1},NETWORK_LOADING:{value:2},NETWORK_NO_SOURCE:{value:3}},"prop"))});
|
84
|
-
jQuery.webshims.register("track",function(a,
|
85
|
-
null,
|
86
|
-
a.track=this;this.cues.push(a)},removeCue:function(){f.error("not
|
87
|
-
a("track",this).each(function(){var b=a.prop(this,"track");
|
88
|
-
for(
|
89
|
-
|
90
|
-
0,
|
91
|
-
|
92
|
-
a(
|
93
|
-
|
94
|
-
|
95
|
-
return function(
|
96
|
-
|
97
|
-
(d
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
g){
|
103
|
-
|
84
|
+
jQuery.webshims.register("track",function(a,h,i,m){var l=h.mediaelement;(new Date).getTime();var q={subtitles:1,captions:1,descriptions:1},j=Modernizr.ES5&&Modernizr.objectAccessor,r=function(a){var e={};a.addEventListener=function(a,b){e[a]&&h.error("always use $.bind to the shimed event: "+a+" already bound fn was: "+e[a]+" your fn was: "+b);e[a]=b};a.removeEventListener=function(a,b){e[a]&&e[a]!=b&&h.error("always use $.bind/$.unbind to the shimed event: "+a+" already bound fn was: "+e[a]+" your fn was: "+
|
85
|
+
b);e[a]&&delete e[a]};return a},n={getCueById:function(a){for(var e=null,g=0,f=this.length;g<f;g++)if(this[g].id===a){e=this[g];break}return e}},o={shimActiveCues:null,_shimActiveCues:null,activeCues:null,cues:null,kind:"subtitles",label:"",language:"",mode:"disabled",readyState:0,oncuechange:null,toString:function(){return"[object TextTrack]"},addCue:function(a){if(this.cues){var e=this.cues[this.cues.length-1];e&&e.startTime>a.startTime&&h.error("cue startTime higher than previous cue's startTime")}else this.cues=
|
86
|
+
l.createCueList();a.track&&a.track.removeCue&&a.track.removeCue(a);a.track=this;this.cues.push(a)},removeCue:function(a){var e=this.cues||[],g=0,f=e.length;if(a.track!=this)h.error("cue not part of track");else{for(;g<f;g++)if(e[g]===a){e.splice(g,1);a.track=null;break}a.track&&h.error("cue not part of track")}},DISABLED:"disabled",OFF:"disabled",HIDDEN:"hidden",SHOWING:"showing",ERROR:3,LOADED:2,LOADING:1,NONE:0},s=["kind","label","srclang"],t={srclang:"language"},v=Function.prototype.call.bind(Object.prototype.hasOwnProperty),
|
87
|
+
x=function(b,e){var g=[],f=[],d=[],c,k;b||(b=h.data(this,"mediaelementBase")||h.data(this,"mediaelementBase",{}));if(!e)b.blockTrackListUpdate=!0,e=a.prop(this,"textTracks"),b.blockTrackListUpdate=!1;clearTimeout(b.updateTrackListTimer);a("track",this).each(function(){var b=a.prop(this,"track");d.push(b);-1==e.indexOf(b)&&f.push(b)});if(b.scriptedTextTracks)for(c=0,k=b.scriptedTextTracks.length;c<k;c++)d.push(b.scriptedTextTracks[c]),-1==e.indexOf(b.scriptedTextTracks[c])&&f.push(b.scriptedTextTracks[c]);
|
88
|
+
for(c=0,k=e.length;c<k;c++)-1==d.indexOf(e[c])&&g.push(e[c]);if(g.length||f.length){e.splice(0);for(c=0,k=d.length;c<k;c++)e.push(d[c]);for(c=0,k=g.length;c<k;c++)a([e]).triggerHandler(a.Event({type:"removetrack",track:e,track:g[c]}));for(c=0,k=f.length;c<k;c++)a([e]).triggerHandler(a.Event({type:"addtrack",track:e,track:f[c]}));(b.scriptedTextTracks||g.length)&&a(this).triggerHandler("updatetrackdisplay")}},u=function(b,e){e||(e=h.data(b,"trackData"));if(e&&!e.isTriggering)e.isTriggering=!0,setTimeout(function(){(e.track||
|
89
|
+
{}).readyState?a(b).closest("audio, video").triggerHandler("updatetrackdisplay"):a(b).triggerHandler("checktrackmode");e.isTriggering=!1},1)},p=a("<div />")[0];i.TextTrackCue=function(a,e,g){3!=arguments.length&&h.error("wrong arguments.length for TextTrackCue.constructor");this.startTime=a;this.endTime=e;this.text=g;this.id="";this.pauseOnExit=!1;r(this)};i.TextTrackCue.prototype={onenter:null,onexit:null,pauseOnExit:!1,getCueAsHTML:function(){var a="",e="",g=m.createDocumentFragment(),f;if(!v(this,
|
90
|
+
"getCueAsHTML"))f=this.getCueAsHTML=function(){var d,c;if(a!=this.text){a=this.text;e=l.parseCueTextToHTML(a);p.innerHTML=e;for(d=0,c=p.childNodes.length;d<c;d++)g.appendChild(p.childNodes[d].cloneNode(!0))}return g.cloneNode(!0)};return f?f.apply(this,arguments):g.cloneNode(!0)},track:null,id:""};l.createCueList=function(){return a.extend([],n)};l.parseCueTextToHTML=function(){var a=/(<\/?[^>]+>)/ig,e=/^(?:c|v|ruby|rt|b|i|u)/,g=/\<\s*\//,f=function(a,b,d,e){g.test(e)?a="</"+a+">":(d.splice(0,1),
|
91
|
+
a="<"+a+" "+b+'="'+d.join(" ").replace(/\"/g,""")+'">');return a},d=function(a){var b=a.replace(/[<\/>]+/ig,"").split(/[\s\.]+/);b[0]&&(b[0]=b[0].toLowerCase(),e.test(b[0])?"c"==b[0]?a=f("span","class",b,a):"v"==b[0]&&(a=f("q","title",b,a)):a="");return a};return function(c){return c.replace(a,d)}}();l.loadTextTrack=function(b,e,g,f){var d=g.track,c=function(){var f=a.prop(e,"src"),g,i;if("disabled"!=d.mode&&f&&a.attr(e,"src")&&(a(b).unbind("play playing timeupdate updatetrackdisplay",c),a(e).unbind("checktrackmode",
|
92
|
+
c),!d.readyState)){g=function(){d.readyState=3;d.cues=null;d.activeCues=d.shimActiveCues=d._shimActiveCues=null;a(e).triggerHandler("error")};d.readyState=1;try{d.cues=l.createCueList(),d.activeCues=d.shimActiveCues=d._shimActiveCues=l.createCueList(),i=a.ajax({dataType:"text",url:f,success:function(c){"text/vtt"!=i.getResponseHeader("content-type")&&h.error("set the mime-type of your WebVTT files to text/vtt. see: http://dev.w3.org/html5/webvtt/#text/vtt");l.parseCaptions(c,d,function(c){c&&"length"in
|
93
|
+
c?(d.readyState=2,a(e).triggerHandler("load"),a(b).triggerHandler("updatetrackdisplay")):g()})},error:g})}catch(j){g(),h.warn(j)}}};d.readyState=0;d.shimActiveCues=null;d._shimActiveCues=null;d.activeCues=null;d.cues=null;a(b).unbind("play playing timeupdate updatetrackdisplay",c);a(e).unbind("checktrackmode",c);a(b).bind("play playing timeupdate updatetrackdisplay",c);a(e).bind("checktrackmode",c);if(f)d.mode=q[d.kind]?"showing":"hidden",c()};l.createTextTrack=function(b,e){var g,f;if(e.nodeName&&
|
94
|
+
(f=h.data(e,"trackData")))u(e,f),g=f.track;if(!g)g=r(h.objectCreate(o)),j||s.forEach(function(b){var c=a.prop(e,b);c&&(g[t[b]||b]=c)}),e.nodeName?(j&&s.forEach(function(b){h.defineProperty(g,t[b]||b,{get:function(){return a.prop(e,b)}})}),f=h.data(e,"trackData",{track:g}),l.loadTextTrack(b,e,f,a.prop(e,"default")&&a(e).siblings("track[default]").andSelf()[0]==e)):(j&&s.forEach(function(a){h.defineProperty(g,t[a]||a,{value:e[a],writeable:!1})}),g.cues=l.createCueList(),g.activeCues=g._shimActiveCues=
|
95
|
+
g.shimActiveCues=l.createCueList(),g.mode="hidden",g.readyState=2);return g};l.parseCaptionChunk=function(){var a=/^(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s+\-\-\>\s+(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s*(.*)/,e=/^(DEFAULTS|DEFAULT)\s+\-\-\>\s+(.*)/g,g=/^(STYLE|STYLES)\s+\-\-\>\s*\n([\s\S]*)/g,f=/^(COMMENT|COMMENTS)\s+\-\-\>\s+(.*)/g;return function(d){var c,i,j,l;if(e.exec(d)||g.exec(d)||f.exec(d))return null;for(d=d.split(/\n/g);!d[0].replace(/\s+/ig,"").length&&0<d.length;)d.shift();for(d[0].match(/^\s*[a-z0-9-\_]+\s*$/ig)&&
|
96
|
+
(j=""+d.shift().replace(/\s*/ig,""));0<d.length;){if(l=a.exec(d[0]))i=l.slice(1),c=parseInt(3600*(i[0]||0),10)+parseInt(60*(i[1]||0),10)+parseInt(i[2]||0,10)+parseFloat("0."+(i[3]||0)),i=parseInt(3600*(i[4]||0),10)+parseInt(60*(i[5]||0),10)+parseInt(i[6]||0,10)+parseFloat("0."+(i[7]||0));d=d.slice(0,0).concat(d.slice(1));break}if(!c&&!i)return h.warn("couldn't extract time information: "+[c,i,d.join("\n"),j].join(" ; ")),null;d=d.join("\n");c=new TextTrackCue(c,i,d);if(j)c.id=j;return c}}();l.parseCaptions=
|
97
|
+
function(a,e,g){l.createCueList();var f,d,c,i,j;a?(c=/^WEBVTT(\s*FILE)?/ig,d=function(m,n){for(;m<n;m++){f=a[m];if(c.test(f))j=!0;else if(f.replace(/\s*/ig,"").length){if(!j){h.error("please use WebVTT format. This is the standard");g(null);break}(f=l.parseCaptionChunk(f,m))&&e.addCue(f)}if(i<(new Date).getTime()-30){m++;setTimeout(function(){i=(new Date).getTime();d(m,n)},90);break}}m>=n&&(j||h.error("please use WebVTT format. This is the standard"),g(e.cues))},a=a.replace(/\r\n/g,"\n"),setTimeout(function(){a=
|
98
|
+
a.replace(/\r/g,"\n");setTimeout(function(){i=(new Date).getTime();a=a.split(/\n\n+/g);d(0,a.length)},9)},9)):h.error("Required parameter captionData not supplied.")};l.createTrackList=function(a,e){e=e||h.data(a,"mediaelementBase")||h.data(a,"mediaelementBase",{});if(!e.textTracks)e.textTracks=[],h.defineProperties(e.textTracks,{onaddtrack:{value:null},onremovetrack:{value:null}}),r(e.textTracks);return e.textTracks};Modernizr.track||(h.defineNodeNamesBooleanProperty(["track"],"default"),h.reflectProperties(["track"],
|
99
|
+
["srclang","label"]),h.defineNodeNameProperties("track",{src:{reflect:!0,propType:"src"}}));h.defineNodeNameProperties("track",{kind:{attr:Modernizr.track?{set:function(a){var e=h.data(this,"trackData");this.setAttribute("data-kind",a);if(e)e.attrKind=a},get:function(){var a=h.data(this,"trackData");return a&&"attrKind"in a?a.attrKind:this.getAttribute("kind")}}:{},reflect:!0,propType:"enumarated",defaultValue:"subtitles",limitedTo:["subtitles","captions","descriptions","chapters","metadata"]}});
|
100
|
+
a.each(s,function(b,e){var g=t[e]||e;h.onNodeNamesPropertyModify("track",e,function(){var b=h.data(this,"trackData"),d=this;if(b)"kind"==e&&u(this,b),j||(b.track[g]=a.prop(this,e)),clearTimeout(b.changedTrackPropTimer),b.changedTrackPropTimer=setTimeout(function(){a(d).trigger("updatesubtitlestate")},1)})});h.onNodeNamesPropertyModify("track","src",function(b){if(b){var b=h.data(this,"trackData"),e;b&&(e=a(this).closest("video, audio"),e[0]&&l.loadTextTrack(e,this,b))}});h.defineNodeNamesProperties(["track"],
|
101
|
+
{ERROR:{value:3},LOADED:{value:2},LOADING:{value:1},NONE:{value:0},readyState:{get:function(){return(a.prop(this,"track")||{readyState:0}).readyState},writeable:!1},track:{get:function(){return l.createTextTrack(a(this).closest("audio, video")[0],this)},writeable:!1}},"prop");h.defineNodeNamesProperties(["audio","video"],{textTracks:{get:function(){var a=h.data(this,"mediaelementBase")||h.data(this,"mediaelementBase",{}),e=l.createTrackList(this,a);a.blockTrackListUpdate||x.call(this,a,e);return e},
|
102
|
+
writeable:!1},addTextTrack:{value:function(a,e,g){a=l.createTextTrack(this,{kind:a||"",label:e||"",srclang:g||""});e=h.data(this,"mediaelementBase")||h.data(this,"mediaelementBase",{});if(!e.scriptedTextTracks)e.scriptedTextTracks=[];e.scriptedTextTracks.push(a);x.call(this);return a}}},"prop");a(m).bind("emptied ended updatetracklist",function(b){if(a(b.target).is("audio, video")){var e=h.data(b.target,"mediaelementBase");if(e)clearTimeout(e.updateTrackListTimer),e.updateTrackListTimer=setTimeout(function(){x.call(b.target,
|
103
|
+
e)},0)}});h.addReady(function(b,e){var g=e.filter("video, audio, track").closest("audio, video");a("video, audio",b).add(g).each(function(){x.call(this)}).each(function(){if(Modernizr.track){var b=this.textTracks;a.prop(this,"textTracks").length!=b.length&&h.error("textTracks couldn't be copied");a("track",this).each(function(){var b=a.prop(this,"track"),c=this.track,e,f;if(c){e=a.prop(this,"kind");f=c.readyState||this.readyState;if(c.mode||f)b.mode=c.mode;if("descriptions"!=e)c.mode="string"==typeof c.mode?
|
104
|
+
"disabled":0,this.kind="metadata",a(this).attr({kind:e})}}).bind("load error",function(a){a.originalEvent&&a.stopImmediatePropagation()})}});g.each(function(){var a=this,b=h.data(a,"mediaelementBase");if(b)clearTimeout(b.updateTrackListTimer),b.updateTrackListTimer=setTimeout(function(){x.call(a,b)},9)})});Modernizr.track&&a("video, audio").trigger("trackapichange")});
|