1 |
- !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";function n(e){return(n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}if(r.r(t),"undefined"==typeof o)var o={};o.MD5=function(e){function t(e){var t=(e>>>0).toString(16);return"00000000".substr(0,8-t.length)+t}function r(e,t,r){return e&t|~e&r}function o(e,t,r){return r&e|~r&t}function a(e,t,r){return e^t^r}function i(e,t,r){return t^(e|~r)}function u(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function c(e){for(var t=[],r=0;r<e.length;r++)if(e.charCodeAt(r)<=127)t.push(e.charCodeAt(r));else for(var n=encodeURIComponent(e.charAt(r)).substr(1).split("%"),o=0;o<n.length;o++)t.push(parseInt(n[o],16));return t}function s(e){for(var t=new Array(e.length),r=0;r<e.length;r++)t[r]=e[r];return t}var f=null,p=null;function l(e,t){return 4294967295&e+t}return"string"==typeof e?f=c(e):e.constructor==Array?0===e.length?f=e:"string"==typeof e[0]?f=function(e){for(var t=[],r=0;r<e.length;r++)t=t.concat(c(e[r]));return t}(e):"number"==typeof e[0]?f=e:p=n(e[0]):"undefined"!=typeof ArrayBuffer?e instanceof ArrayBuffer?f=s(new Uint8Array(e)):e instanceof Uint8Array||e instanceof Int8Array?f=s(e):e instanceof Uint32Array||e instanceof Int32Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Float32Array||e instanceof Float64Array?f=s(new Uint8Array(e.buffer)):p=n(e):p=n(e),p&&alert("MD5 type mismatch, cannot process "+p),function(){function e(e,t,r,n){var o,a,i=b;b=v,v=m,m=l(m,(o=l(g,l(e,l(t,r))))<<(a=n)&4294967295|o>>>32-a),g=i}var n=f.length;f.push(128);var c=f.length%64;if(c>56){for(var s=0;s<64-c;s++)f.push(0);c=f.length%64}for(s=0;s<56-c;s++)f.push(0);f=f.concat(function(e){for(var t=[],r=0;r<8;r++)t.push(255&e),e>>>=8;return t}(8*n));var p=1732584193,d=4023233417,y=2562383102,h=271733878,g=0,m=0,v=0,b=0;for(s=0;s<f.length/64;s++){g=p;var T=64*s;e(r(m=d,v=y,b=h),3614090360,u(f,T),7),e(r(m,v,b),3905402710,u(f,T+4),12),e(r(m,v,b),606105819,u(f,T+8),17),e(r(m,v,b),3250441966,u(f,T+12),22),e(r(m,v,b),4118548399,u(f,T+16),7),e(r(m,v,b),1200080426,u(f,T+20),12),e(r(m,v,b),2821735955,u(f,T+24),17),e(r(m,v,b),4249261313,u(f,T+28),22),e(r(m,v,b),1770035416,u(f,T+32),7),e(r(m,v,b),2336552879,u(f,T+36),12),e(r(m,v,b),4294925233,u(f,T+40),17),e(r(m,v,b),2304563134,u(f,T+44),22),e(r(m,v,b),1804603682,u(f,T+48),7),e(r(m,v,b),4254626195,u(f,T+52),12),e(r(m,v,b),2792965006,u(f,T+56),17),e(r(m,v,b),1236535329,u(f,T+60),22),e(o(m,v,b),4129170786,u(f,T+4),5),e(o(m,v,b),3225465664,u(f,T+24),9),e(o(m,v,b),643717713,u(f,T+44),14),e(o(m,v,b),3921069994,u(f,T),20),e(o(m,v,b),3593408605,u(f,T+20),5),e(o(m,v,b),38016083,u(f,T+40),9),e(o(m,v,b),3634488961,u(f,T+60),14),e(o(m,v,b),3889429448,u(f,T+16),20),e(o(m,v,b),568446438,u(f,T+36),5),e(o(m,v,b),3275163606,u(f,T+56),9),e(o(m,v,b),4107603335,u(f,T+12),14),e(o(m,v,b),1163531501,u(f,T+32),20),e(o(m,v,b),2850285829,u(f,T+52),5),e(o(m,v,b),4243563512,u(f,T+8),9),e(o(m,v,b),1735328473,u(f,T+28),14),e(o(m,v,b),2368359562,u(f,T+48),20),e(a(m,v,b),4294588738,u(f,T+20),4),e(a(m,v,b),2272392833,u(f,T+32),11),e(a(m,v,b),1839030562,u(f,T+44),16),e(a(m,v,b),4259657740,u(f,T+56),23),e(a(m,v,b),2763975236,u(f,T+4),4),e(a(m,v,b),1272893353,u(f,T+16),11),e(a(m,v,b),4139469664,u(f,T+28),16),e(a(m,v,b),3200236656,u(f,T+40),23),e(a(m,v,b),681279174,u(f,T+52),4),e(a(m,v,b),3936430074,u(f,T),11),e(a(m,v,b),3572445317,u(f,T+12),16),e(a(m,v,b),76029189,u(f,T+24),23),e(a(m,v,b),3654602809,u(f,T+36),4),e(a(m,v,b),3873151461,u(f,T+48),11),e(a(m,v,b),530742520,u(f,T+60),16),e(a(m,v,b),3299628645,u(f,T+8),23),e(i(m,v,b),4096336452,u(f,T),6),e(i(m,v,b),1126891415,u(f,T+28),10),e(i(m,v,b),2878612391,u(f,T+56),15),e(i(m,v,b),4237533241,u(f,T+20),21),e(i(m,v,b),1700485571,u(f,T+48),6),e(i(m,v,b),2399980690,u(f,T+12),10),e(i(m,v,b),4293915773,u(f,T+40),15),e(i(m,v,b),2240044497,u(f,T+4),21),e(i(m,v,b),1873313359,u(f,T+32),6),e(i(m,v,b),4264355552,u(f,T+60),10),e(i(m,v,b),2734768916,u(f,T+24),15),e(i(m,v,b),1309151649,u(f,T+52),21),e(i(m,v,b),4149444226,u(f,T+16),6),e(i(m,v,b),3174756917,u(f,T+44),10),e(i(m,v,b),718787259,u(f,T+8),15),e(i(m,v,b),3951481745,u(f,T+36),21),p=l(p,g),d=l(d,m),y=l(y,v),h=l(h,b)}return function(e,r,n,o){for(var a="",i=0,u=0,c=3;c>=0;c--)i=255&(u=arguments[c]),i<<=8,i|=255&(u>>>=8),i<<=8,i|=255&(u>>>=8),i<<=8,a+=t(i|=u>>>=8);return a}(h,y,d,p).toUpperCase()}()};var a={log:function(){},error:function(){},count:function(){},info:function(){}};(function(){function e(){}e.createFromElementId=function(t){for(var r=document.getElementById(t),n="",o=r.firstChild;o;)3===o.nodeType&&(n+=o.textContent),o=o.nextSibling;var a=new e;return a.type=r.type,a.source=n,a},e.createFromSource=function(t,r){var n=new e;return n.type=t,n.source=r,n}})(),function(){function e(e){this.gl=e,this.program=this.gl.createProgram()}e.prototype={attach:function(e){this.gl.attachShader(this.program,e.shader)},link:function(){this.gl.linkProgram(this.program)},use:function(){this.gl.useProgram(this.program)},getAttributeLocation:function(e){return this.gl.getAttribLocation(this.program,e)},setMatrixUniform:function(e,t){var r=this.gl.getUniformLocation(this.program,e);this.gl.uniformMatrix4fv(r,!1,t)}}}(),function(){var e=null;function t(e,t,r){this.gl=e,this.size=t,this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),this.format=r||e.LUMINANCE,e.texImage2D(e.TEXTURE_2D,0,this.format,t.w,t.h,0,this.format,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}t.prototype={fill:function(e,t){var r=this.gl;r.bindTexture(r.TEXTURE_2D,this.texture),t?r.texSubImage2D(r.TEXTURE_2D,0,0,0,this.size.w,this.size.h,this.format,r.UNSIGNED_BYTE,e):r.texImage2D(r.TEXTURE_2D,0,this.format,this.size.w,this.size.h,0,this.format,r.UNSIGNED_BYTE,e)},bind:function(t,r,n){var o=this.gl;e||(e=[o.TEXTURE0,o.TEXTURE1,o.TEXTURE2]),o.activeTexture(e[t]),o.bindTexture(o.TEXTURE_2D,this.texture),o.uniform1i(o.getUniformLocation(r.program,n),t)}}}();function i(){var e=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384],t=function(e,t,r){var n=0,o=0;for(n=0;n<r&&!(e<t[o]);n++)o++;return n},r=function(r,n){var o,a,i,u,c;return i=(a=t(o=r>0?r:8191&-r,e,15)-6)+(n>>6&15)-13,u=(0===o?32:a>=0?o>>a:o<<-a)*(n&parseInt("077",8))+48>>4,c=i>=0?u<<i&32767:u>>-i,(r^n)<0?-c:c};this.g726InitState=function(){var e={},t=0;for(e.pp=new Array(2),e.zp=new Array(6),e.pk=new Array(2),e.dq=new Array(6),e.sr=new Array(2),e.yl=34816,e.yu=544,e.dms=0,e.dml=0,e.ppp=0,t=0;t<2;t++)e.pp[t]=0,e.pk[t]=0,e.sr[t]=32;for(t=0;t<6;t++)e.zp[t]=0,e.dq[t]=32;return e.td=0,e},this.predictorZero=function(e){var t=0,n=0;for(n=r(e.zp[0]>>2,e.dq[0]),t=1;t<6;t++)n+=r(e.zp[t]>>2,e.dq[t]);return n},this.predictorPole=function(e){return r(e.pp[1]>>2,e.sr[1])+r(e.pp[0]>>2,e.sr[0])},this.stepSize=function(e){var t=0,r=0,n=0;return e.ppp>=256?e.yu:(t=e.yl>>6,r=e.yu-t,n=e.ppp>>2,r>0?t+=r*n>>6:r<0&&(t+=r*n+63>>6),t)},this.quantize=function(r,n,o,a){var i,u,c;return i=Math.abs(r),u=t(i>>1,e,15),c=t((u<<7)+(i<<7>>u&127)-(n>>2),o,a),r<0?1+(a<<1)-c:0===c?1+(a<<1):c},this.reconstruct=function(e,t,r){var n,o=0;return(n=t+(r>>2))<0?e?-32768:0:(o=128+(127&n)<<7>>14-(n>>7&15),e?o-32768:o)},this.update=function(r,n,o,a,i,u,c,s){var f,p,l,d,y,h=0,g=0,m=0,v=0,b=0,T=0,w=0,A=0;if(y=c<0?1:0,g=32767&i,f=s.yl>>15,d=s.yl>>10&31,l=(p=f>9?31744:32+d<<f)+(p>>1)>>1,A=0===s.td?0:g<=l?0:1,s.yu=n+(o-n>>5),s.yu<544?s.yu=544:s.yu>5120&&(s.yu=5120),s.yl+=s.yu+(-s.yl>>6),1===A)s.pp[0]=0,s.pp[1]=0,s.zp[0]=0,s.zp[1]=0,s.zp[2]=0,s.zp[3]=0,s.zp[4]=0,s.zp[5]=0,v=0;else for(T=y^s.pk[0],v=s.pp[1]-(s.pp[1]>>7),0!==c&&((w=T?s.pp[0]:-s.pp[0])<-8191?v-=256:v+=w>8191?255:w>>5,y^s.pk[1]?v<=-12160?v=-12288:v>=12416?v=12288:v-=128:v<=-12416?v=-12288:v>=12160?v=12288:v+=128),s.pp[1]=v,s.pp[0]-=s.pp[0]>>8,0!==c&&(0===T?s.pp[0]+=192:s.pp[0]-=192),b=15360-v,s.pp[0]<-b?s.pp[0]=-b:s.pp[0]>b&&(s.pp[0]=b),h=0;h<6;h++)s.zp[h]-=5===r?s.zp[h]>>9:s.zp[h]>>8,32767&i&&((i^s.dq[h])>=0?s.zp[h]+=128:s.zp[h]-=128);for(h=5;h>0;h--)s.dq[h]=s.dq[h-1];return 0===g?s.dq[0]=i>=0?32:64544:(m=t(g,e,15),s.dq[0]=i>=0?(m<<6)+(g<<6>>m):(m<<6)+(g<<6>>m)-1024),s.sr[1]=s.sr[0],0===u?s.sr[0]=32:u>0?(m=t(u,e,15),s.sr[0]=(m<<6)+(u<<6>>m)):u>-32768?(m=t(g=-u,e,15),s.sr[0]=(m<<6)+(g<<6>>m)-1024):s.sr[0]=64544,s.pk[1]=s.pk[0],s.pk[0]=y,s.td=1===A?0:v<-11776?1:0,s.dms+=a-s.dms>>5,s.dml+=(a<<2)-s.dml>>7,1===A?s.ppp=256:n<1536?s.ppp+=512-s.ppp>>4:1===s.td?s.ppp+=512-s.ppp>>4:Math.abs((s.dms<<2)-s.dml)>=s.dml>>3?s.ppp+=512-s.ppp>>4:s.ppp+=-s.ppp>>4,s}}var u=function(e){var t=132,r=128,n=15,o=4,a=112;function i(e){var i=0,u=~e;return i=((u&n)<<3)+t,i<<=(u&a)>>o,u&r?t-i:i-t}function u(e){var t,i=0;switch(i=((e^=85)&n)<<4,t=(e&a)>>o){case 0:i+=8;break;case 1:i+=264;break;default:i+=264,i<<=t-1}return e&r?i:-i}function c(){}return c.prototype={decode:function(t){var r=new Uint8Array(t),n=new Int16Array(r.length),o=0;if("G.711A"==e)for(o=0;o<r.length;o++)n[o]=u(r[o]);else if("G.711Mu"==e)for(o=0;o<r.length;o++)n[o]=i(r[o]);var a=new Float32Array(n.length);for(o=0;o<n.length;o++)a[o]=n[o]/Math.pow(2,15);return a}},new c};function c(){var e=3,t=[116,365,365,116],r=[-704,14048,14048,-704],n=[0,3584,3584,0],o={},a=null;function u(i,u){var c,s,f,p,l,d,y,h=i,g=u;switch(h=h&=3,s=(c=a.predictorZero(o))>>1,f=c+a.predictorPole(o)>>1,p=a.stepSize(o),y=(d=(l=a.reconstruct(2&h,t[h],p))<0?f-(16383&l):f+l)-f+s,o=a.update(2,p,r[h],n[h],l,d,y,o),g){case e:return d<<2;default:return-1}}function c(){a=new i,o=a.g726InitState()}return c.prototype={decode:function(t){for(var r=new Int16Array(4*t.length),n=0,o=0;n<t.length;n++){var a=null;a=u(t[n]>>6,e),r[o]=65280&a,o++,a=u(t[n]>>4,e),r[o]=65280&a,o++,a=u(t[n]>>2,e),r[o]=65280&a,o++,a=u(t[n],e),r[o]=65280&a,o++}return r}},new c}function s(){var e=3,t=[-2048,135,273,373,373,273,135,-2048],r=[-128,960,4384,18624,18624,4384,960,-128],n=[0,512,1024,3584,3584,1024,512,0],o={},a=null;function u(i,u){var c,s,f,p,l,d,y,h=i,g=u;switch(h&=7,s=(c=a.predictorZero(o))>>1,f=c+a.predictorPole(o)>>1,p=a.stepSize(o),y=(d=(l=a.reconstruct(4&h,t[h],p))<0?f-(16383&l):f+l)-f+s,o=a.update(3,p,r[h],n[h],l,d,y,o),g){case e:return d<<2;default:return-1}}function c(){a=new i,o=a.g726InitState()}return c.prototype={decode:function(t){for(var r=new Int16Array(8*t.length/3),n=0,o=0;n<t.length-3;n+=3){var a=null;a=u(t[n]>>5,e),r[o]=65280&a,o++,a=u(t[n]>>2,e),r[o]=65280&a,o++,a=u(t[n]<<1|t[n+1]>>7,e),r[o]=65280&a,o++,a=u(t[n+1]>>4,e),r[o]=65280&a,o++,a=u(t[n+1]>>1,e),r[o]=65280&a,o++,a=u(t[n+1]<<2|t[n+2]>>6,e),r[o]=65280&a,o++,a=u(t[n+2]>>3,e),r[o]=65280&a,o++,a=u(t[n+2]>>0,e),r[o]=65280&a,o++}return r}},new c}function f(){var e=3,t=[-2048,4,135,213,273,323,373,425,425,373,323,273,213,135,4,-2048],r=[-12,18,41,64,112,198,355,1122,1122,355,198,112,64,41,18,-12],n=[0,0,0,512,512,512,1536,3584,3584,1536,512,512,512,0,0,0],o={},a=null;function u(i,u){var c,s,f,p,l,d,y,h=0,g=i,m=u;switch(g&=15,s=(c=a.predictorZero(o))>>1,f=c+a.predictorPole(o)>>1,p=a.stepSize(o),y=(d=(l=a.reconstruct(8&g,t[g],p))<0?f-(16383&l):f+l)-f+s,o=a.update(4,p,r[g]<<5,n[g],l,d,y,o),m){case e:return h=(h=(h=d<<2)>32767?32767:h)<-32768?-32768:h;default:return-1}}function c(){a=new i,o=a.g726InitState()}return c.prototype={decode:function(t){for(var r=new Int16Array(2*t.length),n=0,o=0;n<t.length;n++){var a=null;a=u((240&t[n])>>4,e),r[o]=65280&a,o++,a=u(15&t[n],e),r[o]=65280&a,o++}return r}},new c}function p(){var e=3,t=[-2048,-66,28,104,169,224,274,318,358,395,429,459,488,514,539,566,566,539,514,488,459,429,395,358,318,274,224,169,104,28,-66,-2048],r=[448,448,768,1248,1280,1312,1856,3200,4512,5728,7008,8960,11456,14080,16928,22272,22272,16928,14080,11456,8960,7008,5728,4512,3200,1856,1312,1280,1248,768,448,448],n=[0,0,0,0,0,512,512,512,512,512,1024,1536,2048,2560,3072,3072,3072,3072,2560,2048,1536,1024,512,512,512,512,512,0,0,0,0,0],o={},a=null;function u(i,u){var c,s,f,p,l,d,y,h=i,g=u;switch(h&=31,s=(c=a.predictorZero(o))>>1,f=c+a.predictorPole(o)>>1,p=a.stepSize(o),y=(l=(d=a.reconstruct(16&h,t[h],p))<0?f-(32767&d):f+d)-f+s,o=a.update(5,p,r[h],n[h],d,l,y,o),g){case e:return l<<2;default:return-1}}function c(){a=new i,o=a.g726InitState()}return c.prototype={decode:function(t){for(var r=new Int16Array(1.6*t.length),n=0,o=0;n<t.length-5;n+=5){var a=null;a=u(t[n]>>3,e),r[o]=65280&a,o++,a=u(t[n]<<2|t[n+1]>>6,e),r[o]=65280&a,o++,a=u(t[n+1]>>1,e),r[o]=65280&a,o++,a=u(t[n+1]<<4|t[n+2]>>4,e),r[o]=65280&a,o++,a=u(t[n+2]<<1|t[n+3]>>7,e),r[o]=65280&a,o++,a=u(t[n+3]>>2,e),r[o]=65280&a,o++,a=u(t[n+3]<<3|t[n+4]>>5,e),r[o]=65280&a,o++,a=u(t[n+4]>>0,e),r[o]=65280&a,o++}return r}},new c}var l=function(e){var t=null;switch(e){case 16:t=new c;break;case 24:t=new s;break;case 32:t=new f;break;case 40:t=new p;break;default:debug.log("wrong bits")}return t},d={"mpeg4-generic":86018,"G.723":86068,"G.729":86069,mpeg2:86016,"G.722.1":69660};function y(e){e=new Int16Array(e.buffer);for(var t=new Float32Array(e.length),r=0;r<e.length;r++)t[r]=e[r]/Math.pow(2,15);return t}var h=function(){var e=null,t=null,r="",n=null;function o(){}return o.prototype={open:function(t,o){if(d[r=t])e=Module._OpenAudioDecoder(d[t]);else switch(r){case"G.711A":case"G.711Mu":n=new u(r);break;case"G.726-16":case"G.726-24":case"G.726-32":case"G.726-40":n=new l(o)}},close:function(){d[r]&&(Module._CloseAudioDecoder(e),Module._free(t),t=null)},decodeByFFMPEG:function(n){var o=new Uint8Array(Module.HEAPU8.buffer,t,102400),a=new Uint8Array(102400),i=0;if("G.729"===r||"G.723"===r){for(var u="G.729"===r?10:20,c=Math.floor(n.length/u),s=0;s<c;s++){o.set(new Uint8Array(n.subarray(s*u,(s+1)*u)));var f=Module._DecodeAudioFrame(e,o.byteOffset,u,o.byteLength);a.set(new Uint8Array(o.subarray(0,f)),i),i+=f}a=y(new Uint8Array(a.subarray(0,i)))}else o.set(new Uint8Array(n)),i=Module._DecodeAudioFrame(e,o.byteOffset,n.byteLength,o.byteLength),a=new Uint8Array(o.subarray(0,i)),a="mpeg4-generic"!==r?y(a):new Float32Array(a.buffer);return a},decodeBySelf:function(e){var t;return t="PCM"===r?new Uint8Array(e):n.decode(e),"G.711A"!==r&&"G.711Mu"!==r&&(t=y(t)),t},decode:function(e){var n=null;return d[r]?(null===t&&(t=Module._malloc(102400)),n=this.decodeByFFMPEG(e)):n=this.decodeBySelf(e),n}},new o},g=function(e,t){var r=null,n=null,o=0,i=(new Uint8Array(7),{seconds:null,useconds:null}),u=new h;function c(){this.firstTime=0,this.lastMSW=0}return u.open(e,t),c.prototype={parseRTPData:function(e,t,n,a){var c=t[22];t[21],t[20],t.length;var s=t.subarray(24+c,t.length-8),f=(s.subarray(0,2),(t[19]<<24)+(t[18]<<16)+(t[17]<<8)+t[16]>>>0),p=Date.UTC("20"+(f>>26),(f>>22&15)-1,f>>17&31,f>>12&31,f>>6&63,63&f)/1e3;if(p-=28800,0==this.firstTime)this.firstTime=p,this.lastMSW=0,o=(t[21]<<8)+t[20],i.seconds=p,i.useconds=0;else{var l,d=(t[21]<<8)+t[20];l=d>o?d-o:d+65535-o,this.lastMSW+=l,p>this.firstTime&&(this.lastMSW-=1e3),this.firstTime=p,i.seconds=p,i.useconds=this.lastMSW,o=d}var y=u.decode(s);return{codec:"AAC",audio_type:a.audio_type,bufferData:y,rtpTimeStamp:1e3*i.seconds+i.useconds,samplingRate:r}},setCodecInfo:function(e){a.log("Set codec info. for AAC"),e.config,n=e.bitrate,r=e.ClockFreq},getCodecInfo:function(){return{bitrate:n,clockFreq:r}}},new c};importScripts("./../module/ffmpegasm.js"),Module.onRuntimeInitialized=function(){Module._RegisterAll(),w("WorkerReady")},addEventListener("message",function(e){var t=e.data;switch(t.type){case"sdpInfo":v=t.data.sdpInfo;t.data.aacCodecInfo;!function(e,t){for(var r=e,n=0;n<e.length;n++)if(-1===r[n].trackID.search("trackID=t")&&(b=null,"recvonly"===r[n].TalkTransType)){switch(r[n].codecName){case"G.726-16":case"G.726-24":case"G.726-32":case"G.726-40":var o=parseInt(r[n].codecName.substr(6,2));a.log(o),(b=new g(r[n].codecName,o)).setCodecInfo(r[n]);break;case"mpeg4-generic":case"G.723":case"G.729":case"mpeg2":case"G.722.1":case"PCM":case"G.711A":case"G.711Mu":(b=new g(r[n].codecName)).setCodecInfo(r[n])}var i=r[n].RtpInterlevedID;if(m[i]=b,null!=b)return}}(v,0,t.data.mp4Codec);break;case"MediaData":var r=t.data.rtspInterleave[1];if("undefined"!==typeof m[r]){var n=t.data,o=m[r].parseRTPData(n.rtspInterleave,n.payload,T,t.info);null!==o&&"undefined"!==typeof o&&null!==o.streamData&&"undefined"!==typeof o.streamData&&(o.streamData=null),w("render",o)}}},!1);var m=[],v=null,b=null,T=!1;function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:e,codec:t.codec,audio_type:t.audio_type,data:t.bufferData,rtpTimeStamp:t.rtpTimeStamp,samplingRate:t.samplingRate||8e3};if("render"===e)postMessage(r,[t.bufferData.buffer]);else if("backup"===e){postMessage({type:e,data:t})}else postMessage(r)}}]);
|