!function(t){var e={};function r(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(n,a,function(e){return t[e]}.bind(null,a));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";function n(t){return(n="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(r.r(e),"undefined"==typeof a)var a={};a.MD5=function(t){function e(t){var e=(t>>>0).toString(16);return"00000000".substr(0,8-e.length)+e}function r(t,e,r){return t&e|~t&r}function a(t,e,r){return r&t|~r&e}function i(t,e,r){return t^e^r}function o(t,e,r){return e^(t|~r)}function _(t,e){return t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}function u(t){for(var e=[],r=0;r>>32-i),d=o}var n=p.length;p.push(128);var u=p.length%64;if(u>56){for(var f=0;f<64-u;f++)p.push(0);u=p.length%64}for(f=0;f<56-u;f++)p.push(0);p=p.concat(function(t){for(var e=[],r=0;r<8;r++)e.push(255&t),t>>>=8;return e}(8*n));var c=1732584193,l=4023233417,m=2562383102,g=271733878,d=0,h=0,y=0,v=0;for(f=0;f=0;u--)o=255&(_=arguments[u]),o<<=8,o|=255&(_>>>=8),o<<=8,o|=255&(_>>>=8),o<<=8,i+=e(o|=_>>>=8);return i}(g,m,l,c).toUpperCase()}()};var i={log:function(){},error:function(){},count:function(){},info:function(){}};(function(){function t(){}t.createFromElementId=function(e){for(var r=document.getElementById(e),n="",a=r.firstChild;a;)3===a.nodeType&&(n+=a.textContent),a=a.nextSibling;var i=new t;return i.type=r.type,i.source=n,i},t.createFromSource=function(e,r){var n=new t;return n.type=e,n.source=r,n}})(),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 r=this.gl.getUniformLocation(this.program,t);this.gl.uniformMatrix4fv(r,!1,e)}}}(),function(){var t=null;function e(t,e,r){this.gl=t,this.size=e,this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),this.format=r||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 r=this.gl;r.bindTexture(r.TEXTURE_2D,this.texture),e?r.texSubImage2D(r.TEXTURE_2D,0,0,0,this.size.w,this.size.h,this.format,r.UNSIGNED_BYTE,t):r.texImage2D(r.TEXTURE_2D,0,this.format,this.size.w,this.size.h,0,this.format,r.UNSIGNED_BYTE,t)},bind:function(e,r,n){var a=this.gl;t||(t=[a.TEXTURE0,a.TEXTURE1,a.TEXTURE2]),a.activeTexture(t[e]),a.bindTexture(a.TEXTURE_2D,this.texture),a.uniform1i(a.getUniformLocation(r.program,n),e)}}}();var o=function(){this.map={}};o.prototype={put:function(t,e){this.map[t]=e},get:function(t){return this.map[t]},containsKey:function(t){return t in this.map},containsValue:function(t){for(var e in this.map)if(this.map[e]===t)return!0;return!1},isEmpty:function(t){return 0===this.size()},clear:function(){for(var t in this.map)delete this.map[t]},remove:function(t){delete this.map[t]},keys:function(){var t=new Array;for(var e in this.map)t.push(e);return t},values:function(){var t=new Array;for(var e in this.map)t.push(this.map[e]);return t},size:function(){var t=0;for(var e in this.map)t++;return t}};var _=o;var u=function(){var t,e,r,n,a,o,_,u,f,p=null,c=new Uint8Array,s=!1;function l(){p=Module._OpenDecoder(0,0,0),l.prototype.setIsFirstFrame(!1)}return l.prototype={init:function(){i.log("H264 Decoder init")},setOutputSize:function(t){u!=2*t&&(u=2*t,f=Module._malloc(u),c=new Uint8Array(Module.HEAPU8.buffer,f,u))},decode:function(i,f){if(t=Date.now(),e=new Uint8Array(i),c.set(e),r=Module._FrameAlloc(),Module._DecodeFrame(p,c.byteOffset,i.byteLength,u,r),n=Date.now()-t,o=Module._getYLength(r),a=Module._getHeight(r),!l.prototype.isFirstFrame())return l.prototype.setIsFirstFrame(!0),{firstFrame:!0};if(o>0&&a>0){t=Date.now();var s=new Uint8Array(c);return _={data:s,option:{yaddr:Module._getY(r),uaddr:Module._getU(r),vaddr:Module._getV(r),ylen:o,height:a,beforeDecoding:t},width:o,height:a,codecType:"h264",decodingTime:n,frameType:f},Module._FrameFree(r),_}},setIsFirstFrame:function(t){s=t},isFirstFrame:function(){return s},free:function(){Module._free(f),f=null}},new l};importScripts("./../module/ffmpegasm.js"),addEventListener("message",function(t){var e=t.data;switch(p=t.data.channelId,e.type){case"MediaData":null===f&&(f=new s),e.data.rtspInterleave[1],f.parseRTPData(e.data.payload)}},!1),Module.onRuntimeInitialized=function(){Module._RegisterAll(),c("WorkerReady")};var f=null,p=null;function c(t,e,r){var n={type:t,data:e,channelId:p,option:r};"canvasRender"===t?postMessage(n,[e.buffer]):postMessage(n)}var s=function(){var t=new l,e=0,r=null;function n(){this.decoder=new u}return n.prototype={init:function(t){},parseRTPData:function(n){var a=null,i={},o=n[22],_=(n[11]<<24)+(n[10]<<16)+(n[9]<<8)+n[8]>>>0,u=n.subarray(24+o,n.length-8),f=n.subarray(n.length-8,n.length),p=(f[7],f[6],f[5],f[4],(n[19]<<24)+(n[18]<<16)+(n[17]<<8)+n[16]>>>0),s=Date.UTC("20"+(p>>>26),(p>>>22&15)-1,p>>>17&31,p>>>12&31,p>>>6&63,63&p)/1e3,l=[];s+=(new Date).getTimezoneOffset()/60*3600;for(var m=0;m<=u.length;)if(0==u[m])if(0==u[m+1])if(1==u[m+2]){if(l.push(m),5==(31&u[m+=3])||1==(31&u[m]))break}else 0==u[m+2]?m++:m+=3;else m+=2;else m+=1;for(m=0;m>n;return i=c+a&t,r[o]>>e-(i&e)&1}function g(t,e){var r=c>>n,a=8*(r+1)-c;if(a<8)for(var i=0;i<3;i++){var o=t[r+i];o=0==i?o>>a<>8-a|1<=0;o--,i++)a|=m(t,i)<