var MEmbed;
MEmbed=function(){function b(b,l){var d,f,i,r,k,g,s,c,a,t,m,u,e,n,o,p,h,q,j,v;null==l&&(l=0);o=!1;v=this.cua;for(p in v)for(q in s=v[p],s){k=s[q];m=!1;for(n in b)if(b.hasOwnProperty(n)&&"function"!==typeof t){t=b[n];break}d=n;a=t;a=a[p]?a[p]:a[0];e=null;i=!1;if(null!=a.zones)j=a.zones;if(null==a.zones)j=this.zdf;if(this.isa(j)){for(c=0,f=j.length;c<f;c++)h=j[c],this.cuc===h&&(e="heav."+h),this.dfz===h&&(i=!0);e||(e=i?"heav."+this.dfz:"heav."+j[0])}else e="heaven.cl",d="b/"+d;c=e+"."+this.dm;i=e.replace("heav.",
"heaven.")+"."+this.dm;e=!0===/^b\//i.test(d)?d:"b/"+d;i="rtmp://"+i+"/"+e;h=a.stream;e="http://"+c+":80/"+d+"/"+h+"/playlist.m3u8";d="rtsp://"+c+":1935/"+d+"/"+h+"/playlist.m3u8";c=a.size.split("x");"?"===c[1]&&null!=a.aspect&&(f=a.aspect.split(":"),c[1]=parseInt(parseInt(c[0])*parseInt(f[1])/parseInt(f[0])));f=1;u='autoplay="autoplay"';a.autoplay||(f=0,u="");a=1===a.language?1:0;a={hls:'<video src="'+e+'" controls="controls" width="'+c[0]+'" height="'+c[1]+'"'+u+"></video>",rtmp:'<embed width="'+
c[0]+'" height="'+c[1]+'" flashvars="config=http://embed.mediastre.am/config.xml?rtmp_url='+i+"%26stream="+h+"%26autoplay="+f+"%26language="+a+'" wmode="transparent" allowfullscreen="true" allowscriptaccess="always" src="http://embed.mediastre.am/player2.0.swf" name="player" id="videoplayer" type="application/x-shockwave-flash" bgcolor="#000000"></embed>',rtsp:'<a href="'+d+'" controls="controls" style="display:block;width:'+c[0]+"px;height:"+c[1]+'px;padding-top:100px;font-size:60px;text-align:center;"><img style="border:none" src="http://mediastre.am/assets/bb-play-icon.png" alt="Ver Video" /></a>'};
if(!0===k)this.def=a[q];if(this.isa(k))for(d=0,e=k.length;d<e;d++)g=k[d],g=this.ua.indexOf(g),0>g&&(r=!1),-1<g&&(r=!0),m=m||r,g=a[q],d++;if(m&&!o)l||document.write(g),o=!0,this.fem=g}if(!o)l||document.write(this.def),this.fem=this.def}b.prototype.ua=navigator.userAgent;b.prototype.dm="mediastre.am";b.prototype.dfz="us";b.prototype.cua=[{rtmp:!0},{hls:["iPhone","iPod","iPad"],rtsp:["Android","blackberry"]}];b.prototype.zdf=["cl","us"];b.prototype.def=!1;b.prototype.cuc="us";b.prototype.fem=
"";b.prototype.isa=function(b){return"[object Array]"===Object.prototype.toString.call(b)};b.prototype.embed=function(){return this.fem};return b}();
