popcornjs-rails 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,50 +1,45 @@
1
1
  /*
2
- * popcorn.js version 1.1.2
2
+ * popcorn.js version 1.2
3
3
  * http://popcornjs.org
4
4
  *
5
5
  * Copyright 2011, Mozilla Foundation
6
6
  * Licensed under the MIT license
7
7
  */
8
8
 
9
- (function(r,s){function L(a,b){return function(){if(c.plugin.debug)return a.apply(this,arguments);try{return a.apply(this,arguments)}catch(d){c.plugin.errors.push({plugin:b,thrown:d,source:a.toString()});this.trigger("error",c.plugin.errors)}}}function C(a){a=typeof a==="string"?a:[a.language,a.region].join("-");var b=a.split("-");return{iso6391:a,language:b[0]||"",region:b[1]||""}}if(s.addEventListener){var v=Array.prototype,D=Object.prototype,E=v.forEach,F=v.slice,z=D.hasOwnProperty,G=D.toString,
10
- M=r.Popcorn,A=/^(#([\w\-\_\.]+))$/,y=[],H=false,w={events:{hash:{},apis:{}}},I=function(){return r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.oRequestAnimationFrame||r.msRequestAnimationFrame||function(a){r.setTimeout(a,16)}}(),J=function(a){var b=a.media.currentTime,d=a.options.frameAnimation,e=a.data.disabled,f=a.data.trackEvents,g=f.animating,h=f.startIndex,m=c.registryByName,j=0,l,o;for(h=Math.min(h+1,f.byStart.length-2);h>0&&f.byStart[h];){j=f.byStart[h];
11
- o=(l=j._natives)&&l.type;if(!l||m[o]||a[o])if(j.start<=b&&j.end>b&&e.indexOf(o)===-1){if(!j._running){j._running=true;l.start.call(a,null,j);d&&j&&j._running&&j.natives.frame&&l.frame.call(a,null,j,b)}}else if(j._running===true){j._running=false;l.end.call(a,null,j);if(d&&j._natives.frame){j=g.indexOf(j);j>=0&&g.splice(j,1)}}h--}},c=function(a,b){return new c.p.init(a,b||null)};c.version="1.1.2";c.isSupported=true;c.instances=[];c.p=c.prototype={init:function(a,b){var d;if(typeof a==="function")if(s.readyState===
12
- "interactive"||s.readyState==="complete")a(s,c);else{y.push(a);if(!H){H=true;var e=function(){s.removeEventListener("DOMContentLoaded",e,false);for(var g=0,h=y.length;g<h;g++)y[g].call(s,c);y=null};s.addEventListener("DOMContentLoaded",e,false)}}else{this.media=(d=A.exec(a))&&d.length&&d[2]?s.getElementById(d[2]):a;this[this.media.nodeName&&this.media.nodeName.toLowerCase()||"video"]=this.media;c.instances.push(this);this.options=b||{};this.isDestroyed=false;this.data={timeUpdate:c.nop,disabled:[],
13
- events:{},hooks:{},history:[],state:{volume:this.media.volume},trackRefs:{},trackEvents:{byStart:[{start:-1,end:-1}],byEnd:[{start:-1,end:-1}],animating:[],startIndex:0,endIndex:0,previousUpdateTime:-1}};var f=function(g){var h;if(g.media.readyState>=2){h=g.media.duration;h=h!=h?Number.MAX_VALUE:h+1;c.addTrackEvent(g,{start:h,end:h});if(g.options.frameAnimation){g.data.timeUpdate=function(){c.timeUpdate(g,{});g.trigger("timeupdate");!g.isDestroyed&&I(g.data.timeUpdate)};!g.isDestroyed&&I(g.data.timeUpdate)}else{g.data.timeUpdate=
14
- function(m){c.timeUpdate(g,m)};g.isDestroyed||g.media.addEventListener("timeupdate",g.data.timeUpdate,false)}}else r.setTimeout(function(){f(g)},1)};f(this);return this}}};c.p.init.prototype=c.p;c.forEach=function(a,b,d){if(!a||!b)return{};d=d||this;var e,f;if(E&&a.forEach===E)return a.forEach(b,d);if(G.call(a)==="[object NodeList]"){e=0;for(f=a.length;e<f;e++)b.call(d,a[e],e,a);return a}for(e in a)z.call(a,e)&&b.call(d,a[e],e,a);return a};c.extend=function(a){var b=F.call(arguments,1);c.forEach(b,
15
- function(d){for(var e in d)a[e]=d[e]});return a};c.extend(c,{noConflict:function(a){if(a)r.Popcorn=M;return c},error:function(a){throw Error(a);},guid:function(a){c.guid.counter++;return(a?a:"")+(+new Date+c.guid.counter)},sizeOf:function(a){var b=0,d;for(d in a)b++;return b},isArray:Array.isArray||function(a){return G.call(a)==="[object Array]"},nop:function(){},position:function(a){a=a.getBoundingClientRect();var b={},d=s.documentElement,e=s.body,f,g,h;f=d.clientTop||e.clientTop||0;g=d.clientLeft||
16
- e.clientLeft||0;h=r.pageYOffset&&d.scrollTop||e.scrollTop;d=r.pageXOffset&&d.scrollLeft||e.scrollLeft;f=Math.ceil(a.top+h-f);g=Math.ceil(a.left+d-g);for(var m in a)b[m]=Math.round(a[m]);return c.extend({},b,{top:f,left:g})},disable:function(a,b){var d=a.data.disabled;d.indexOf(b)===-1&&d.push(b);J(a);return a},enable:function(a,b){var d=a.data.disabled,e=d.indexOf(b);e>-1&&d.splice(e,1);J(a);return a},destroy:function(a){var b=a.data.events,d,e,f;for(e in b){d=b[e];for(f in d)delete d[f];b[e]=null}if(!a.isDestroyed){a.data.timeUpdate&&
17
- a.media.removeEventListener("timeupdate",a.data.timeUpdate,false);a.isDestroyed=true}}});c.guid.counter=1;c.extend(c.p,function(){var a={};c.forEach("load play pause currentTime playbackRate volume duration preload playbackRate autoplay loop controls muted buffered readyState seeking paused played seekable ended".split(/\s+/g),function(b){a[b]=function(d){if(typeof this.media[b]==="function"){if(d!=null&&/play|pause/.test(b))this.media.currentTime=c.util.toSeconds(d);this.media[b]();return this}if(d!=
18
- null){this.media[b]=d;return this}return this.media[b]}});return a}());c.forEach("enable disable".split(" "),function(a){c.p[a]=function(b){return c[a](this,b)}});c.extend(c.p,{roundTime:function(){return-~this.media.currentTime},exec:function(a,b){c.addTrackEvent(this,{start:a,end:a+1,_running:false,_natives:{start:b||c.nop,end:c.nop,type:"exec"}});return this},mute:function(a){a=a==null||a===true?"muted":"unmuted";if(a==="unmuted"){this.media.muted=false;this.media.volume=this.data.state.volume}if(a===
19
- "muted"){this.data.state.volume=this.media.volume;this.media.muted=true}this.trigger(a);return this},unmute:function(a){return this.mute(a==null?false:!a)},position:function(){return c.position(this.media)},toggle:function(a){return c[this.data.disabled.indexOf(a)>-1?"enable":"disable"](this,a)},defaults:function(a,b){if(c.isArray(a)){c.forEach(a,function(d){for(var e in d)this.defaults(e,d[e])},this);return this}if(!this.options.defaults)this.options.defaults={};this.options.defaults[a]||(this.options.defaults[a]=
20
- {});c.extend(this.options.defaults[a],b);return this}});c.Events={UIEvents:"blur focus focusin focusout load resize scroll unload",MouseEvents:"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave click dblclick",Events:"loadstart progress suspend emptied stalled play pause loadedmetadata loadeddata waiting playing canplay canplaythrough seeking seeked timeupdate ended ratechange durationchange volumechange"};c.Events.Natives=c.Events.UIEvents+" "+c.Events.MouseEvents+" "+c.Events.Events;
21
- w.events.apiTypes=["UIEvents","MouseEvents","Events"];(function(a,b){for(var d=w.events.apiTypes,e=a.Natives.split(/\s+/g),f=0,g=e.length;f<g;f++)b.hash[e[f]]=true;d.forEach(function(h){b.apis[h]={};for(var m=a[h].split(/\s+/g),j=m.length,l=0;l<j;l++)b.apis[h][m[l]]=true})})(c.Events,w.events);c.events={isNative:function(a){return!!w.events.hash[a]},getInterface:function(a){if(!c.events.isNative(a))return false;var b=w.events,d=b.apiTypes;b=b.apis;for(var e=0,f=d.length,g,h;e<f;e++){h=d[e];if(b[h][a]){g=
22
- h;break}}return g},all:c.Events.Natives.split(/\s+/g),fn:{trigger:function(a,b){var d;if(this.data.events[a]&&c.sizeOf(this.data.events[a])){if(d=c.events.getInterface(a)){d=s.createEvent(d);d.initEvent(a,true,true,r,1);this.media.dispatchEvent(d);return this}c.forEach(this.data.events[a],function(e){e.call(this,b)},this)}return this},listen:function(a,b){var d=this,e=true,f=c.events.hooks[a],g;if(!this.data.events[a]){this.data.events[a]={};e=false}if(f){f.add&&f.add.call(this,{},b);if(f.bind)a=
23
- f.bind;if(f.handler){g=b;b=function(h){f.handler.call(d,h,g)}}e=true;if(!this.data.events[a]){this.data.events[a]={};e=false}}this.data.events[a][b.name||b.toString()+c.guid()]=b;!e&&c.events.all.indexOf(a)>-1&&this.media.addEventListener(a,function(h){c.forEach(d.data.events[a],function(m){typeof m==="function"&&m.call(d,h)})},false);return this},unlisten:function(a,b){if(this.data.events[a]&&this.data.events[a][b]){delete this.data.events[a][b];return this}this.data.events[a]=null;return this}},
24
- hooks:{canplayall:{bind:"canplaythrough",add:function(a,b){var d=false;if(this.media.readyState){b.call(this,a);d=true}this.data.hooks.canplayall={fired:d}},handler:function(a,b){if(!this.data.hooks.canplayall.fired){b.call(this,a);this.data.hooks.canplayall.fired=true}}}}};c.forEach(["trigger","listen","unlisten"],function(a){c.p[a]=c.events.fn[a]});c.addTrackEvent=function(a,b){if(b&&b._natives&&b._natives.type&&a.options.defaults&&a.options.defaults[b._natives.type])b=c.extend({},a.options.defaults[b._natives.type],
25
- b);if(b._natives){b._id=!b.id?c.guid(b._natives.type):b.id;a.data.history.push(b._id)}b.start=c.util.toSeconds(b.start,a.options.framerate);b.end=c.util.toSeconds(b.end,a.options.framerate);var d=a.data.trackEvents.byStart,e=a.data.trackEvents.byEnd,f;for(f=d.length-1;f>=0;f--)if(b.start>=d[f].start){d.splice(f+1,0,b);break}for(d=e.length-1;d>=0;d--)if(b.end>e[d].end){e.splice(d+1,0,b);break}if(b._natives&&(c.registryByName[b._natives.type]||a[b._natives.type])){e=a.media.currentTime;if(b.end>e&&
26
- b.start<=e&&a.data.disabled.indexOf(b._natives.type)===-1){b._running=true;b._natives.start.call(a,null,b);if(a.options.frameAnimation&&b._natives.frame){a.data.trackEvents.animating.push(b);b._natives.frame.call(a,null,b,e)}}}f<=a.data.trackEvents.startIndex&&b.start<=a.data.trackEvents.previousUpdateTime&&a.data.trackEvents.startIndex++;d<=a.data.trackEvents.endIndex&&b.end<a.data.trackEvents.previousUpdateTime&&a.data.trackEvents.endIndex++;this.timeUpdate(a,null,true);b._id&&c.addTrackEvent.ref(a,
27
- b)};c.addTrackEvent.ref=function(a,b){a.data.trackRefs[b._id]=b;return a};c.removeTrackEvent=function(a,b){var d=a.data.history.length,e=0,f=[],g=[],h=[],m=[];c.forEach(a.data.trackEvents.byStart,function(l,o){if(!l._id){f.push(a.data.trackEvents.byStart[o]);g.push(a.data.trackEvents.byEnd[o])}if(l._id){if(l._id!==b){f.push(a.data.trackEvents.byStart[o]);g.push(a.data.trackEvents.byEnd[o])}if(l._id===b){e=o;l._natives._teardown&&l._natives._teardown.call(a,l)}}});a.data.trackEvents.animating.length&&
28
- c.forEach(a.data.trackEvents.animating,function(l,o){l._id||h.push(a.data.trackEvents.animating[o]);l._id&&l._id!==b&&h.push(a.data.trackEvents.animating[o])});e<=a.data.trackEvents.startIndex&&a.data.trackEvents.startIndex--;e<=a.data.trackEvents.endIndex&&a.data.trackEvents.endIndex--;a.data.trackEvents.byStart=f;a.data.trackEvents.byEnd=g;a.data.trackEvents.animating=h;for(var j=0;j<d;j++)a.data.history[j]!==b&&m.push(a.data.history[j]);a.data.history=m;c.removeTrackEvent.ref(a,b)};c.removeTrackEvent.ref=
29
- function(a,b){delete a.data.trackRefs[b];return a};c.getTrackEvents=function(a){var b=[];a=a.data.trackEvents.byStart;for(var d=a.length,e=0,f;e<d;e++){f=a[e];f._id&&b.push(f)}return b};c.getTrackEvents.ref=function(a){return a.data.trackRefs};c.getTrackEvent=function(a,b){return a.data.trackRefs[b]};c.getTrackEvent.ref=function(a,b){return a.data.trackRefs[b]};c.getLastTrackEventId=function(a){return a.data.history[a.data.history.length-1]};c.timeUpdate=function(a,b){var d=a.media.currentTime,e=
30
- a.data.trackEvents.previousUpdateTime,f=a.data.trackEvents,g=f.animating,h=f.endIndex,m=f.startIndex,j=0,l=f.byStart.length,o=f.byEnd.length,k=c.registryByName,n,i,p;if(e<=d){for(;f.byEnd[h]&&f.byEnd[h].end<=d;){n=f.byEnd[h];p=(e=n._natives)&&e.type;if(!e||k[p]||a[p]){if(n._running===true){n._running=false;e.end.call(a,b,n);a.trigger("trackend",c.extend({},n,{plugin:p,type:"trackend"}))}h++}else{c.removeTrackEvent(a,n._id);return}}for(;f.byStart[m]&&f.byStart[m].start<=d;){i=f.byStart[m];p=(e=i._natives)&&
31
- e.type;if(!e||k[p]||a[p]){if(i.end>d&&i._running===false&&a.data.disabled.indexOf(p)===-1){i._running=true;e.start.call(a,b,i);a.trigger("trackstart",c.extend({},i,{plugin:p,type:"trackstart"}));a.options.frameAnimation&&i&&i._running&&i._natives.frame&&g.push(i)}m++}else{c.removeTrackEvent(a,i._id);return}}if(a.options.frameAnimation)for(;j<g.length;){k=g[j];if(k._running){k._natives.frame.call(a,b,k,d);j++}else g.splice(j,1)}}else if(e>d){for(;f.byStart[m]&&f.byStart[m].start>d;){i=f.byStart[m];
32
- p=(e=i._natives)&&e.type;if(!e||k[p]||a[p]){if(i._running===true){i._running=false;e.end.call(a,b,i);a.trigger("trackend",c.extend({},n,{plugin:p,type:"trackend"}))}m--}else{c.removeTrackEvent(a,i._id);return}}for(;f.byEnd[h]&&f.byEnd[h].end>d;){n=f.byEnd[h];p=(e=n._natives)&&e.type;if(!e||k[p]||a[p]){if(n.start<=d&&n._running===false&&a.data.disabled.indexOf(p)===-1){n._running=true;e.start.call(a,b,n);a.trigger("trackstart",c.extend({},i,{plugin:p,type:"trackstart"}));a.options.frameAnimation&&
33
- n&&n._running&&n._natives.frame&&g.push(n)}h--}else{c.removeTrackEvent(a,n._id);return}}if(a.options.frameAnimation)for(;j<g.length;){k=g[j];if(k._running){k._natives.frame.call(a,b,k,d);j++}else g.splice(j,1)}}f.endIndex=h;f.startIndex=m;f.previousUpdateTime=d;f.byStart.length<l&&f.startIndex--;f.byEnd.length<o&&f.endIndex--};c.extend(c.p,{getTrackEvents:function(){return c.getTrackEvents.call(null,this)},getTrackEvent:function(a){return c.getTrackEvent.call(null,this,a)},getLastTrackEventId:function(){return c.getLastTrackEventId.call(null,
34
- this)},removeTrackEvent:function(a){c.removeTrackEvent.call(null,this,a);return this},removePlugin:function(a){c.removePlugin.call(null,this,a);return this},timeUpdate:function(a){c.timeUpdate.call(null,this,a);return this},destroy:function(){c.destroy.call(null,this);return this}});c.manifest={};c.registry=[];c.registryByName={};c.plugin=function(a,b,d){if(c.protect.natives.indexOf(a.toLowerCase())>=0)c.error("'"+a+"' is a protected function name");else{var e=["start","end"],f={},g=typeof b==="function",
35
- h=["_setup","_teardown","start","end","frame"],m=function(o,k){o=o||c.nop;k=k||c.nop;return function(){o.apply(this,arguments);k.apply(this,arguments)}};c.manifest[a]=d=d||b.manifest||{};h.forEach(function(o){b[o]=L(b[o]||c.nop,a)});var j=function(o,k){if(!k)return this;var n=k._natives={},i="",p,u;c.extend(n,o);k._natives.type=a;k._running=false;n.start=n.start||n["in"];n.end=n.end||n.out;n._teardown=m(function(){var q=F.call(arguments);q.unshift(null);q[1]._running&&n.end.apply(this,q)},n._teardown);
36
- p=this.options.defaults&&this.options.defaults[k._natives&&k._natives.type];k.compose=k.compose&&k.compose.split(" ")||[];k.effect=k.effect&&k.effect.split(" ")||[];k.compose=k.compose.concat(k.effect);k.compose.forEach(function(q){i=c.compositions[q]||{};h.forEach(function(t){n[t]=m(n[t],i[t])})});k._natives.manifest=d;if(!("start"in k))k.start=k["in"]||0;if(!("end"in k))k.end=k.out||this.duration()||Number.MAX_VALUE;u=p?c.extend({},p,k):k;if(!u.target){p="options"in d&&d.options;u.target=p&&"target"in
37
- p&&p.target}k._natives._setup&&k._natives._setup.call(this,u);c.addTrackEvent(this,c.extend(u,k));c.forEach(o,function(q,t){t!=="type"&&e.indexOf(t)===-1&&this.listen(t,q)},this);return this};f[a]=function(o){return j.call(this,g?b.call(this,o):b,o)};c.extend(c.p,f);var l={fn:f[a],definition:b,base:b,parents:[],name:a};c.registry.push(c.extend(f,l,{type:a}));c.registryByName[a]=l;return f}};c.plugin.errors=[];c.plugin.debug=false;c.removePlugin=function(a,b){if(!b){b=a;a=c.p;if(c.protect.natives.indexOf(b.toLowerCase())>=
38
- 0){c.error("'"+b+"' is a protected function name");return}var d=c.registry.length,e;for(e=0;e<d;e++)if(c.registry[e].name===b){c.registry.splice(e,1);delete c.registryByName[b];delete c.manifest[b];delete a[b];return}}d=a.data.trackEvents.byStart;e=a.data.trackEvents.byEnd;var f=a.data.trackEvents.animating,g,h;g=0;for(h=d.length;g<h;g++)if(d[g]&&d[g]._natives&&d[g]._natives.type===b&&e[g]&&e[g]._natives&&e[g]._natives.type===b){d[g]._natives._teardown&&d[g]._natives._teardown.call(a,d[g]);d.splice(g,
39
- 1);e.splice(g,1);g--;h--;if(a.data.trackEvents.startIndex<=g){a.data.trackEvents.startIndex--;a.data.trackEvents.endIndex--}}g=0;for(h=f.length;g<h;g++)if(f[g]&&f[g]._natives&&f[g]._natives.type===b){f.splice(g,1);g--;h--}};c.compositions={};c.compose=function(a,b,d){c.manifest[a]=d||b.manifest||{};c.compositions[a]=b};c.plugin.effect=c.effect=c.compose;c.parsers={};c.parser=function(a,b,d){if(c.protect.natives.indexOf(a.toLowerCase())>=0)c.error("'"+a+"' is a protected function name");else{if(typeof b===
40
- "function"&&!d){d=b;b=""}if(!(typeof d!=="function"||typeof b!=="string")){var e={};e[a]=function(f,g){if(!f)return this;var h=this;c.xhr({url:f,dataType:b,success:function(m){var j,l,o=0;m=d(m).data||[];if(j=m.length){for(;o<j;o++){l=m[o];for(var k in l)z.call(l,k)&&h[k]&&h[k](l[k])}g&&g()}}});return this};c.extend(c.p,e);return e}}};c.player=function(a,b){b=b||{};var d=function(e,f,g){g=g||{};var h=new Date/1E3,m=h,j=0,l=1,o=false,k={},n=s.getElementById(A.exec(e)&&A.exec(e)[2])||s.getElementById(e)||
41
- e,i={},p;for(p in n)if(typeof n[p]==="object")i[p]=n[p];else if(typeof n[p]==="function")i[p]=function(q){return"length"in n[q]&&!n[q].call?n[q]:function(){return n[q].apply(n,arguments)}}(p);else c.player.defineProperty(i,p,{get:function(q){return function(){return n[q]}}(p),set:c.nop,configurable:true});var u=function(){h=new Date/1E3;if(!i.paused){i.currentTime+=h-m;i.dispatchEvent("timeupdate");setTimeout(u,10)}m=h};i.play=function(){this.paused=false;if(i.readyState>=4){m=new Date/1E3;i.dispatchEvent("play");
42
- u()}};i.pause=function(){this.paused=true;i.dispatchEvent("pause")};c.player.defineProperty(i,"currentTime",{get:function(){return j},set:function(q){j=+q;i.dispatchEvent("timeupdate");return j},configurable:true});c.player.defineProperty(i,"volume",{get:function(){return l},set:function(q){l=+q;i.dispatchEvent("volumechange");return l},configurable:true});c.player.defineProperty(i,"muted",{get:function(){return o},set:function(q){o=+q;i.dispatchEvent("volumechange");return o},configurable:true});
43
- i.addEventListener=function(q,t){k[q]||(k[q]=[]);k[q].push(t);return t};i.dispatchEvent=function(q){var t,K=this,x=q.type;if(!x){x=q;if(q=c.events.getInterface(x)){t=s.createEvent(q);t.initEvent(x,true,true,window,1)}}c.forEach(k[x],function(N){N.call(K,t,K)})};i.src=f||"";i.readyState=0;i.duration=0;i.paused=true;i.ended=0;if(b._setup)b._setup.call(i,g);else{i.readyState=4;i.dispatchEvent("load");i.dispatchEvent("loadeddata")}i.addEventListener("load",function(){i.currentTime=j;i.volume=l;i.muted=
44
- o});i.addEventListener("loadeddata",function(){!i.paused&&i.play()});return new c.p.init(i,g)};c[a]=c[a]||d};c.player.defineProperty=Object.defineProperty||function(a,b,d){a.__defineGetter__(b,d.get||c.nop);a.__defineSetter__(b,d.set||c.nop)};var O=/\?/,P={url:"",data:"",dataType:"",success:c.nop,type:"GET",async:true,xhr:function(){return new r.XMLHttpRequest}};c.xhr=function(a){a.dataType=a.dataType&&a.dataType.toLowerCase()||null;if(a.dataType&&(a.dataType==="jsonp"||a.dataType==="script"))c.xhr.getJSONP(a.url,
45
- a.success,a.dataType==="script");else{a=c.extend({},P,a);a.ajax=a.xhr();if(a.ajax){if(a.type==="GET"&&a.data){a.url+=(O.test(a.url)?"&":"?")+a.data;a.data=null}a.ajax.open(a.type,a.url,a.async);a.ajax.send(a.data||null);return c.xhr.httpData(a)}}};c.xhr.httpData=function(a){var b,d=null,e,f=null;a.ajax.onreadystatechange=function(){if(a.ajax.readyState===4){try{d=JSON.parse(a.ajax.responseText)}catch(g){}b={xml:a.ajax.responseXML,text:a.ajax.responseText,json:d};if(!b.xml||!b.xml.documentElement){b.xml=
46
- null;try{e=new DOMParser;f=e.parseFromString(a.ajax.responseText,"text/xml");if(!f.getElementsByTagName("parsererror").length)b.xml=f}catch(h){}}if(a.dataType)b=b[a.dataType];a.success.call(a.ajax,b)}};return b};c.xhr.getJSONP=function(a,b,d){var e=s.head||s.getElementsByTagName("head")[0]||s.documentElement,f=s.createElement("script"),g=a.split("?")[1],h=false,m=[],j,l;if(g&&!d)m=g.split("&");if(m.length)l=m[m.length-1].split("=");j=m.length?l[1]?l[1]:l[0]:"jsonp";if(!g&&!d)a+="?callback="+j;if(j&&
47
- !d){if(window[j])j=c.guid(j);window[j]=function(o){b&&b(o);h=true};a=a.replace(l.join("="),l[0]+"="+j)}f.onload=function(){d&&b&&b();h&&delete window[j];e.removeChild(f)};f.src=a;e.insertBefore(f,e.firstChild)};c.getJSONP=c.xhr.getJSONP;c.getScript=c.xhr.getScript=function(a,b){return c.xhr.getJSONP(a,b,true)};c.util={toSeconds:function(a,b){var d=/^([0-9]+:){0,2}[0-9]+([.;][0-9]+)?$/,e,f,g;if(typeof a==="number")return a;typeof a==="string"&&!d.test(a)&&c.error("Invalid time format");d=a.split(":");
48
- e=d.length-1;f=d[e];if(f.indexOf(";")>-1){f=f.split(";");g=0;if(b&&typeof b==="number")g=parseFloat(f[1],10)/b;d[e]=parseInt(f[0],10)+g}e=d[0];return{1:parseFloat(e,10),2:parseInt(e,10)*60+parseFloat(d[1],10),3:parseInt(e,10)*3600+parseInt(d[1],10)*60+parseFloat(d[2],10)}[d.length||1]}};var B=C(r.navigator.userLanguage||r.navigator.language);c.locale={get:function(){return B},set:function(a){B=C(a);c.locale.broadcast();return B},broadcast:function(a){var b=c.instances,d=b.length,e=0,f;for(a=a||"locale:changed";e<
49
- d;e++){f=b[e];a in f.data.events&&f.trigger(a)}}};c.p.cue=c.p.exec;c.protect={natives:function(){var a,b=[];if(Object.keys)b=Object.keys(c.p);else for(a in c.p)z.call(c.p,a)&&b.push(a);return b.join(",").toLowerCase().split(",")}()};r.Popcorn=c}else{r.Popcorn={isSupported:false};for(v="forEach extend effects error guid sizeOf isArray nop position disable enable destroy addTrackEvent removeTrackEvent getTrackEvents getTrackEvent getLastTrackEventId timeUpdate plugin removePlugin compose effect parser xhr getJSONP getScript".split(/\s+/);v.length;)r.Popcorn[v.shift()]=
9
+ (function(q,r){function F(a,b){return function(){if(c.plugin.debug)return a.apply(this,arguments);try{return a.apply(this,arguments)}catch(d){c.plugin.errors.push({plugin:b,thrown:d,source:a.toString()});this.emit("error",c.plugin.errors)}}}if(r.addEventListener){var u=Array.prototype,y=Object.prototype,z=u.forEach,A=u.slice,x=y.hasOwnProperty,B=y.toString,G=q.Popcorn,H=/^(#([\w\-\_\.]+))$/,w=[],C=false,v={events:{hash:{},apis:{}}},D=function(){return q.requestAnimationFrame||q.webkitRequestAnimationFrame||
10
+ q.mozRequestAnimationFrame||q.oRequestAnimationFrame||q.msRequestAnimationFrame||function(a){q.setTimeout(a,16)}}(),E=function(a){var b=a.media.currentTime,d=a.options.frameAnimation,e=a.data.disabled,f=a.data.trackEvents,g=f.animating,h=f.startIndex,k=c.registryByName,j=0,n,m;for(h=Math.min(h+1,f.byStart.length-2);h>0&&f.byStart[h];){j=f.byStart[h];m=(n=j._natives)&&n.type;if(!n||k[m]||a[m])if(j.start<=b&&j.end>b&&e.indexOf(m)===-1){if(!j._running){j._running=true;n.start.call(a,null,j);d&&j&&j._running&&
11
+ j.natives.frame&&n.frame.call(a,null,j,b)}}else if(j._running===true){j._running=false;n.end.call(a,null,j);if(d&&j._natives.frame){j=g.indexOf(j);j>=0&&g.splice(j,1)}}h--}},c=function(a,b){return new c.p.init(a,b||null)};c.version="1.2";c.isSupported=true;c.instances=[];c.p=c.prototype={init:function(a,b){var d,e=this;if(typeof a==="function")if(r.readyState==="complete")a(r,c);else{w.push(a);if(!C){C=true;var f=function(){r.removeEventListener("DOMContentLoaded",f,false);for(var h=0,k=w.length;h<
12
+ k;h++)w[h].call(r,c);w=null};r.addEventListener("DOMContentLoaded",f,false)}}else{this.media=(d=H.exec(a))&&d.length&&d[2]?r.getElementById(d[2]):a;this[this.media.nodeName&&this.media.nodeName.toLowerCase()||"video"]=this.media;c.instances.push(this);this.options=b||{};this.isDestroyed=false;this.data={timeUpdate:c.nop,disabled:[],events:{},hooks:{},history:[],state:{volume:this.media.volume},trackRefs:{},trackEvents:{byStart:[{start:-1,end:-1}],byEnd:[{start:-1,end:-1}],animating:[],startIndex:0,
13
+ endIndex:0,previousUpdateTime:-1}};var g=function(){e.media.removeEventListener("loadeddata",g,false);var h;h=e.media.duration;h=h!=h?Number.MAX_VALUE:h+1;c.addTrackEvent(e,{start:h,end:h});if(e.options.frameAnimation){e.data.timeUpdate=function(){c.timeUpdate(e,{});e.emit("timeupdate");!e.isDestroyed&&D(e.data.timeUpdate)};!e.isDestroyed&&D(e.data.timeUpdate)}else{e.data.timeUpdate=function(k){c.timeUpdate(e,k)};e.isDestroyed||e.media.addEventListener("timeupdate",e.data.timeUpdate,false)}};e.media.readyState>=
14
+ 2?g():e.media.addEventListener("loadeddata",g,false);return this}}};c.p.init.prototype=c.p;c.forEach=function(a,b,d){if(!a||!b)return{};d=d||this;var e,f;if(z&&a.forEach===z)return a.forEach(b,d);if(B.call(a)==="[object NodeList]"){e=0;for(f=a.length;e<f;e++)b.call(d,a[e],e,a);return a}for(e in a)x.call(a,e)&&b.call(d,a[e],e,a);return a};c.extend=function(a){var b=A.call(arguments,1);c.forEach(b,function(d){for(var e in d)a[e]=d[e]});return a};c.extend(c,{noConflict:function(a){if(a)q.Popcorn=G;return c},
15
+ error:function(a){throw Error(a);},guid:function(a){c.guid.counter++;return(a?a:"")+(+new Date+c.guid.counter)},sizeOf:function(a){var b=0,d;for(d in a)b++;return b},isArray:Array.isArray||function(a){return B.call(a)==="[object Array]"},nop:function(){},position:function(a){a=a.getBoundingClientRect();var b={},d=r.documentElement,e=r.body,f,g,h;f=d.clientTop||e.clientTop||0;g=d.clientLeft||e.clientLeft||0;h=q.pageYOffset&&d.scrollTop||e.scrollTop;d=q.pageXOffset&&d.scrollLeft||e.scrollLeft;f=Math.ceil(a.top+
16
+ h-f);g=Math.ceil(a.left+d-g);for(var k in a)b[k]=Math.round(a[k]);return c.extend({},b,{top:f,left:g})},disable:function(a,b){var d=a.data.disabled;d.indexOf(b)===-1&&d.push(b);E(a);return a},enable:function(a,b){var d=a.data.disabled,e=d.indexOf(b);e>-1&&d.splice(e,1);E(a);return a},destroy:function(a){var b=a.data.events,d,e,f;for(e in b){d=b[e];for(f in d)delete d[f];b[e]=null}if(!a.isDestroyed){a.data.timeUpdate&&a.media.removeEventListener("timeupdate",a.data.timeUpdate,false);a.isDestroyed=
17
+ true}}});c.guid.counter=1;c.extend(c.p,function(){var a={};c.forEach("load play pause currentTime playbackRate volume duration preload playbackRate autoplay loop controls muted buffered readyState seeking paused played seekable ended".split(/\s+/g),function(b){a[b]=function(d){if(typeof this.media[b]==="function"){if(d!=null&&/play|pause/.test(b))this.media.currentTime=c.util.toSeconds(d);this.media[b]();return this}if(d!=null){this.media[b]=d;return this}return this.media[b]}});return a}());c.forEach("enable disable".split(" "),
18
+ function(a){c.p[a]=function(b){return c[a](this,b)}});c.extend(c.p,{roundTime:function(){return-~this.media.currentTime},exec:function(a,b){c.addTrackEvent(this,{start:a,end:a+1,_running:false,_natives:{start:b||c.nop,end:c.nop,type:"cue"}});return this},mute:function(a){a=a==null||a===true?"muted":"unmuted";if(a==="unmuted"){this.media.muted=false;this.media.volume=this.data.state.volume}if(a==="muted"){this.data.state.volume=this.media.volume;this.media.muted=true}this.emit(a);return this},unmute:function(a){return this.mute(a==
19
+ null?false:!a)},position:function(){return c.position(this.media)},toggle:function(a){return c[this.data.disabled.indexOf(a)>-1?"enable":"disable"](this,a)},defaults:function(a,b){if(c.isArray(a)){c.forEach(a,function(d){for(var e in d)this.defaults(e,d[e])},this);return this}if(!this.options.defaults)this.options.defaults={};this.options.defaults[a]||(this.options.defaults[a]={});c.extend(this.options.defaults[a],b);return this}});c.Events={UIEvents:"blur focus focusin focusout load resize scroll unload",
20
+ MouseEvents:"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave click dblclick",Events:"loadstart progress suspend emptied stalled play pause loadedmetadata loadeddata waiting playing canplay canplaythrough seeking seeked timeupdate ended ratechange durationchange volumechange"};c.Events.Natives=c.Events.UIEvents+" "+c.Events.MouseEvents+" "+c.Events.Events;v.events.apiTypes=["UIEvents","MouseEvents","Events"];(function(a,b){for(var d=v.events.apiTypes,e=a.Natives.split(/\s+/g),
21
+ f=0,g=e.length;f<g;f++)b.hash[e[f]]=true;d.forEach(function(h){b.apis[h]={};for(var k=a[h].split(/\s+/g),j=k.length,n=0;n<j;n++)b.apis[h][k[n]]=true})})(c.Events,v.events);c.events={isNative:function(a){return!!v.events.hash[a]},getInterface:function(a){if(!c.events.isNative(a))return false;var b=v.events,d=b.apiTypes;b=b.apis;for(var e=0,f=d.length,g,h;e<f;e++){h=d[e];if(b[h][a]){g=h;break}}return g},all:c.Events.Natives.split(/\s+/g),fn:{trigger:function(a,b){var d;if(this.data.events[a]&&c.sizeOf(this.data.events[a])){if(d=
22
+ c.events.getInterface(a)){d=r.createEvent(d);d.initEvent(a,true,true,q,1);this.media.dispatchEvent(d);return this}c.forEach(this.data.events[a],function(e){e.call(this,b)},this)}return this},listen:function(a,b){var d=this,e=true,f=c.events.hooks[a],g;if(!this.data.events[a]){this.data.events[a]={};e=false}if(f){f.add&&f.add.call(this,{},b);if(f.bind)a=f.bind;if(f.handler){g=b;b=function(h){f.handler.call(d,h,g)}}e=true;if(!this.data.events[a]){this.data.events[a]={};e=false}}this.data.events[a][b.name||
23
+ b.toString()+c.guid()]=b;!e&&c.events.all.indexOf(a)>-1&&this.media.addEventListener(a,function(h){c.forEach(d.data.events[a],function(k){typeof k==="function"&&k.call(d,h)})},false);return this},unlisten:function(a,b){if(this.data.events[a]&&this.data.events[a][b]){delete this.data.events[a][b];return this}this.data.events[a]=null;return this}},hooks:{canplayall:{bind:"canplaythrough",add:function(a,b){var d=false;if(this.media.readyState){b.call(this,a);d=true}this.data.hooks.canplayall={fired:d}},
24
+ handler:function(a,b){if(!this.data.hooks.canplayall.fired){b.call(this,a);this.data.hooks.canplayall.fired=true}}}}};c.forEach([["trigger","emit"],["listen","on"],["unlisten","off"]],function(a){c.p[a[0]]=c.p[a[1]]=c.events.fn[a[0]]});c.addTrackEvent=function(a,b){if(b&&b._natives&&b._natives.type&&a.options.defaults&&a.options.defaults[b._natives.type])b=c.extend({},a.options.defaults[b._natives.type],b);if(b._natives){b._id=!b.id?c.guid(b._natives.type):b.id;a.data.history.push(b._id)}b.start=
25
+ c.util.toSeconds(b.start,a.options.framerate);b.end=c.util.toSeconds(b.end,a.options.framerate);var d=a.data.trackEvents.byStart,e=a.data.trackEvents.byEnd,f;for(f=d.length-1;f>=0;f--)if(b.start>=d[f].start){d.splice(f+1,0,b);break}for(d=e.length-1;d>=0;d--)if(b.end>e[d].end){e.splice(d+1,0,b);break}if(b._natives&&(c.registryByName[b._natives.type]||a[b._natives.type])){e=a.media.currentTime;if(b.end>e&&b.start<=e&&a.data.disabled.indexOf(b._natives.type)===-1){b._running=true;b._natives.start.call(a,
26
+ null,b);if(a.options.frameAnimation&&b._natives.frame){a.data.trackEvents.animating.push(b);b._natives.frame.call(a,null,b,e)}}}f<=a.data.trackEvents.startIndex&&b.start<=a.data.trackEvents.previousUpdateTime&&a.data.trackEvents.startIndex++;d<=a.data.trackEvents.endIndex&&b.end<a.data.trackEvents.previousUpdateTime&&a.data.trackEvents.endIndex++;this.timeUpdate(a,null,true);b._id&&c.addTrackEvent.ref(a,b)};c.addTrackEvent.ref=function(a,b){a.data.trackRefs[b._id]=b;return a};c.removeTrackEvent=function(a,
27
+ b){for(var d,e,f=a.data.history.length,g=a.data.trackEvents.byStart.length,h=0,k=0,j=[],n=[],m=[],i=[];--g>-1;){d=a.data.trackEvents.byStart[h];e=a.data.trackEvents.byEnd[h];if(!d._id){j.push(d);n.push(e)}if(d._id){d._id!==b&&j.push(d);e._id!==b&&n.push(e);if(d._id===b){k=h;d._natives._teardown&&d._natives._teardown.call(a,d)}}h++}g=a.data.trackEvents.animating.length;h=0;if(g)for(;--g>-1;){d=a.data.trackEvents.animating[h];d._id||m.push(d);d._id&&d._id!==b&&m.push(d);h++}k<=a.data.trackEvents.startIndex&&
28
+ a.data.trackEvents.startIndex--;k<=a.data.trackEvents.endIndex&&a.data.trackEvents.endIndex--;a.data.trackEvents.byStart=j;a.data.trackEvents.byEnd=n;a.data.trackEvents.animating=m;for(g=0;g<f;g++)a.data.history[g]!==b&&i.push(a.data.history[g]);a.data.history=i;c.removeTrackEvent.ref(a,b)};c.removeTrackEvent.ref=function(a,b){delete a.data.trackRefs[b];return a};c.getTrackEvents=function(a){var b=[];a=a.data.trackEvents.byStart;for(var d=a.length,e=0,f;e<d;e++){f=a[e];f._id&&b.push(f)}return b};
29
+ c.getTrackEvents.ref=function(a){return a.data.trackRefs};c.getTrackEvent=function(a,b){return a.data.trackRefs[b]};c.getTrackEvent.ref=function(a,b){return a.data.trackRefs[b]};c.getLastTrackEventId=function(a){return a.data.history[a.data.history.length-1]};c.timeUpdate=function(a,b){var d=a.media.currentTime,e=a.data.trackEvents.previousUpdateTime,f=a.data.trackEvents,g=f.animating,h=f.endIndex,k=f.startIndex,j=0,n=f.byStart.length,m=f.byEnd.length,i=c.registryByName,l,p,o;if(e<=d){for(;f.byEnd[h]&&
30
+ f.byEnd[h].end<=d;){l=f.byEnd[h];o=(e=l._natives)&&e.type;if(!e||i[o]||a[o]){if(l._running===true){l._running=false;e.end.call(a,b,l);a.emit("trackend",c.extend({},l,{plugin:o,type:"trackend"}))}h++}else{c.removeTrackEvent(a,l._id);return}}for(;f.byStart[k]&&f.byStart[k].start<=d;){p=f.byStart[k];o=(e=p._natives)&&e.type;if(!e||i[o]||a[o]){if(p.end>d&&p._running===false&&a.data.disabled.indexOf(o)===-1){p._running=true;e.start.call(a,b,p);a.emit("trackstart",c.extend({},p,{plugin:o,type:"trackstart"}));
31
+ a.options.frameAnimation&&p&&p._running&&p._natives.frame&&g.push(p)}k++}else{c.removeTrackEvent(a,p._id);return}}if(a.options.frameAnimation)for(;j<g.length;){i=g[j];if(i._running){i._natives.frame.call(a,b,i,d);j++}else g.splice(j,1)}}else if(e>d){for(;f.byStart[k]&&f.byStart[k].start>d;){p=f.byStart[k];o=(e=p._natives)&&e.type;if(!e||i[o]||a[o]){if(p._running===true){p._running=false;e.end.call(a,b,p);a.emit("trackend",c.extend({},l,{plugin:o,type:"trackend"}))}k--}else{c.removeTrackEvent(a,p._id);
32
+ return}}for(;f.byEnd[h]&&f.byEnd[h].end>d;){l=f.byEnd[h];o=(e=l._natives)&&e.type;if(!e||i[o]||a[o]){if(l.start<=d&&l._running===false&&a.data.disabled.indexOf(o)===-1){l._running=true;e.start.call(a,b,l);a.emit("trackstart",c.extend({},p,{plugin:o,type:"trackstart"}));a.options.frameAnimation&&l&&l._running&&l._natives.frame&&g.push(l)}h--}else{c.removeTrackEvent(a,l._id);return}}if(a.options.frameAnimation)for(;j<g.length;){i=g[j];if(i._running){i._natives.frame.call(a,b,i,d);j++}else g.splice(j,
33
+ 1)}}f.endIndex=h;f.startIndex=k;f.previousUpdateTime=d;f.byStart.length<n&&f.startIndex--;f.byEnd.length<m&&f.endIndex--};c.extend(c.p,{getTrackEvents:function(){return c.getTrackEvents.call(null,this)},getTrackEvent:function(a){return c.getTrackEvent.call(null,this,a)},getLastTrackEventId:function(){return c.getLastTrackEventId.call(null,this)},removeTrackEvent:function(a){c.removeTrackEvent.call(null,this,a);return this},removePlugin:function(a){c.removePlugin.call(null,this,a);return this},timeUpdate:function(a){c.timeUpdate.call(null,
34
+ this,a);return this},destroy:function(){c.destroy.call(null,this);return this}});c.manifest={};c.registry=[];c.registryByName={};c.plugin=function(a,b,d){if(c.protect.natives.indexOf(a.toLowerCase())>=0)c.error("'"+a+"' is a protected function name");else{var e=["start","end"],f={},g=typeof b==="function",h=["_setup","_teardown","start","end","frame"],k=function(m,i){m=m||c.nop;i=i||c.nop;return function(){m.apply(this,arguments);i.apply(this,arguments)}};c.manifest[a]=d=d||b.manifest||{};h.forEach(function(m){b[m]=
35
+ F(b[m]||c.nop,a)});var j=function(m,i){if(!i)return this;var l=i._natives={},p="",o;c.extend(l,m);i._natives.type=a;i._running=false;l.start=l.start||l["in"];l.end=l.end||l.out;l._teardown=k(function(){var s=A.call(arguments);s.unshift(null);s[1]._running&&l.end.apply(this,s)},l._teardown);i.compose=i.compose&&i.compose.split(" ")||[];i.effect=i.effect&&i.effect.split(" ")||[];i.compose=i.compose.concat(i.effect);i.compose.forEach(function(s){p=c.compositions[s]||{};h.forEach(function(t){l[t]=k(l[t],
36
+ p[t])})});i._natives.manifest=d;if(!("start"in i))i.start=i["in"]||0;if(!i.end&&i.end!==0)i.end=i.out||Number.MAX_VALUE;if(!x.call(i,"toString"))i.toString=function(){var s=["start: "+i.start,"end: "+i.end,"id: "+(i.id||i._id)];i.target!=null&&s.push("target: "+i.target);return a+" ( "+s.join(", ")+" )"};if(!i.target){o="options"in d&&d.options;i.target=o&&"target"in o&&o.target}i._natives._setup&&i._natives._setup.call(this,i);c.addTrackEvent(this,c.extend(i,i));c.forEach(m,function(s,t){t!=="type"&&
37
+ e.indexOf(t)===-1&&this.on(t,s)},this);return this};c.p[a]=f[a]=function(m){m=c.extend({},this.options.defaults&&this.options.defaults[a]||{},m);return j.call(this,g?b.call(this,m):b,m)};var n={fn:f[a],definition:b,base:b,parents:[],name:a};c.registry.push(c.extend(f,n,{type:a}));c.registryByName[a]=n;return f}};c.plugin.errors=[];c.plugin.debug=false;c.removePlugin=function(a,b){if(!b){b=a;a=c.p;if(c.protect.natives.indexOf(b.toLowerCase())>=0){c.error("'"+b+"' is a protected function name");return}var d=
38
+ c.registry.length,e;for(e=0;e<d;e++)if(c.registry[e].name===b){c.registry.splice(e,1);delete c.registryByName[b];delete c.manifest[b];delete a[b];return}}d=a.data.trackEvents.byStart;e=a.data.trackEvents.byEnd;var f=a.data.trackEvents.animating,g,h;g=0;for(h=d.length;g<h;g++){if(d[g]&&d[g]._natives&&d[g]._natives.type===b){d[g]._natives._teardown&&d[g]._natives._teardown.call(a,d[g]);d.splice(g,1);g--;h--;if(a.data.trackEvents.startIndex<=g){a.data.trackEvents.startIndex--;a.data.trackEvents.endIndex--}}e[g]&&
39
+ e[g]._natives&&e[g]._natives.type===b&&e.splice(g,1)}g=0;for(h=f.length;g<h;g++)if(f[g]&&f[g]._natives&&f[g]._natives.type===b){f.splice(g,1);g--;h--}};c.compositions={};c.compose=function(a,b,d){c.manifest[a]=d||b.manifest||{};c.compositions[a]=b};c.plugin.effect=c.effect=c.compose;var I=/\?/,J={url:"",data:"",dataType:"",success:c.nop,type:"GET",async:true,xhr:function(){return new q.XMLHttpRequest}};c.xhr=function(a){a.dataType=a.dataType&&a.dataType.toLowerCase()||null;if(a.dataType&&(a.dataType===
40
+ "jsonp"||a.dataType==="script"))c.xhr.getJSONP(a.url,a.success,a.dataType==="script");else{a=c.extend({},J,a);a.ajax=a.xhr();if(a.ajax){if(a.type==="GET"&&a.data){a.url+=(I.test(a.url)?"&":"?")+a.data;a.data=null}a.ajax.open(a.type,a.url,a.async);a.ajax.send(a.data||null);return c.xhr.httpData(a)}}};c.xhr.httpData=function(a){var b,d=null,e,f=null;a.ajax.onreadystatechange=function(){if(a.ajax.readyState===4){try{d=JSON.parse(a.ajax.responseText)}catch(g){}b={xml:a.ajax.responseXML,text:a.ajax.responseText,
41
+ json:d};if(!b.xml||!b.xml.documentElement){b.xml=null;try{e=new DOMParser;f=e.parseFromString(a.ajax.responseText,"text/xml");if(!f.getElementsByTagName("parsererror").length)b.xml=f}catch(h){}}if(a.dataType)b=b[a.dataType];a.success.call(a.ajax,b)}};return b};c.xhr.getJSONP=function(a,b,d){var e=r.head||r.getElementsByTagName("head")[0]||r.documentElement,f=r.createElement("script"),g=a.split("?")[1],h=false,k=[],j,n;if(g&&!d)k=g.split("&");if(k.length)n=k[k.length-1].split("=");j=k.length?n[1]?
42
+ n[1]:n[0]:"jsonp";if(!g&&!d)a+="?callback="+j;if(j&&!d){if(window[j])j=c.guid(j);window[j]=function(m){b&&b(m);h=true};a=a.replace(n.join("="),n[0]+"="+j)}f.addEventListener("load",function(){d&&b&&b();h&&delete window[j];e.removeChild(f)},false);f.src=a;e.insertBefore(f,e.firstChild)};c.getJSONP=c.xhr.getJSONP;c.getScript=c.xhr.getScript=function(a,b){return c.xhr.getJSONP(a,b,true)};c.util={toSeconds:function(a,b){var d=/^([0-9]+:){0,2}[0-9]+([.;][0-9]+)?$/,e,f,g;if(typeof a==="number")return a;
43
+ typeof a==="string"&&!d.test(a)&&c.error("Invalid time format");d=a.split(":");e=d.length-1;f=d[e];if(f.indexOf(";")>-1){f=f.split(";");g=0;if(b&&typeof b==="number")g=parseFloat(f[1],10)/b;d[e]=parseInt(f[0],10)+g}e=d[0];return{1:parseFloat(e,10),2:parseInt(e,10)*60+parseFloat(d[1],10),3:parseInt(e,10)*3600+parseInt(d[1],10)*60+parseFloat(d[2],10)}[d.length||1]}};c.p.cue=c.p.exec;c.protect={natives:function(a){return Object.keys?Object.keys(a):function(b){var d,e=[];for(d in b)x.call(b,d)&&e.push(d);
44
+ return e}(a)}(c.p).map(function(a){return a.toLowerCase()})};c.forEach({listen:"on",unlisten:"off",trigger:"emit",exec:"cue"},function(a,b){var d=c.p[b];c.p[b]=function(){if(typeof console!=="undefined"&&console.warn){console.warn("Deprecated method '"+b+"', "+(a==null?"do not use.":"use '"+a+"' instead."));c.p[b]=d}return c.p[a].apply(this,[].slice.call(arguments))}});q.Popcorn=c}else{q.Popcorn={isSupported:false};for(u="removeInstance addInstance getInstanceById removeInstanceById forEach extend effects error guid sizeOf isArray nop position disable enable destroyaddTrackEvent removeTrackEvent getTrackEvents getTrackEvent getLastTrackEventId timeUpdate plugin removePlugin compose effect xhr getJSONP getScript".split(/\s+/);u.length;)q.Popcorn[u.shift()]=
50
45
  function(){}}})(window,window.document);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: popcornjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-24 00:00:00.000000000 Z
12
+ date: 2012-06-30 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Simple wrapper for HTML5 Video library popcorn.js
15
15
  email:
@@ -27,6 +27,8 @@ files:
27
27
  - popcornjs-rails.gemspec
28
28
  - vendor/assets/javascripts/popcorn-complete.js
29
29
  - vendor/assets/javascripts/popcorn-complete.min.js
30
+ - vendor/assets/javascripts/popcorn-ie8.js
31
+ - vendor/assets/javascripts/popcorn-ie8.min.js
30
32
  - vendor/assets/javascripts/popcorn.js
31
33
  - vendor/assets/javascripts/popcorn.min.js
32
34
  homepage: https://github.com/jaimie-van-santen/popcornjs-rails
@@ -49,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
51
  version: '0'
50
52
  requirements: []
51
53
  rubyforge_project: popcornjs-rails
52
- rubygems_version: 1.8.15
54
+ rubygems_version: 1.8.24
53
55
  signing_key:
54
56
  specification_version: 3
55
57
  summary: popcorn.js asset pipeline provider/wrapper