1 |
- !function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";function r(t){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}if(n.r(e),"undefined"==typeof o)var o={};o.MD5=function(t){function e(t){var e=(t>>>0).toString(16);return"00000000".substr(0,8-e.length)+e}function n(t,e,n){return t&e|~t&n}function o(t,e,n){return n&t|~n&e}function a(t,e,n){return t^e^n}function i(t,e,n){return e^(t|~n)}function u(t,e){return t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}function f(t){for(var e=[],n=0;n<t.length;n++)if(t.charCodeAt(n)<=127)e.push(t.charCodeAt(n));else for(var r=encodeURIComponent(t.charAt(n)).substr(1).split("%"),o=0;o<r.length;o++)e.push(parseInt(r[o],16));return e}function s(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=t[n];return e}var l=null,c=null;function h(t,e){return 4294967295&t+e}return"string"==typeof t?l=f(t):t.constructor==Array?0===t.length?l=t:"string"==typeof t[0]?l=function(t){for(var e=[],n=0;n<t.length;n++)e=e.concat(f(t[n]));return e}(t):"number"==typeof t[0]?l=t:c=r(t[0]):"undefined"!=typeof ArrayBuffer?t instanceof ArrayBuffer?l=s(new Uint8Array(t)):t instanceof Uint8Array||t instanceof Int8Array?l=s(t):t instanceof Uint32Array||t instanceof Int32Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Float32Array||t instanceof Float64Array?l=s(new Uint8Array(t.buffer)):c=r(t):c=r(t),c&&alert("MD5 type mismatch, cannot process "+c),function(){function t(t,e,n,r){var o,a,i=E;E=T,T=v,v=h(v,(o=h(m,h(t,h(e,n))))<<(a=r)&4294967295|o>>>32-a),m=i}var r=l.length;l.push(128);var f=l.length%64;if(f>56){for(var s=0;s<64-f;s++)l.push(0);f=l.length%64}for(s=0;s<56-f;s++)l.push(0);l=l.concat(function(t){for(var e=[],n=0;n<8;n++)e.push(255&t),t>>>=8;return e}(8*r));var c=1732584193,g=4023233417,p=2562383102,y=271733878,m=0,v=0,T=0,E=0;for(s=0;s<l.length/64;s++){m=c;var d=64*s;t(n(v=g,T=p,E=y),3614090360,u(l,d),7),t(n(v,T,E),3905402710,u(l,d+4),12),t(n(v,T,E),606105819,u(l,d+8),17),t(n(v,T,E),3250441966,u(l,d+12),22),t(n(v,T,E),4118548399,u(l,d+16),7),t(n(v,T,E),1200080426,u(l,d+20),12),t(n(v,T,E),2821735955,u(l,d+24),17),t(n(v,T,E),4249261313,u(l,d+28),22),t(n(v,T,E),1770035416,u(l,d+32),7),t(n(v,T,E),2336552879,u(l,d+36),12),t(n(v,T,E),4294925233,u(l,d+40),17),t(n(v,T,E),2304563134,u(l,d+44),22),t(n(v,T,E),1804603682,u(l,d+48),7),t(n(v,T,E),4254626195,u(l,d+52),12),t(n(v,T,E),2792965006,u(l,d+56),17),t(n(v,T,E),1236535329,u(l,d+60),22),t(o(v,T,E),4129170786,u(l,d+4),5),t(o(v,T,E),3225465664,u(l,d+24),9),t(o(v,T,E),643717713,u(l,d+44),14),t(o(v,T,E),3921069994,u(l,d),20),t(o(v,T,E),3593408605,u(l,d+20),5),t(o(v,T,E),38016083,u(l,d+40),9),t(o(v,T,E),3634488961,u(l,d+60),14),t(o(v,T,E),3889429448,u(l,d+16),20),t(o(v,T,E),568446438,u(l,d+36),5),t(o(v,T,E),3275163606,u(l,d+56),9),t(o(v,T,E),4107603335,u(l,d+12),14),t(o(v,T,E),1163531501,u(l,d+32),20),t(o(v,T,E),2850285829,u(l,d+52),5),t(o(v,T,E),4243563512,u(l,d+8),9),t(o(v,T,E),1735328473,u(l,d+28),14),t(o(v,T,E),2368359562,u(l,d+48),20),t(a(v,T,E),4294588738,u(l,d+20),4),t(a(v,T,E),2272392833,u(l,d+32),11),t(a(v,T,E),1839030562,u(l,d+44),16),t(a(v,T,E),4259657740,u(l,d+56),23),t(a(v,T,E),2763975236,u(l,d+4),4),t(a(v,T,E),1272893353,u(l,d+16),11),t(a(v,T,E),4139469664,u(l,d+28),16),t(a(v,T,E),3200236656,u(l,d+40),23),t(a(v,T,E),681279174,u(l,d+52),4),t(a(v,T,E),3936430074,u(l,d),11),t(a(v,T,E),3572445317,u(l,d+12),16),t(a(v,T,E),76029189,u(l,d+24),23),t(a(v,T,E),3654602809,u(l,d+36),4),t(a(v,T,E),3873151461,u(l,d+48),11),t(a(v,T,E),530742520,u(l,d+60),16),t(a(v,T,E),3299628645,u(l,d+8),23),t(i(v,T,E),4096336452,u(l,d),6),t(i(v,T,E),1126891415,u(l,d+28),10),t(i(v,T,E),2878612391,u(l,d+56),15),t(i(v,T,E),4237533241,u(l,d+20),21),t(i(v,T,E),1700485571,u(l,d+48),6),t(i(v,T,E),2399980690,u(l,d+12),10),t(i(v,T,E),4293915773,u(l,d+40),15),t(i(v,T,E),2240044497,u(l,d+4),21),t(i(v,T,E),1873313359,u(l,d+32),6),t(i(v,T,E),4264355552,u(l,d+60),10),t(i(v,T,E),2734768916,u(l,d+24),15),t(i(v,T,E),1309151649,u(l,d+52),21),t(i(v,T,E),4149444226,u(l,d+16),6),t(i(v,T,E),3174756917,u(l,d+44),10),t(i(v,T,E),718787259,u(l,d+8),15),t(i(v,T,E),3951481745,u(l,d+36),21),c=h(c,m),g=h(g,v),p=h(p,T),y=h(y,E)}return function(t,n,r,o){for(var a="",i=0,u=0,f=3;f>=0;f--)i=255&(u=arguments[f]),i<<=8,i|=255&(u>>>=8),i<<=8,i|=255&(u>>>=8),i<<=8,a+=e(i|=u>>>=8);return a}(y,p,g,c).toUpperCase()}()};var a={log:function(){},error:function(){},count:function(){},info:function(){}};(function(){function t(){}t.createFromElementId=function(e){for(var n=document.getElementById(e),r="",o=n.firstChild;o;)3===o.nodeType&&(r+=o.textContent),o=o.nextSibling;var a=new t;return a.type=n.type,a.source=r,a},t.createFromSource=function(e,n){var r=new t;return r.type=e,r.source=n,r}})(),function(){function t(t){this.gl=t,this.program=this.gl.createProgram()}t.prototype={attach:function(t){this.gl.attachShader(this.program,t.shader)},link:function(){this.gl.linkProgram(this.program)},use:function(){this.gl.useProgram(this.program)},getAttributeLocation:function(t){return this.gl.getAttribLocation(this.program,t)},setMatrixUniform:function(t,e){var n=this.gl.getUniformLocation(this.program,t);this.gl.uniformMatrix4fv(n,!1,e)}}}(),function(){var t=null;function e(t,e,n){this.gl=t,this.size=e,this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),this.format=n||t.LUMINANCE,t.texImage2D(t.TEXTURE_2D,0,this.format,e.w,e.h,0,this.format,t.UNSIGNED_BYTE,null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)}e.prototype={fill:function(t,e){var n=this.gl;n.bindTexture(n.TEXTURE_2D,this.texture),e?n.texSubImage2D(n.TEXTURE_2D,0,0,0,this.size.w,this.size.h,this.format,n.UNSIGNED_BYTE,t):n.texImage2D(n.TEXTURE_2D,0,this.format,this.size.w,this.size.h,0,this.format,n.UNSIGNED_BYTE,t)},bind:function(e,n,r){var o=this.gl;t||(t=[o.TEXTURE0,o.TEXTURE1,o.TEXTURE2]),o.activeTexture(t[e]),o.bindTexture(o.TEXTURE_2D,this.texture),o.uniform1i(o.getUniformLocation(n.program,r),e)}}}();var i=function(){var t=48e3,e=4,n=15,r=[255,511,1023,2047,4095,8191,16383,32767],o=8e3,i=null;function u(t){var o,a,i;return t>=0?o=213:(o=85,t=-t-8),(a=function(t,e){for(var n=0,r=e.length;n<r;n++)if(t<=e[n])return n;return e.length}(t,r))>=8?127^o:(i=a<<e,(i|=a<2?t>>4&n:t>>a+3&n)^o)}function f(){}return f.prototype={setSampleRate:function(e){t=e},encode:function(e){var n=null;null!==i?((n=new Float32Array(e.length+i.length)).set(i,0),n.set(e,i.length)):n=e,n=function(e,n){if(n===t)return e;n>t&&a.log("The rate of device show be smaller than local sample rate");for(var r=t/n,o=Math.floor(e.length/r),u=new Float32Array(o),f=0,s=0;f<u.length;){for(var l=Math.round((f+1)*r),c=0,h=0,g=s,p=e.length;g<l&&g<p;g++)c+=e[g],h++;u[f]=c/h,f++,s=l}if(i=null,Math.round(f*r)!==e.length){var y=Math.round(f*r);i=new Float32Array(e.subarray(y,e.length))}return u}(n,o);for(var r=new Int16Array(n.length),f=new Uint8Array(r.length),s=0,l=n.length;s<l;s++)r[s]=n[s]*Math.pow(2,15),f[s]=u(r[s]);return f}},new f},u=function(t){var e=null,n=null,r=[36,t,0,0,0,0],o=[68,72,65,86],a=[100,104,97,118],u=245,f=0,s=null;function l(t,e,n){var r=[],o=e||4;if(!0===n)for(var a=0;a<o;a++)r[a]=t>>>8*(o-1-a)&255;else for(var i=0;i<o;i++)r[i]=t>>>8*i&255;return r}function c(){n=new i}return c.prototype={setSampleRate:function(t){n.setSampleRate(t)},getRTPPacket:function(i){var c=n.encode(i),h=0;(e=new Uint8Array(r.length+40+c.length+8)).set([36,t],h),h+=2,e.set(l(40+c.length+8,4,!0),h),h+=4,e.set(o,h),h+=4,e.set([240],h),h+=1,e.set([0],h),h+=1,e.set([1],h),h+=1,e.set([0],h),h+=1,u>65535&&(u=240),e.set(l(u),h),h+=4,u++;var g=l(40+c.length+8);e.set(g,h),h+=4;var p=new Date,y=(p.getFullYear()-2e3<<26)+(p.getMonth()+1<<22)+(p.getDate()<<17)+(p.getHours()<<12)+(p.getMinutes()<<6)+p.getSeconds(),m=p.getTime(),v=null===s?0:m-s;s=m,(f+=v)>65535&&(f=65535-f),e.set(l(y),h),h+=4,e.set(l(f,2),h),h+=2,e.set([16],h),h+=1;var T=function(t,e){for(var n=0,r=e;r<t.length;r++)n+=t[r];return n}(e,6);e.set([T],h),h+=1,e.set([131,1,14,2],h),h+=4,e.set([150,1,0,0],h),h+=4;var E=function(t,e){for(var n=0,r=0;r<e;r++)n+=t[r]<<r%4*8;return n}(c,c.length);return e.set([136],h),h+=1,e.set(l(E),h),h+=4,e.set([0,0,0],h),h+=3,e.set(c,h),h+=c.length,e.set(a,h),h+=4,e.set(g,h),e}},new c(t)},f=null;addEventListener("message",function(t){var e,n=t.data;switch(n.type){case"sdpInfo":!function(t){for(var e=0;e<t.length;e++)"sendonly"===t[e].TalkTransType&&(f=new u(t[e].RtpInterlevedID))}(n.data.sdpInfo);break;case"getRtpData":var r=f.getRTPPacket(n.data);e=r,postMessage({type:"rtpData",data:e},[e.buffer]);break;case"sampleRate":null!==f&&f.setSampleRate(n.data)}},!1)}]);
|