/* 录音 https://github.com/xiangyuecn/Recorder src: recorder-core.js */ !function(I){"use strict";var d=function(){},P=function(e){return new t(e)};P.LM="2023-06-10 21:09";var w="Recorder",C="getUserMedia",U="srcSampleRate",W="sampleRate",L="catch";P.IsOpen=function(){var e=P.Stream;if(e){var t=e.getTracks&&e.getTracks()||e.audioTracks||[],r=t[0];if(r){var n=r.readyState;return"live"==n||n==r.LIVE}}return!1},P.BufferSize=4096,P.Destroy=function(){for(var e in z(w+" Destroy"),y(),r)r[e]()};var r={};P.BindDestroy=function(e,t){r[e]=t},P.Support=function(){var e=navigator.mediaDevices||{};return e[C]||(e=navigator)[C]||(e[C]=e.webkitGetUserMedia||e.mozGetUserMedia||e.msGetUserMedia),!!e[C]&&(P.Scope=e,!!P.GetContext())},P.GetContext=function(){var e=I.AudioContext;return e||(e=I.webkitAudioContext),e?(P.Ctx&&"closed"!=P.Ctx.state||(P.Ctx=new e,P.BindDestroy("Ctx",function(){var e=P.Ctx;e&&e.close&&(e.close(),P.Ctx=0)})),P.Ctx):null};var A="ConnectEnableWebM";P[A]=!0;var T="ConnectEnableWorklet";P[T]=!1;var S=function(e,c){var f,r,u,l=e.BufferSize||P.BufferSize,v=P.Ctx,p=e.Stream,i=function(e){var t=p._m=v.createMediaStreamSource(p);t.connect(e),e.connect(v.destination)},h="",g=p._call,m=function(e){for(var t in g){for(var r=e.length,n=new Int16Array(r),a=0,o=0;o"+f,3);for(var u=0,l=o;l"+d.length+" 花:"+(Date.now()-n)+"ms"),setTimeout(function(){n=Date.now(),a[o.type](d,function(e){u(e,g)},function(e){f(e)})})}else f("未加载"+o.type+"编码器");else f("音频buffers被释放");else f("未采集到录音")}},I[w]&&(z("重复引入"+w,3),I[w].Destroy()),I[w]=P;var F=function(e,t){t.pos||(t.pos=[0],t.tracks={},t.bytes=[]);var r=t.tracks,n=[t.pos[0]],a=function(){t.pos[0]=n[0]},o=t.bytes.length,i=new Uint8Array(o+e.length);if(i.set(t.bytes),i.set(e,o),t.bytes=i,!t._ht){if(B(i,n),N(i,n),!R(B(i,n),[24,83,128,103]))return;for(B(i,n);n[0]=e.length)){var a=e[n],o=("0000000"+a.toString(2)).substr(-8),i=/^(0*1)(\d*)$/.exec(o);if(i){var s=i[1].length,c=[];if(!(n+s>e.length)){for(var f=0;fe.length)return;for(var i=0;i