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,58 +1,59 @@
|
|
1
|
-
jQuery.webshims.register("dom-extend",function(
|
2
|
-
!0)),null==
|
3
|
-
"shadowData");return
|
4
|
-
("attr"==a&&!0===
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
return
|
10
|
-
|
11
|
-
e)||
|
12
|
-
|
13
|
-
{set:function(a){
|
14
|
-
reflectProperties:function(a,
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
a.removeAttribute(
|
19
|
-
if(a.langObj[
|
20
|
-
c.each({defineNodeNamesProperty:"defineNodeNameProperty",defineNodeNamesProperties:"defineNodeNameProperties",createElements:"createElement"},function(a,b){g[a]=function(a,e,
|
21
|
-
(function(
|
22
|
-
|
23
|
-
(function(
|
24
|
-
test:g.videoBuffered,d:["dom-support"]}),
|
25
|
-
|
26
|
-
|
27
|
-
k,
|
28
|
-
function(){var a;return function(){!a&&f&&(a=!0,
|
29
|
-
"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"]}};
|
30
|
-
-1!=a.indexOf("youtube.com/v/"))return"video/youtube";var a=a.split("?")[0].split("."),a=a[a.length-1],d
|
31
|
-
else{var b=[],
|
32
|
-
|
33
|
-
|
34
|
-
b.isActive&&
|
35
|
-
(!m||b&&"html5"!=b.isActive||
|
36
|
-
"canPlayType",{prop:{value:function(
|
37
|
-
a).add(b.filter("video, audio")).each(function(){
|
38
|
-
|
39
|
-
jQuery.webshims.register("track",function(
|
40
|
-
null,
|
41
|
-
c.track=this;this.cues.push(c)},removeCue:function(){g.error("not
|
42
|
-
c("track",this).each(function(){var
|
43
|
-
for(
|
44
|
-
|
45
|
-
0,
|
46
|
-
a[0]&&(
|
47
|
-
|
48
|
-
g.warn(
|
49
|
-
|
50
|
-
return function(
|
51
|
-
|
52
|
-
(d
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
1
|
+
jQuery.webshims.register("dom-extend",function(d,g,k,l,m){var w=g.modules,o=/\s*,\s*/,n={},p={},q={},r={},s={},j=d.fn.val,y=function(a,b,h,A,c){return c?j.call(d(a)):j.call(d(a),h)};d.fn.val=function(a){var b=this[0];arguments.length&&null==a&&(a="");if(!arguments.length)return!b||1!==b.nodeType?j.call(this):d.prop(b,"value",a,"val",!0);if(d.isArray(a))return j.apply(this,arguments);var h=d.isFunction(a);return this.each(function(c){b=this;1===b.nodeType&&(h?(c=a.call(b,c,d.prop(b,"value",m,"val",
|
2
|
+
!0)),null==c&&(c=""),d.prop(b,"value",c,"val")):d.prop(b,"value",a,"val"))})};var u="_webshimsLib"+Math.round(1E3*Math.random()),x=function(a,b,h){a=a.jquery?a[0]:a;if(!a)return h||{};var c=d.data(a,u);h!==m&&(c||(c=d.data(a,u,{})),b&&(c[b]=h));return b?c&&c[b]:c};[{name:"getNativeElement",prop:"nativeElement"},{name:"getShadowElement",prop:"shadowElement"},{name:"getShadowFocusElement",prop:"shadowFocusElement"}].forEach(function(a){d.fn[a.name]=function(){return this.map(function(){var b=x(this,
|
3
|
+
"shadowData");return b&&b[a.prop]||this})}});["removeAttr","prop","attr"].forEach(function(a){n[a]=d[a];d[a]=function(b,h,c,e,f){var v="val"==e,t=!v?n[a]:y;if(!b||!p[h]||1!==b.nodeType||!v&&e&&"attr"==a&&d.attrFn[h])return t(b,h,c,e,f);var B=(b.nodeName||"").toLowerCase(),z=q[B],g="attr"==a&&(!1===c||null===c)?"removeAttr":a,i,j,k;z||(z=q["*"]);z&&(z=z[h]);z&&(i=z[g]);if(i){if("value"==h)j=i.isVal,i.isVal=v;if("removeAttr"===g)return i.value.call(b);if(c===m)return i.get?i.get.call(b):i.value;i.set&&
|
4
|
+
("attr"==a&&!0===c&&(c=h),k=i.set.call(b,c));if("value"==h)i.isVal=j}else k=t(b,h,c,e,f);if((c!==m||"removeAttr"===g)&&s[B]&&s[B][h]){var l;l="removeAttr"==g?!1:"prop"==g?!!c:!0;s[B][h].forEach(function(h){if(!h.only||(h.only="prop"==a)||"attr"==h.only&&"prop"!=a)h.call(b,c,l,v?"val":g,a)})}return k};r[a]=function(b,h,c){q[b]||(q[b]={});q[b][h]||(q[b][h]={});var e=q[b][h][a],f=function(b,d,e){return d&&d[b]?d[b]:e&&e[b]?e[b]:"prop"==a&&"value"==h?function(b){return c.isVal?y(this,h,b,!1,0===arguments.length):
|
5
|
+
n[a](this,h,b)}:"prop"==a&&"value"==b&&c.value.apply?function(b){var c=n[a](this,h);c&&c.apply&&(c=c.apply(this,arguments));return c}:function(b){return n[a](this,h,b)}};q[b][h][a]=c;if(c.value===m){if(!c.set)c.set=c.writeable?f("set",c,e):g.cfg.useStrict&&"prop"==h?function(){throw h+" is readonly on "+b;}:d.noop;if(!c.get)c.get=f("get",c,e)}["value","get","set"].forEach(function(b){c[b]&&(c["_sup"+b]=f(b,e))})}});var c=!d.browser.msie||8<parseInt(d.browser.version,10),e=function(){var a=g.getPrototypeOf(l.createElement("foobar")),
|
6
|
+
b=Object.prototype.hasOwnProperty;return function(h,d,e){var i=l.createElement(h),v=g.getPrototypeOf(i);if(c&&v&&a!==v&&(!i[d]||!b.call(i,d))){var t=i[d];e._supvalue=function(){return t&&t.apply?t.apply(this,arguments):t};v[d]=e.value}else e._supvalue=function(){var b=x(this,"propValue");return b&&b[d]&&b[d].apply?b[d].apply(this,arguments):b&&b[d]},f.extendValue(h,d,e.value);e.value._supvalue=e._supvalue}}(),f=function(){var a={};g.addReady(function(b,c){var h={},e=function(a){h[a]||(h[a]=d(b.getElementsByTagName(a)),
|
7
|
+
c[0]&&d.nodeName(c[0],a)&&(h[a]=h[a].add(c)))};d.each(a,function(b,a){e(b);!a||!a.forEach?g.warn("Error: with "+b+"-property. methods: "+a):a.forEach(function(a){h[b].each(a)})});h=null});var b,h=d([]),c=function(h,c){a[h]?a[h].push(c):a[h]=[c];d.isDOMReady&&(b||d(l.getElementsByTagName(h))).each(c)};return{createTmpCache:function(a){d.isDOMReady&&(b=b||d(l.getElementsByTagName(a)));return b||h},flushTmpCache:function(){b=null},content:function(b,a){c(b,function(){var b=d.attr(this,a);null!=b&&d.attr(this,
|
8
|
+
a,b)})},createElement:function(b,a){c(b,a)},extendValue:function(b,a,h){c(b,function(){d(this).each(function(){x(this,"propValue",{})[a]=this[a];this[a]=h})})}}}(),i=function(a,b){if(a.defaultValue===m)a.defaultValue="";if(!a.removeAttr)a.removeAttr={value:function(){a[b||"prop"].set.call(this,a.defaultValue);a.removeAttr._supvalue.call(this)}};if(!a.attr)a.attr={}};d.extend(g,{getID:function(){var a=(new Date).getTime();return function(b){var b=d(b),h=b.attr("id");h||(a++,h="ID-"+a,b.attr("id",h));
|
9
|
+
return h}}(),extendUNDEFProp:function(a,b){d.each(b,function(b,c){b in a||(a[b]=c)})},createPropDefault:i,data:x,moveToFirstEvent:function(){var a=d._data?"_data":"data";return function(b,c,e){if((b=(d[a](b,"events")||{})[c])&&1<b.length)c=b.pop(),e||(e="bind"),"bind"==e&&b.delegateCount?b.splice(b.delegateCount,0,c):b.unshift(c)}}(),addShadowDom:function(){var a,b,c,e,f={init:!1,start:function(){if(!this.init&&l.body)this.init=!0,this.height=d(l).height(),this.width=d(l).width(),setInterval(function(){var b=
|
10
|
+
d(l).height(),a=d(l).width();if(b!=f.height||a!=f.width)f.height=b,f.width=a,e({type:"docresize"})},600)}};e=function(e){clearTimeout(a);a=setTimeout(function(){if("resize"==e.type){var a=d(k).width(),t=d(k).width();if(t==b&&a==c)return;b=t;c=a;if(l.body)f.height=d(l).height(),f.width=d(l).width()}d.event.trigger("updateshadowdom")},40)};d(k).bind("resize",e);d.event.customEvent.updateshadowdom=!0;return function(b,a,c){c=c||{};b.jquery&&(b=b[0]);a.jquery&&(a=a[0]);var h=d.data(b,u)||d.data(b,u,{}),
|
11
|
+
e=d.data(a,u)||d.data(a,u,{}),i={};if(c.shadowFocusElement){if(c.shadowFocusElement){if(c.shadowFocusElement.jquery)c.shadowFocusElement=c.shadowFocusElement[0];i=d.data(c.shadowFocusElement,u)||d.data(c.shadowFocusElement,u,i)}}else c.shadowFocusElement=a;h.hasShadow=a;i.nativeElement=e.nativeElement=b;i.shadowData=e.shadowData=h.shadowData={nativeElement:b,shadowElement:a,shadowFocusElement:c.shadowFocusElement};c.shadowChilds&&c.shadowChilds.each(function(){x(this,"shadowData",e.shadowData)});
|
12
|
+
if(c.data)i.shadowData.data=e.shadowData.data=h.shadowData.data=c.data;c=null;g.ready("DOM",function(){f.start()})}}(),propTypes:{standard:function(a){i(a);if(!a.prop)a.prop={set:function(b){a.attr.set.call(this,""+b)},get:function(){return a.attr.get.call(this)||a.defaultValue}}},"boolean":function(a){i(a);if(!a.prop)a.prop={set:function(b){b?a.attr.set.call(this,""):a.removeAttr.value.call(this)},get:function(){return null!=a.attr.get.call(this)}}},src:function(){var a=l.createElement("a");a.style.display=
|
13
|
+
"none";return function(b,c){i(b);if(!b.prop)b.prop={set:function(a){b.attr.set.call(this,a)},get:function(){var b=this.getAttribute(c),e;if(null==b)return"";a.setAttribute("href",b+"");if(!d.support.hrefNormalized){try{d(a).insertAfter(this),e=a.getAttribute("href",4)}catch(f){e=a.getAttribute("href",4)}d(a).detach()}return e||a.href}}}}(),enumarated:function(a){i(a);if(!a.prop)a.prop={set:function(b){a.attr.set.call(this,b)},get:function(){var b=(a.attr.get.call(this)||"").toLowerCase();if(!b||-1==
|
14
|
+
a.limitedTo.indexOf(b))b=a.defaultValue;return b}}}},reflectProperties:function(a,b){"string"==typeof b&&(b=b.split(o));b.forEach(function(b){g.defineNodeNamesProperty(a,b,{prop:{set:function(a){d.attr(this,b,a)},get:function(){return d.attr(this,b)||""}}})})},defineNodeNameProperty:function(a,b,c){p[b]=!0;if(c.reflect)g.propTypes[c.propType||"standard"](c,b);["prop","attr","removeAttr"].forEach(function(f){var i=c[f];i&&(i="prop"===f?d.extend({writeable:!0},i):d.extend({},i,{writeable:!0}),r[f](a,
|
15
|
+
b,i),"*"!=a&&g.cfg.extendNative&&"prop"==f&&i.value&&d.isFunction(i.value)&&e(a,b,i),c[f]=i)});c.initAttr&&f.content(a,b);return c},defineNodeNameProperties:function(a,b,c,e){for(var d in b)!e&&b[d].initAttr&&f.createTmpCache(a),c&&!b[d][c]&&(b[d][c]={},["value","set","get"].forEach(function(a){a in b[d]&&(b[d][c][a]=b[d][a],delete b[d][a])})),b[d]=g.defineNodeNameProperty(a,d,b[d]);e||f.flushTmpCache();return b},createElement:function(a,b,c){var e;d.isFunction(b)&&(b={after:b});f.createTmpCache(a);
|
16
|
+
b.before&&f.createElement(a,b.before);c&&(e=g.defineNodeNameProperties(a,c,!1,!0));b.after&&f.createElement(a,b.after);f.flushTmpCache();return e},onNodeNamesPropertyModify:function(a,b,c,e){"string"==typeof a&&(a=a.split(o));d.isFunction(c)&&(c={set:c});a.forEach(function(a){s[a]||(s[a]={});"string"==typeof b&&(b=b.split(o));c.initAttr&&f.createTmpCache(a);b.forEach(function(b){s[a][b]||(s[a][b]=[],p[b]=!0);if(c.set){if(e)c.set.only=e;s[a][b].push(c.set)}c.initAttr&&f.content(a,b)});f.flushTmpCache()})},
|
17
|
+
defineNodeNamesBooleanProperty:function(a,b,c){c||(c={});if(d.isFunction(c))c.set=c;g.defineNodeNamesProperty(a,b,{attr:{set:function(a){this.setAttribute(b,a);c.set&&c.set.call(this,!0)},get:function(){return null==this.getAttribute(b)?m:b}},removeAttr:{value:function(){this.removeAttribute(b);c.set&&c.set.call(this,!1)}},reflect:!0,propType:"boolean",initAttr:c.initAttr||!1})},contentAttr:function(a,b,c){if(a.nodeName){if(c===m)return a=a.attributes[b]||{},c=a.specified?a.value:null,null==c?m:c;
|
18
|
+
"boolean"==typeof c?c?a.setAttribute(b,b):a.removeAttribute(b):a.setAttribute(b,c)}},activeLang:function(){var a=[],b={},c,e,f=/:\/\/|^\.*\//,i=function(a,b,c){return b&&c&&-1!==d.inArray(b,c.availabeLangs||[])?(a.loading=!0,c=c.langSrc,f.test(c)||(c=g.cfg.basePath+c),g.loader.loadScript(c+b+".js",function(){a.langObj[b]?(a.loading=!1,t(a,!0)):d(function(){a.langObj[b]&&t(a,!0);a.loading=!1})}),!0):!1},v=function(a){b[a]&&b[a].forEach(function(a){a.callback()})},t=function(a,b){if(a.activeLang!=c&&
|
19
|
+
a.activeLang!==e){var d=w[a.module].options;if(a.langObj[c]||e&&a.langObj[e])a.activeLang=c,a.callback(a.langObj[c]||a.langObj[e],c),v(a.module);else if(!b&&!i(a,c,d)&&!i(a,e,d)&&a.langObj[""]&&""!==a.activeLang)a.activeLang="",a.callback(a.langObj[""],c),v(a.module)}};return function(f){if("string"==typeof f&&f!==c)c=f,e=c.split("-")[0],c==e&&(e=!1),d.each(a,function(a,b){t(b)});else if("object"==typeof f)if(f.register)b[f.register]||(b[f.register]=[]),b[f.register].push(f),f.callback();else{if(!f.activeLang)f.activeLang=
|
20
|
+
"";a.push(f);t(f)}return c}}()});d.each({defineNodeNamesProperty:"defineNodeNameProperty",defineNodeNamesProperties:"defineNodeNameProperties",createElements:"createElement"},function(a,b){g[a]=function(a,c,e,d){"string"==typeof a&&(a=a.split(o));var f={};a.forEach(function(a){f[a]=g[b](a,c,e,d)});return f}});g.isReady("webshimLocalization",!0)});
|
21
|
+
(function(d,g){var k=d.webshims.browserVersion;if(!(d.browser.mozilla&&5<k)&&(!d.browser.msie||12>k&&7<k)){var l={article:"article",aside:"complementary",section:"region",nav:"navigation",address:"contentinfo"},m=function(d,g){d.getAttribute("role")||d.setAttribute("role",g)};d.webshims.addReady(function(k,o){d.each(l,function(g,s){for(var j=d(g,k).add(o.filter(g)),l=0,u=j.length;l<u;l++)m(j[l],s)});if(k===g){var n=g.getElementsByTagName("header")[0],p=g.getElementsByTagName("footer"),q=p.length;
|
22
|
+
n&&!d(n).closest("section, article")[0]&&m(n,"banner");q&&(n=p[q-1],d(n).closest("section, article")[0]||m(n,"contentinfo"))}})}})(jQuery,document);
|
23
|
+
(function(d,g,k){var l=g.audio&&g.video,m=!1,w=k.cfg.mediaelement,o=k.bugs,n=function(){k.ready("mediaelement-swf",function(){if(!k.mediaelement.createSWF)k.modules["mediaelement-swf"].test=d.noop,k.reTest(["mediaelement-swf"],l)})},p;if(l){var q=document.createElement("video");g.videoBuffered="buffered"in q;m="loop"in q;k.capturingEvents("play,playing,waiting,paused,ended,durationchange,loadedmetadata,canplay,volumechange".split(","));g.videoBuffered||(k.addPolyfill("mediaelement-native-fix",{f:"mediaelement",
|
24
|
+
test:g.videoBuffered,d:["dom-support"]}),k.reTest("mediaelement-native-fix"))}if(l&&!w.preferFlash){var r=function(g){var j=g.target.parentNode;!w.preferFlash&&(d(g.target).is("audio, video")||j&&d("source:last",j)[0]==g.target)&&k.ready("DOM mediaelement",function(){p&&n();k.ready("WINDOWLOAD mediaelement-swf",function(){setTimeout(function(){p&&!w.preferFlash&&k.mediaelement.createSWF&&!d(g.target).closest("audio, video").is(".nonnative-api-active")?(w.preferFlash=!0,document.removeEventListener("error",
|
25
|
+
r,!0),d("audio, video").mediaLoad(),k.info("switching mediaelements option to 'preferFlash', due to an error with native player: "+g.target.src)):p||document.removeEventListener("error",r,!0)},20)})})};document.addEventListener("error",r,!0);d("audio, video").each(function(){this.error&&r({target:this})})}o.track=!1;g.track&&function(){if(!o.track)o.track="number"!=typeof d("<track />")[0].readyState;if(!o.track)try{new TextTrackCue(2,3,"")}catch(g){o.track=!0}var j=k.cfg.track,m=function(c){d(c.target).filter("track").each(l)},
|
26
|
+
l=function(){if(o.track||!j.override&&3==d.prop(this,"readyState"))j.override=!0,k.reTest("track"),document.removeEventListener("error",m,!0),this&&d.nodeName(this,"track")?k.error("track support was overwritten. Please check your vtt including your vtt mime-type"):k.info("track support was overwritten. due to bad browser support")},n=function(){document.addEventListener("error",m,!0);o.track?l():d("track").each(l)};j.override||(k.isReady("track")?n():d(n))}();k.register("mediaelement-core",function(d,
|
27
|
+
j,k,q,r){p=swfobject.hasFlashPlayerVersion("9.0.115");var c=j.mediaelement,e=function(a,b){var a=d(a),e={src:a.attr("src")||"",elem:a,srcProp:a.prop("src")};if(!e.src)return e;var f=a.attr("type");if(f)e.type=f,e.container=d.trim(f.split(";")[0]);else if(b||(b=a[0].nodeName.toLowerCase(),"source"==b&&(b=(a.closest("video, audio")[0]||{nodeName:"video"}).nodeName.toLowerCase())),f=c.getTypeForSrc(e.src,b))e.type=f,e.container=f;if(f=a.attr("media"))e.media=f;return e},f=!p&&"postMessage"in k&&l,i=
|
28
|
+
function(){var a;return function(){!a&&f&&(a=!0,j.loader.loadScript("https://www.youtube.com/player_api"),d(function(){j.polyfill("mediaelement-yt")}))}}(),a=function(){p?n():i()};j.addPolyfill("mediaelement-yt",{test:!f,d:["dom-support"]});c.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",
|
29
|
+
"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"]}};c.mimeTypes.source=d.extend({},c.mimeTypes.audio,c.mimeTypes.video);c.getTypeForSrc=function(a,b){if(-1!=a.indexOf("youtube.com/watch?")||
|
30
|
+
-1!=a.indexOf("youtube.com/v/"))return"video/youtube";var a=a.split("?")[0].split("."),a=a[a.length-1],e;d.each(c.mimeTypes[b],function(b,c){if(-1!==c.indexOf(a))return e=b,!1});return e};c.srces=function(a,b){a=d(a);if(b)a.removeAttr("src").removeAttr("type").find("source").remove(),d.isArray(b)||(b=[b]),b.forEach(function(b){var c=q.createElement("source");"string"==typeof b&&(b={src:b});c.setAttribute("src",b.src);b.type&&c.setAttribute("type",b.type);b.media&&c.setAttribute("media",b.media);a.append(c)});
|
31
|
+
else{var b=[],c=a[0].nodeName.toLowerCase(),f=e(a,c);f.src?b.push(f):d("source",a).each(function(){f=e(this,c);f.src&&b.push(f)});return b}};d.fn.loadMediaSrc=function(a,b){return this.each(function(){b!==r&&(d(this).removeAttr("poster"),b&&d.attr(this,"poster",b));c.srces(this,a);d(this).mediaLoad()})};c.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(",");
|
32
|
+
c.canThirdPlaySrces=function(a,b){var e="";if(p||f)a=d(a),b=b||c.srces(a),d.each(b,function(a,b){if(b.container&&b.src&&(p&&-1!=c.swfMimeTypes.indexOf(b.container)||f&&"video/youtube"==b.container))return e=b,!1});return e};var b={};c.canNativePlaySrces=function(a,e){var f="";if(l){var a=d(a),h=(a[0].nodeName||"").toLowerCase();if(!b[h])return f;e=e||c.srces(a);d.each(e,function(c,d){if(d.type&&b[h].prop._supvalue.call(a[0],d.type))return f=d,!1})}return f};c.setError=function(a,b){b||(b="can't play sources");
|
33
|
+
d(a).pause().data("mediaerror",b);j.warn("mediaelementError: "+b);setTimeout(function(){d(a).data("mediaerror")&&d(a).trigger("mediaerror")},1)};var h=function(){var b;return function(d,e,g){j.ready(p?"mediaelement-swf":"mediaelement-yt",function(){c.createSWF?c.createSWF(d,e,g):b||(b=!0,a(),h(d,e,g))});!b&&f&&!c.createSWF&&i()}}(),A=function(a,b,d,e,f){d||!1!==d&&b&&"third"==b.isActive?(d=c.canThirdPlaySrces(a,e))?h(a,d,b):f?c.setError(a,!1):A(a,b,!1,e,!0):(d=c.canNativePlaySrces(a,e))?b&&"third"==
|
34
|
+
b.isActive&&c.setActive(a,"html5",b):f?(c.setError(a,!1),b&&"third"==b.isActive&&c.setActive(a,"html5",b)):A(a,b,!0,e,!0)},D=/^(?:embed|object|datalist)$/i,C=function(a,b){var e=j.data(a,"mediaelementBase")||j.data(a,"mediaelementBase",{}),f=c.srces(a),h=a.parentNode;clearTimeout(e.loadTimer);d.data(a,"mediaerror",!1);if(f.length&&h&&!(1!=h.nodeType||D.test(h.nodeName||"")))b=b||j.data(a,"mediaelement"),A(a,b,w.preferFlash||r,f)};d(q).bind("ended",function(a){var b=j.data(a.target,"mediaelement");
|
35
|
+
(!m||b&&"html5"!=b.isActive||d.prop(a.target,"loop"))&&setTimeout(function(){!d.prop(a.target,"paused")&&d.prop(a.target,"loop")&&d(a.target).prop("currentTime",0).play()},1)});m||j.defineNodeNamesBooleanProperty(["audio","video"],"loop");["audio","video"].forEach(function(a){var e=j.defineNodeNameProperty(a,"load",{prop:{value:function(){var a=j.data(this,"mediaelement");C(this,a);l&&(!a||"html5"==a.isActive)&&e.prop._supvalue&&e.prop._supvalue.apply(this,arguments)}}});b[a]=j.defineNodeNameProperty(a,
|
36
|
+
"canPlayType",{prop:{value:function(e){var f="";l&&b[a].prop._supvalue&&(f=b[a].prop._supvalue.call(this,e),"no"==f&&(f=""));!f&&p&&(e=d.trim((e||"").split(";")[0]),-1!=c.swfMimeTypes.indexOf(e)&&(f="maybe"));return f}}})});j.onNodeNamesPropertyModify(["audio","video"],["src","poster"],{set:function(){var a=this,b=j.data(a,"mediaelementBase")||j.data(a,"mediaelementBase",{});clearTimeout(b.loadTimer);b.loadTimer=setTimeout(function(){C(a);a=null},9)}});k=function(){j.addReady(function(a,b){d("video, audio",
|
37
|
+
a).add(b.filter("video, audio")).each(function(){d.browser.msie&&8<j.browserVersion&&d.prop(this,"paused")&&!d.prop(this,"readyState")&&d(this).is('audio[preload="none"][controls]:not([autoplay])')?d(this).prop("preload","metadata").mediaLoad():C(this);if(l){var a,b,c=this,e=function(){var a=d.prop(c,"buffered");if(a){for(var b="",e=0,f=a.length;e<f;e++)b+=a.end(e);return b}},f=function(){var a=e();a!=b&&(b=a,d(c).triggerHandler("progress"))};d(this).bind("play loadstart progress",function(c){"progress"==
|
38
|
+
c.type&&(b=e());clearTimeout(a);a=setTimeout(f,999)}).bind("emptied stalled mediaerror abort suspend",function(c){"emptied"==c.type&&(b=!1);clearTimeout(a)})}})})};g.track&&!o.track&&j.defineProperty(TextTrack.prototype,"shimActiveCues",{get:function(){return this._shimActiveCues||this.activeCues}});l?(j.isReady("mediaelement-core",!0),k(),j.ready("WINDOWLOAD mediaelement",a)):j.ready("mediaelement-swf",k);d(function(){j.loader.loadList(["track-ui"])})})})(jQuery,Modernizr,jQuery.webshims);
|
39
|
+
jQuery.webshims.register("track",function(d,g,k,l){var m=g.mediaelement;(new Date).getTime();var w={subtitles:1,captions:1,descriptions:1},o=Modernizr.ES5&&Modernizr.objectAccessor,n=function(c){var e={};c.addEventListener=function(c,d){e[c]&&g.error("always use $.bind to the shimed event: "+c+" already bound fn was: "+e[c]+" your fn was: "+d);e[c]=d};c.removeEventListener=function(c,d){e[c]&&e[c]!=d&&g.error("always use $.bind/$.unbind to the shimed event: "+c+" already bound fn was: "+e[c]+" your fn was: "+
|
40
|
+
d);e[c]&&delete e[c]};return c},p={getCueById:function(c){for(var d=null,f=0,g=this.length;f<g;f++)if(this[f].id===c){d=this[f];break}return d}},q={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(c){if(this.cues){var d=this.cues[this.cues.length-1];d&&d.startTime>c.startTime&&g.error("cue startTime higher than previous cue's startTime")}else this.cues=
|
41
|
+
m.createCueList();c.track&&c.track.removeCue&&c.track.removeCue(c);c.track=this;this.cues.push(c)},removeCue:function(c){var d=this.cues||[],f=0,i=d.length;if(c.track!=this)g.error("cue not part of track");else{for(;f<i;f++)if(d[f]===c){d.splice(f,1);c.track=null;break}c.track&&g.error("cue not part of track")}},DISABLED:"disabled",OFF:"disabled",HIDDEN:"hidden",SHOWING:"showing",ERROR:3,LOADED:2,LOADING:1,NONE:0},r=["kind","label","srclang"],s={srclang:"language"},j=Function.prototype.call.bind(Object.prototype.hasOwnProperty),
|
42
|
+
y=function(c,e){var f=[],i=[],a=[],b,h;c||(c=g.data(this,"mediaelementBase")||g.data(this,"mediaelementBase",{}));if(!e)c.blockTrackListUpdate=!0,e=d.prop(this,"textTracks"),c.blockTrackListUpdate=!1;clearTimeout(c.updateTrackListTimer);d("track",this).each(function(){var b=d.prop(this,"track");a.push(b);-1==e.indexOf(b)&&i.push(b)});if(c.scriptedTextTracks)for(b=0,h=c.scriptedTextTracks.length;b<h;b++)a.push(c.scriptedTextTracks[b]),-1==e.indexOf(c.scriptedTextTracks[b])&&i.push(c.scriptedTextTracks[b]);
|
43
|
+
for(b=0,h=e.length;b<h;b++)-1==a.indexOf(e[b])&&f.push(e[b]);if(f.length||i.length){e.splice(0);for(b=0,h=a.length;b<h;b++)e.push(a[b]);for(b=0,h=f.length;b<h;b++)d([e]).triggerHandler(d.Event({type:"removetrack",track:e,track:f[b]}));for(b=0,h=i.length;b<h;b++)d([e]).triggerHandler(d.Event({type:"addtrack",track:e,track:i[b]}));(c.scriptedTextTracks||f.length)&&d(this).triggerHandler("updatetrackdisplay")}},u=function(c,e){e||(e=g.data(c,"trackData"));if(e&&!e.isTriggering)e.isTriggering=!0,setTimeout(function(){(e.track||
|
44
|
+
{}).readyState?d(c).closest("audio, video").triggerHandler("updatetrackdisplay"):d(c).triggerHandler("checktrackmode");e.isTriggering=!1},1)},x=d("<div />")[0];k.TextTrackCue=function(c,d,f){3!=arguments.length&&g.error("wrong arguments.length for TextTrackCue.constructor");this.startTime=c;this.endTime=d;this.text=f;this.id="";this.pauseOnExit=!1;n(this)};k.TextTrackCue.prototype={onenter:null,onexit:null,pauseOnExit:!1,getCueAsHTML:function(){var c="",d="",f=l.createDocumentFragment(),g;if(!j(this,
|
45
|
+
"getCueAsHTML"))g=this.getCueAsHTML=function(){var a,b;if(c!=this.text){c=this.text;d=m.parseCueTextToHTML(c);x.innerHTML=d;for(a=0,b=x.childNodes.length;a<b;a++)f.appendChild(x.childNodes[a].cloneNode(!0))}return f.cloneNode(!0)};return g?g.apply(this,arguments):f.cloneNode(!0)},track:null,id:""};m.createCueList=function(){return d.extend([],p)};m.parseCueTextToHTML=function(){var c=/(<\/?[^>]+>)/ig,d=/^(?:c|v|ruby|rt|b|i|u)/,f=/\<\s*\//,g=function(a,c,d,e){f.test(e)?a="</"+a+">":(d.splice(0,1),
|
46
|
+
a="<"+a+" "+c+'="'+d.join(" ").replace(/\"/g,""")+'">');return a},a=function(a){var c=a.replace(/[<\/>]+/ig,"").split(/[\s\.]+/);c[0]&&(c[0]=c[0].toLowerCase(),d.test(c[0])?"c"==c[0]?a=g("span","class",c,a):"v"==c[0]&&(a=g("q","title",c,a)):a="");return a};return function(b){return b.replace(c,a)}}();m.loadTextTrack=function(c,e,f,i){var a=f.track,b=function(){var f=d.prop(e,"src"),i,j;if("disabled"!=a.mode&&f&&d.attr(e,"src")&&(d(c).unbind("play playing timeupdate updatetrackdisplay",b),d(e).unbind("checktrackmode",
|
47
|
+
b),!a.readyState)){i=function(){a.readyState=3;a.cues=null;a.activeCues=a.shimActiveCues=a._shimActiveCues=null;d(e).triggerHandler("error")};a.readyState=1;try{a.cues=m.createCueList(),a.activeCues=a.shimActiveCues=a._shimActiveCues=m.createCueList(),j=d.ajax({dataType:"text",url:f,success:function(b){"text/vtt"!=j.getResponseHeader("content-type")&&g.error("set the mime-type of your WebVTT files to text/vtt. see: http://dev.w3.org/html5/webvtt/#text/vtt");m.parseCaptions(b,a,function(b){b&&"length"in
|
48
|
+
b?(a.readyState=2,d(e).triggerHandler("load"),d(c).triggerHandler("updatetrackdisplay")):i()})},error:i})}catch(k){i(),g.warn(k)}}};a.readyState=0;a.shimActiveCues=null;a._shimActiveCues=null;a.activeCues=null;a.cues=null;d(c).unbind("play playing timeupdate updatetrackdisplay",b);d(e).unbind("checktrackmode",b);d(c).bind("play playing timeupdate updatetrackdisplay",b);d(e).bind("checktrackmode",b);if(i)a.mode=w[a.kind]?"showing":"hidden",b()};m.createTextTrack=function(c,e){var f,i;if(e.nodeName&&
|
49
|
+
(i=g.data(e,"trackData")))u(e,i),f=i.track;if(!f)f=n(g.objectCreate(q)),o||r.forEach(function(a){var b=d.prop(e,a);b&&(f[s[a]||a]=b)}),e.nodeName?(o&&r.forEach(function(a){g.defineProperty(f,s[a]||a,{get:function(){return d.prop(e,a)}})}),i=g.data(e,"trackData",{track:f}),m.loadTextTrack(c,e,i,d.prop(e,"default")&&d(e).siblings("track[default]").andSelf()[0]==e)):(o&&r.forEach(function(a){g.defineProperty(f,s[a]||a,{value:e[a],writeable:!1})}),f.cues=m.createCueList(),f.activeCues=f._shimActiveCues=
|
50
|
+
f.shimActiveCues=m.createCueList(),f.mode="hidden",f.readyState=2);return f};m.parseCaptionChunk=function(){var c=/^(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s+\-\-\>\s+(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s*(.*)/,d=/^(DEFAULTS|DEFAULT)\s+\-\-\>\s+(.*)/g,f=/^(STYLE|STYLES)\s+\-\-\>\s*\n([\s\S]*)/g,i=/^(COMMENT|COMMENTS)\s+\-\-\>\s+(.*)/g;return function(a){var b,h,j,k;if(d.exec(a)||f.exec(a)||i.exec(a))return null;for(a=a.split(/\n/g);!a[0].replace(/\s+/ig,"").length&&0<a.length;)a.shift();for(a[0].match(/^\s*[a-z0-9-\_]+\s*$/ig)&&
|
51
|
+
(j=""+a.shift().replace(/\s*/ig,""));0<a.length;){if(k=c.exec(a[0]))h=k.slice(1),b=parseInt(3600*(h[0]||0),10)+parseInt(60*(h[1]||0),10)+parseInt(h[2]||0,10)+parseFloat("0."+(h[3]||0)),h=parseInt(3600*(h[4]||0),10)+parseInt(60*(h[5]||0),10)+parseInt(h[6]||0,10)+parseFloat("0."+(h[7]||0));a=a.slice(0,0).concat(a.slice(1));break}if(!b&&!h)return g.warn("couldn't extract time information: "+[b,h,a.join("\n"),j].join(" ; ")),null;a=a.join("\n");b=new TextTrackCue(b,h,a);if(j)b.id=j;return b}}();m.parseCaptions=
|
52
|
+
function(c,d,f){m.createCueList();var i,a,b,h,j;c?(b=/^WEBVTT(\s*FILE)?/ig,a=function(k,l){for(;k<l;k++){i=c[k];if(b.test(i))j=!0;else if(i.replace(/\s*/ig,"").length){if(!j){g.error("please use WebVTT format. This is the standard");f(null);break}(i=m.parseCaptionChunk(i,k))&&d.addCue(i)}if(h<(new Date).getTime()-30){k++;setTimeout(function(){h=(new Date).getTime();a(k,l)},90);break}}k>=l&&(j||g.error("please use WebVTT format. This is the standard"),f(d.cues))},c=c.replace(/\r\n/g,"\n"),setTimeout(function(){c=
|
53
|
+
c.replace(/\r/g,"\n");setTimeout(function(){h=(new Date).getTime();c=c.split(/\n\n+/g);a(0,c.length)},9)},9)):g.error("Required parameter captionData not supplied.")};m.createTrackList=function(c,d){d=d||g.data(c,"mediaelementBase")||g.data(c,"mediaelementBase",{});if(!d.textTracks)d.textTracks=[],g.defineProperties(d.textTracks,{onaddtrack:{value:null},onremovetrack:{value:null}}),n(d.textTracks);return d.textTracks};Modernizr.track||(g.defineNodeNamesBooleanProperty(["track"],"default"),g.reflectProperties(["track"],
|
54
|
+
["srclang","label"]),g.defineNodeNameProperties("track",{src:{reflect:!0,propType:"src"}}));g.defineNodeNameProperties("track",{kind:{attr:Modernizr.track?{set:function(c){var d=g.data(this,"trackData");this.setAttribute("data-kind",c);if(d)d.attrKind=c},get:function(){var c=g.data(this,"trackData");return c&&"attrKind"in c?c.attrKind:this.getAttribute("kind")}}:{},reflect:!0,propType:"enumarated",defaultValue:"subtitles",limitedTo:["subtitles","captions","descriptions","chapters","metadata"]}});
|
55
|
+
d.each(r,function(c,e){var f=s[e]||e;g.onNodeNamesPropertyModify("track",e,function(){var c=g.data(this,"trackData"),a=this;if(c)"kind"==e&&u(this,c),o||(c.track[f]=d.prop(this,e)),clearTimeout(c.changedTrackPropTimer),c.changedTrackPropTimer=setTimeout(function(){d(a).trigger("updatesubtitlestate")},1)})});g.onNodeNamesPropertyModify("track","src",function(c){if(c){var c=g.data(this,"trackData"),e;c&&(e=d(this).closest("video, audio"),e[0]&&m.loadTextTrack(e,this,c))}});g.defineNodeNamesProperties(["track"],
|
56
|
+
{ERROR:{value:3},LOADED:{value:2},LOADING:{value:1},NONE:{value:0},readyState:{get:function(){return(d.prop(this,"track")||{readyState:0}).readyState},writeable:!1},track:{get:function(){return m.createTextTrack(d(this).closest("audio, video")[0],this)},writeable:!1}},"prop");g.defineNodeNamesProperties(["audio","video"],{textTracks:{get:function(){var c=g.data(this,"mediaelementBase")||g.data(this,"mediaelementBase",{}),d=m.createTrackList(this,c);c.blockTrackListUpdate||y.call(this,c,d);return d},
|
57
|
+
writeable:!1},addTextTrack:{value:function(c,d,f){c=m.createTextTrack(this,{kind:c||"",label:d||"",srclang:f||""});d=g.data(this,"mediaelementBase")||g.data(this,"mediaelementBase",{});if(!d.scriptedTextTracks)d.scriptedTextTracks=[];d.scriptedTextTracks.push(c);y.call(this);return c}}},"prop");d(l).bind("emptied ended updatetracklist",function(c){if(d(c.target).is("audio, video")){var e=g.data(c.target,"mediaelementBase");if(e)clearTimeout(e.updateTrackListTimer),e.updateTrackListTimer=setTimeout(function(){y.call(c.target,
|
58
|
+
e)},0)}});g.addReady(function(c,e){var f=e.filter("video, audio, track").closest("audio, video");d("video, audio",c).add(f).each(function(){y.call(this)}).each(function(){if(Modernizr.track){var c=this.textTracks;d.prop(this,"textTracks").length!=c.length&&g.error("textTracks couldn't be copied");d("track",this).each(function(){var a=d.prop(this,"track"),b=this.track,c,e;if(b){c=d.prop(this,"kind");e=b.readyState||this.readyState;if(b.mode||e)a.mode=b.mode;if("descriptions"!=c)b.mode="string"==typeof b.mode?
|
59
|
+
"disabled":0,this.kind="metadata",d(this).attr({kind:c})}}).bind("load error",function(a){a.originalEvent&&a.stopImmediatePropagation()})}});f.each(function(){var c=this,a=g.data(c,"mediaelementBase");if(a)clearTimeout(a.updateTrackListTimer),a.updateTrackListTimer=setTimeout(function(){y.call(c,a)},9)})});Modernizr.track&&d("video, audio").trigger("trackapichange")});
|