zego-express-engine-webrtc
Version:
zego webrtc express sdk
1 lines • 40 kB
JavaScript
!function(t,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i(require("long"));else if("function"==typeof define&&define.amd)define(["long"],i);else{var n="object"==typeof exports?i(require("long")):i(t.long);for(var e in n)("object"==typeof exports?exports:t)[e]=n[e]}}(Object("undefined"!=typeof self?self:this),function(t){return function(){"use strict";var i={327:function(t,i,n){n.d(i,{L:function(){return s}});var e=n(4872);function s(t,i){if(t&&!(0,e.dr)(t)&&t.zegoStream){if(i.info("cu.gs type:zego"),(0,e.dr)(t.stream))return t.stream;throw new Error("The ZegoLocalStream type requires first calling the capture api to capture the stream")}return t}},2638:function(t,i,n){var e;n(3052);!function(t){t[t.debug=0]="debug",t[t.info=1]="info",t[t.warn=2]="warn",t[t.error=3]="error",t[t.report=99]="report",t[t.disable=100]="disable"}(e||(e={}));var s,r,u;!function(t){t[t.disable=0]="disable",t[t.websocket=1]="websocket",t[t.https=2]="https"}(s||(s={})),function(t){t[t.SDKProject_ZegoWebRTC=6]="SDKProject_ZegoWebRTC",t[t.SDKProject_ZegoMiniProgram=7]="SDKProject_ZegoMiniProgram"}(r||(r={})),function(t){t[t.UDP=0]="UDP",t[t.RTMP=1]="RTMP",t[t.FLV=2]="FLV",t[t.HLS=3]="HLS",t[t.WEBRTC=4]="WEBRTC"}(u||(u={}));var o,h;o=1,function(){var t=1}();!function(t){t[t.ClientType_None=0]="ClientType_None",t[t.ClientType_H5=1]="ClientType_H5",t[t.ClientType_SmallPragram=2]="ClientType_SmallPragram",t[t.ClientType_Webrtc=3]="ClientType_Webrtc"}(h||(h={}));var c,f,a,l,d,m,v,g,p,b,y,I,D,T;!function(t){t[t.start=0]="start",t[t.error=1]="error",t[t.retry=2]="retry",t[t.stop=3]="stop"}(c||(c={})),function(t){t[t.disconnected=0]="disconnected",t[t.connecting=1]="connecting",t[t.connected=2]="connected"}(f||(f={})),function(t){t[t.Default=0]="Default",t[t.Extranet=1]="Extranet",t[t.Intranet=2]="Intranet"}(a||(a={})),function(t){t[t.logout=0]="logout",t[t.trylogin=1]="trylogin",t[t.login=2]="login"}(l||(l={})),function(t){t[t.logout=0]="logout",t[t.trylogin=1]="trylogin",t[t.login=2]="login",t[t.reconnect=3]="reconnect"}(d||(d={})),function(t){t[t.stop=0]="stop",t[t.start=1]="start"}(m||(m={})),function(t){t[t.CDN=0]="CDN",t[t.RTC=1]="RTC",t[t.L3=2]="L3",t[t.DG=3]="DG"}(v||(v={})),function(t){t[t.useAnalyzer=0]="useAnalyzer",t[t.useWorklet=1]="useWorklet"}(g||(g={})),function(t){t[t.Default=3]="Default",t[t.StandardVideoCall=4]="StandardVideoCall",t[t.HighVideoCall=5]="HighVideoCall",t[t.StandardChatroom=6]="StandardChatroom",t[t.HighQualityChatroom=7]="HighQualityChatroom",t[t.Broadcast=8]="Broadcast",t[t.Karaoke=9]="Karaoke",t[t.UNKNOWN=100]="UNKNOWN"}(p||(p={})),function(t){t.WIN32="WIN32",t.MAC="Mac",t.ANDROID="Android",t.LINUX="Linux",t.IOS="iOS",t.Harmony="Harmony",t.UNKNOWN="WTF"}(b||(b={})),function(t){t.CDN="cdn",t.L3="l3",t.RTC="rtc"}(y||(y={})),function(t){t[t.RTC=0]="RTC",t[t.CDN=1]="CDN",t[t.L3=2]="L3",t[t.DG=3]="DG",t[t.CUSTOM=5]="CUSTOM"}(I||(I={})),function(t){t[t.offline=0]="offline",t[t.online=1]="online"}(D||(D={})),function(t){t[t.MinQuality=0]="MinQuality",t[t.DieQuality=0]="DieQuality",t[t.PoorMinQuality=1]="PoorMinQuality",t[t.MiddleMinQuality=30]="MiddleMinQuality",t[t.GoodMinQuality=60]="GoodMinQuality",t[t.ExcellentMinQuality=85]="ExcellentMinQuality",t[t.MaxQuality=100]="MaxQuality"}(T||(T={}));var x,w,_=function(){function t(t,i){void 0===t&&(t=null),void 0===i&&(i=null),this.next=null,this.prev=null,this._id=t,this._data=i}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id?this._id:null},set:function(t){this._id=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this._data},set:function(t){this._data=t},enumerable:!1,configurable:!0}),t.prototype.hasNext=function(){return this.next&&this.next.id},t.prototype.hasPrev=function(){return this.prev&&this.prev.id},t}();!function(){function t(){this.start=new _,this.end=new _,this._idCounter=0,this._numNodes=0,this.start.next=this.end,this.start.prev=null,this.end.prev=this.start,this.end.next=null}t.prototype.insertBefore=function(t,i){var n=new _(this._idCounter,i);return n.next=t,n.prev=t.prev,t.prev&&(t.prev.next=n),t.prev=n,++this._idCounter,++this._numNodes,n},t.prototype.addLast=function(t){return this.insertBefore(this.end,t)},t.prototype.add=function(t){return this.addLast(t)},t.prototype.getFirst=function(){return 0===this._numNodes?null:this.start.next},t.prototype.getLast=function(){return 0===this._numNodes?null:this.end.prev},t.prototype.size=function(){return this._numNodes},t.prototype.getFromFirst=function(t){var i=0,n=this.start.next;if(t>=0)for(;i<t&&null!==n;)n=n.next,++i;else n=null;if(null===n)throw"Index out of bounds.";return n},t.prototype.get=function(t){return 0===t?this.getFirst():t===this._numNodes-1?this.getLast():this.getFromFirst(t)},t.prototype.remove=function(t){return t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),--this._numNodes,t},t.prototype.removeFirst=function(){var t=null;return this._numNodes>0&&this.start.next&&(t=this.remove(this.start.next)),t},t.prototype.removeLast=function(){var t=null;return this._numNodes>0&&this.end.prev&&(t=this.remove(this.end.prev)),t},t.prototype.removeAll=function(){this.start.next=this.end,this.end.prev=this.start,this._numNodes=0,this._idCounter=0},t.prototype.each=function(t){for(var i=this.start;i.hasNext();)t(i=i.next)},t.prototype.find=function(t){for(var i=this.start,n=!1,e=null;i.hasNext()&&!n;)t(i=i.next)&&(e=i,n=!0);return e},t.prototype.map=function(t){for(var i=this.start,n=[];i.hasNext();)t(i=i.next)&&n.push(i);return n},t.prototype.push=function(t){return this.addLast(t)},t.prototype.unshift=function(t){this.insertBefore(this._numNodes>0?this.start.next:this.end,t)},t.prototype.pop=function(){return this.removeLast()},t.prototype.shift=function(){return this.removeFirst()}}();!function(t){t.ONLY_BASELINE="only_baseline",t.HARD_SOFT_ENCODEC_FIRST="hard_or_soft_encodec_first",t.HIGH_PROFILE_FIRST="high_profile_first"}(x||(x={})),function(t){t[t.None=0]="None",t[t.Vocalist=1]="Vocalist",t[t.BackingSinging=2]="BackingSinging"}(w||(w={}));var z,O;new Error("This method requires subclasses to implement");!function(t){t[t.IPv4Only=0]="IPv4Only",t[t.IPv4Prefer=1]="IPv4Prefer",t[t.IPv6Prefer=2]="IPv6Prefer"}(z||(z={})),function(t){t[t.IPv4=0]="IPv4",t[t.IPv6=1]="IPv6"}(O||(O={}));var A;!function(t){t[t.unreachable=0]="unreachable",t[t.unknown=1]="unknown",t[t.reachable=2]="reachable"}(A||(A={}))},3052:function(t,i,n){var e,s;!function(t){t[t.SWITCH_ONE=1]="SWITCH_ONE",t[t.SWITCH_TWO=2]="SWITCH_TWO"}(e||(e={})),function(t){t[t.ZegoGeoFenceTypeNone=0]="ZegoGeoFenceTypeNone",t[t.ZegoGeoFenceTypeInclude=1]="ZegoGeoFenceTypeInclude",t[t.ZegoGeoFenceTypeExclude=2]="ZegoGeoFenceTypeExclude"}(s||(s={}));var r,u;!function(t){t[t.TT_NONE=0]="TT_NONE",t[t.TT_PC=1]="TT_PC",t[t.TT_IOS=2]="TT_IOS",t[t.TT_ANDROID=3]="TT_ANDROID",t[t.TT_MAC=4]="TT_MAC",t[t.TT_LINUX=5]="TT_LINUX",t[t.TT_WEB=6]="TT_WEB",t[t.TT_MINIPROGRAM=7]="TT_MINIPROGRAM",t[t.TT_UNKNOWN=32]="TT_UNKNOWN"}(r||(r={})),function(t){t[t.disconnected=0]="disconnected",t[t.connecting=1]="connecting",t[t.connected=2]="connected"}(u||(u={}));var o,h,c,f;!function(t){t[t.logout=0]="logout",t[t.trylogin=1]="trylogin",t[t.login=2]="login"}(o||(o={})),function(t){t[t.I=0]="I",t[t.H=10]="H",t[t.M=100]="M",t[t.L=1e3]="L"}(h||(h={})),function(t){t[t.offline=0]="offline",t[t.online=1]="online"}(c||(c={})),function(t){t[t.NT_NONE=0]="NT_NONE",t[t.NT_LINE=1]="NT_LINE",t[t.NT_WIFI=2]="NT_WIFI",t[t.NT_2G=3]="NT_2G",t[t.NT_3G=4]="NT_3G",t[t.NT_4G=5]="NT_4G",t[t.NT_UNKNOWN=32]="NT_UNKNOWN"}(f||(f={}))},4872:function(t,i,n){function e(t){return"number"==typeof t}function s(t){return"string"==typeof t}function r(t){return"boolean"==typeof t}function u(t){return void 0===t}function o(t){return t instanceof MediaStream}function h(t){return t&&1==t.nodeType}function c(t){return h(t)&&["VIDEO","AUDIO"].includes(t.tagName)}function f(t){return t instanceof ArrayBuffer}n.d(i,{Cs:function(){return e},QP:function(){return s},SY:function(){return f},Si:function(){return c},TE:function(){return u},dd:function(){return r},dr:function(){return o}})},4908:function(t,i,n){n(8627),n(5095)},5095:function(t,i,n){n.d(i,{Gq:function(){return e},Tr:function(){return u},tK:function(){return s},yS:function(){return o},yp:function(){return r}});var e=function(t){return t},s=function(t){return t},r=function(t){return t},u=function(t){return t},o=function(t){return t}},5794:function(t,i,n){function e(){var t=document.createElement("audio");t.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQAAAAA=",t.play(),setTimeout(function(){t.pause(),t.remove()},1e3)}n.d(i,{r:function(){return e}})},6272:function(t,i,n){n.d(i,{Rl:function(){return f},Wk:function(){return c},aw:function(){return r},dO:function(){return u},fT:function(){return e},h2:function(){return h},pt:function(){return s},qC:function(){return o}});var e="room not exist",s="device is not found",r="stream is not from zego",u="input param error",o="local stream wrong",h="no preview",c="publish stream no found",f="network is broken"},6493:function(t,i,n){n.d(i,{$t:function(){return e},HR:function(){return s},nr:function(){return u}});n(2638);function e(){return navigator.userAgent||""}function s(){return null!==e().match(/OpenHarmony|HarmonyOS/i)}function r(){var t,i=navigator.userAgent,n=i.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*([\d\.]+)/i)||[];return/trident/i.test(n[1])?{name:"IE",version:(t=/\brv[ :]+([\d\.]+)/g.exec(i)||[])[1]||""}:"Chrome"===n[1]&&null!=(t=i.match(/\bOPR|Edge\/([\d\.]+)/))?{name:"Opera",version:t[1]}:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(t=i.match(/version\/([\d+\.]+)/i))&&n.splice(1,1,t[1]),{name:n[0],version:n[1]})}function u(){return"safari"==r().name.toLowerCase()}},6994:function(i){i.exports=t},7202:function(t,i,n){n(6994)},8627:function(t,i,n){n.d(i,{Be2:function(){return O},FB3:function(){return D},HO9:function(){return c},I7C:function(){return _},JSm:function(){return A},L8E:function(){return I},LLz:function(){return m},OrZ:function(){return v},Oy0:function(){return o},PTE:function(){return l},S4u:function(){return s},S5f:function(){return r},S6t:function(){return N},V2t:function(){return d},ZEp:function(){return u},_HD:function(){return h},aUw:function(){return f},ckg:function(){return S},jut:function(){return b},m6U:function(){return w},mrK:function(){return x},sVF:function(){return a},s_m:function(){return p},t85:function(){return y},xU2:function(){return T},yK:function(){return g},zs3:function(){return z}});var e=n(6272),s={code:1000002,message:"not login room"},r={code:1000018,message:e.qC},u={code:1100001,message:e.dO},o={code:1100999,message:"unknown server error"},h={code:1101005,message:"signal hb fail"},c={code:1102021,message:"biz channel error."},f={code:1102024,message:"invalid channel"},a={code:1102026,msg:e.fT},l={code:1003050,message:"the extra info of the stream is null"},d={code:1003051,message:"the extra info of the stream is too long"},m={code:1103001,message:e.dO},v={code:1103002,message:"browser do not support"},g={code:1103010,message:"screen fail"},p={code:1103011,message:"enumerate devices fail"},b={code:1103012,message:"use camera device fail"},y={code:1103042,message:"screen canceled"},I={code:1103043,message:"screen not support"},D={code:1103053,message:"https is required"},T={code:1103055,message:e.Wk},x={code:1103061,message:"get media fail"},w={code:1103062,message:"update stream info fail"},_={code:1103063,message:"publish target no response"},z={code:1103064,message:"get device not allowed"},O={code:1103065,message:"device is not readable"},A={code:1103066,message:"device does not meet constraints"},N={code:1103057,message:"decode audio data fail"},S={code:1103048,message:e.pt}},8866:function(t,i,n){n.d(i,{EK:function(){return r},l3:function(){return e},rA:function(){return s}});n(7202),n(8627),n(4908);var e=Promise;function s(t,i,n){void 0===n&&(n=""),t.info("".concat(i," call ").concat(n))}function r(t,i,n){void 0===n&&(n=""),t.info("".concat(i," success ").concat(n))}}},n={};function e(t){var s=n[t];if(void 0!==s)return s.exports;var r=n[t]={exports:{}};return i[t](r,r.exports,e),r.exports}e.d=function(t,i){for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};e.r(s),e.d(s,{AudioMix:function(){return E}});var r="zc.pe.0",u="zc.pe.1",o="zc.aep",h="zc.sev",c="zc.sma.0",f="zc.sma.1",a="zc.mb",l="zc.smb",d="zc.p.0.pe.0",m="zc.p.0.pe.1",v="zc.p.0.re",g="zc.p.0.se",p="zc.p.0.sma.0",b="zc.smav",y="zc.p.0.mb",I="zc.p.0.smav",D=e(8627),T=e(5794),x=e(6493),w=function(){function t(t,i,n,e,s){this.t=t,this.ac=i,this.localStream=n,this.destination=e,this.rtcViewer=s,this.audioBufferList=[],this.replace=!1,this.effectEndedCallBack=null,this.effectEndedListener=null,this.startTimes=0,this.startOffset=0,this.pauseTimes=0,this.resumeOffset=0,this.paused=!1,this.isMixAudio=!1,this.isMixingBuffer=!1,this.loop=!1}return t.prototype.playEffect=function(t,i,n,e,s){var r=this;!0!==this.isMixAudio?this.audioBuffer?(this.startOffset=t||0,this.loop=i||!1,this.replace=n||!1,this.effectEndedCallBack=s,this.mixEffect(this.audioBuffer,function(){r.buffSource.loop=!!i,t?r.buffSource.start(0,t/1e3):r.buffSource.start(0),(0,x.HR)()&&(0,T.r)(),r.startTimes=Date.now(),r.effectEndedListener=r.effectEndedHandler.bind(r),r.buffSource.addEventListener("ended",r.effectEndedListener),e&&e()})):this.t.error("amu.pe.1 no audio buffer found"):this.t.warn("amu.pe.1 audio is mixing")},t.prototype.stopMixingBuffer=function(){return this.isMixingBuffer=!1,this.stopMixingAudio()},t.prototype.playRealTimeEffect=function(t){var i=this;this.mixEffect(t,function(){i.buffSource&&i.buffSource.start(0),i.buffSource&&i.buffSource.addEventListener("ended",function(){i.audioBufferList.shift(),i.audioBufferList.length>0&&i.isMixAudio&&i.playRealTimeEffect(i.audioBufferList[0])})})},t.prototype.pauseEffect=function(){this.audioBufferList.length>0?this.t.error("amu.pe.0 real time buffer can not be paused"):(this.stopMixingAudio(!0),this.resumeOffset=(this.pauseTimes-this.startTimes+this.startOffset)%(1e3*this.audioBuffer.duration),this.paused=!0)},t.prototype.resumeEffect=function(){return this.audioBufferList.length>0?(this.t.error("amu.pe.0 real time buffer can not be resume"),!1):(this.playEffect(this.resumeOffset,this.loop,this.replace,void 0,this.effectEndedCallBack),this.startOffset=this.resumeOffset,this.paused=!1,!0)},t.prototype.mixEffect=function(t,i){this.localStream?(this.gainNode=this.ac.createGain(),this.delayNode=this.ac.createDelay(1),this.delayNode.delayTime.value=0,this.buffSource=this.ac.createBufferSource(),this.buffSource.buffer=t,this.buffSource.connect(this.gainNode),this.gainNode.connect(this.ac.destination),this.replaceTrack()&&i()):this.t.error("amu.me.0 localStream can not be found")},t.prototype.replaceTrack=function(){if(!this.destination)return!1;this.gainNode.connect(this.delayNode),this.delayNode.connect(this.destination);var t=this.destination.stream.getAudioTracks()[0],i=this.localStream.getTracks();return this.micTrack=this.localStream.getAudioTracks()[0],this.micTrack!==t&&(this.micTrack?i.includes(this.micTrack)&&this.localStream.removeTrack(this.micTrack):this.t.warn("amu.rt.0 origin track not fonud"),i.includes(t)||(this.localStream.addTrack(t),this.rtcViewer&&this.rtcViewer.setAudio(t))),this.isMixAudio=!0,!0},t.prototype.effectEndedHandler=function(){this.stopMixingAudio(),this.effectEndedCallBack&&this.effectEndedCallBack(),this.effectEndedCallBack=null},t.prototype.stopMixingAudio=function(t){return void 0===t&&(t=!1),this.paused?(this.t.info("amu.sma.1 audioEffect is paused"),!t&&this.effectEndedListener&&(this.effectEndedCallBack&&this.effectEndedCallBack(),this.effectEndedCallBack=null),!0):this.isMixAudio?this.localStream?(this.buffSource&&(this.buffSource.removeEventListener("ended",this.effectEndedListener),this.buffSource.stop(),this.pauseTimes=Date.now(),this.buffSource.disconnect(this.gainNode),this.buffSource=null),this.gainNode.disconnect(),this.delayNode.disconnect(),this.isMixAudio=!1,this.audioBufferList=[],!t&&this.effectEndedListener&&(this.effectEndedCallBack&&this.effectEndedCallBack(),this.effectEndedCallBack=null),!0):(this.t.error("amu.sma.1 localStream can not be found"),!1):(this.t.warn("amu.sma.1 no mixing audio found"),!0)},t.prototype.getProcess=function(){var t=Date.now();return this.paused&&(t=this.pauseTimes),(t-this.startTimes+this.startOffset)%(1e3*this.audioBuffer.duration)},t.prototype.seekTo=function(t){void 0===t&&(t=0),this.startOffset=t,this.paused?this.resumeOffset=t:(this.stopMixingAudio(!0),this.playEffect(t,this.loop,this.replace,void 0,this.effectEndedCallBack))},t.prototype.mixingBuffer=function(t,i){var n=this;!0!==this.isMixAudio||0!=this.audioBufferList.length||0!=this.isMixingBuffer?(this.ac.resume(),this.ac.decodeAudioData(t,function(t){n.audioBufferList.push(t),1==n.audioBufferList.length&&n.playRealTimeEffect(n.audioBufferList[0]),n.isMixingBuffer=!0,i&&i()},function(t){n.t.error("amu.mb.0 "+t),i&&i({code:D.S6t.code,message:D.S6t.message+" "+t})})):this.t.error("amu.mb.0 audio is mixing")},t.prototype.setMixingAudioVolume=function(t){return this.gainNode?(console.error("ktv setVolume",t),this.gainNode.gain.value=t,!0):(this.t.error("amu.sma.2 no mixing audio found"),!1)},t.prototype.setDelay=function(t){return this.delayNode?(this.t.info("amu.sma.2 set delay: "+t),this.delayNode.delayTime.value=t,!0):(this.t.warn("amu.sma.2 no mixing audio found"),!1)},t}(),_=function(){function t(t,i,n,e,s,r,u){void 0===u&&(u=1);var o=this;this.t=t,this.acMgr=i,this.localStream=n,this.browser=e,this.destination=s,this.rtcViewer=r,this.volumeFactor=u,this.isMixAudio=!1,this.maxDelay=1,this.audioCurrentTimer=null,this.audioResumedTimer=null,this.audioEl=null,this.eventHandler={volumechange:function(t){var i=t.target;i&&o.audioNode&&o.isMediaElSrc&&(i.muted||i.paused?(o.t.info("amu.sma.0 ".concat(o.id," ").concat(null==t?void 0:t.type,": audio muted disconnect")),o.audioNode.disconnect()):(o.t.info("amu.sma.0 ".concat(o.id," ").concat(null==t?void 0:t.type,": audio is connected")),o.audioNode.connect(o.gainNode)))},canplay:function(t){var i=t.target;i&&!o.isMediaElSrc&&o.isMixAudio&&(o.t.info("amu.sma.1 ".concat(o.id," ").concat(i.id," canplay, remixing audio")),o.stopMixingAudio(),o.startMixingAudio(i))}},this.isMediaElSrc=!1,this.volume=1,this.delay=0,this.id=Date.now()%1e5+Math.floor(10*Math.random()),t.info("amu.sma.0 ".concat(this.id," init audio mix"))}return Object.defineProperty(t.prototype,"ac",{get:function(){return this.acMgr.ac},enumerable:!1,configurable:!0}),t.prototype.startMixingAudio=function(t){if(this.isMixAudio)return this.t.error("amu.sma.0 audio is mixing"),!1;if(!this.localStream)return this.t.error("amu.sma.0 localStream can not be found"),!1;var i;t.captureStream=t.captureStream||t.mozCaptureStream||t.webkitCaptureStream,this.isMixAudio=!0,this.gainNode||(this.gainNode=this.ac.createGain(),this.setMixingAudioVolume()),this.delayNode||(this.delayNode=this.ac.createDelay(this.maxDelay),this.t.info("amu.sma.1 ".concat(this.id," init set delay: ")+this.delay),this.delayNode.delayTime.value=this.delay);var n="safari"===this.browser;this.isMediaElSrc=!0;try{var e=this.acMgr.getMediaElementRenderer(t);if(!e)return!1;this.audioNode=e.getMixNode().mixOutputNode,this.audioEl=t}catch(t){i=t}t.addEventListener("volumechange",this.eventHandler.volumechange),t.addEventListener("pause",this.eventHandler.volumechange),t.addEventListener("play",this.eventHandler.volumechange);var s=this.getBrowserInfo(),r=!1;return n&&"10.15.6"===(null==s?void 0:s.sysVer)&&"13.1.2"===(null==s?void 0:s.ver)&&(r=!0),r&&(this.audioResumedTimer=setInterval(function(){t.currentTime=t.currentTime+.45},6e3)),i?(this.t.info("amu.sma.1 ".concat(this.id," create source failed: ")+i),!0):(this.audioNode&&(this.audioNode.connect(this.gainNode),this.t.info("amu.sma.1 ".concat(this.id," mix audio success."))),this.replaceTrack())},t.prototype.getBrowserInfo=function(){var t,i={},n=(0,x.$t)().toLowerCase();t=(n.match(/x [\d._]+/gi)+"").replace(/[^0-9|_.]/gi,"").replace(/_/gi,"."),i.sysVer=t;var e=n.match(/(msie|firefox|chrome|opera|version).*?([\d.]+)/);return e&&(i.browser=e[1].replace(/version/,"'safari"),i.ver=e[2]),i},t.prototype.replaceTrack=function(){if(!this.destination)return!1;this.gainNode.connect(this.delayNode),this.delayNode.connect(this.destination);var t=this.destination.stream.getAudioTracks()[0],i=this.localStream.getTracks();return this.micTrack=this.localStream.getAudioTracks()[0],this.micTrack!==t&&(this.micTrack?i.includes(this.micTrack)&&this.localStream.removeTrack(this.micTrack):this.t.warn("amu.rt.1 origin track not fonud"),i.includes(t)||(this.localStream.addTrack(t),this.rtcViewer&&this.rtcViewer.setAudio(t))),!0},t.prototype.stopMixingAudio=function(){return this.isMixAudio?this.localStream?(this.audioEl&&(this.audioEl.removeEventListener("volumechange",this.eventHandler.volumechange),this.audioEl.removeEventListener("pause",this.eventHandler.volumechange),this.audioEl.removeEventListener("play",this.eventHandler.volumechange),this.audioEl.removeEventListener("canplay",this.eventHandler.canplay),this.audioEl=null),this.audioNode&&(this.audioNode.disconnect(),this.audioNode=null,this.audioCurrentTimer&&(clearInterval(this.audioCurrentTimer),this.audioCurrentTimer=null),this.audioResumedTimer&&(clearInterval(this.audioResumedTimer),this.audioResumedTimer=null)),this.gainNode.disconnect(),this.delayNode.disconnect(),this.isMixAudio=!1,this.t.info("amu.sma.1 ".concat(this.id," stop mix audio success.")),!0):(this.t.error("amu.sma.1 localStream can not be found"),!1):(this.t.warn("amu.sma.1 no mixing audio found"),!0)},t.prototype.setMixingAudioVolume=function(t,i){if(void 0===t?t=this.volume:this.volume=t,void 0===i?i=this.volumeFactor:this.volumeFactor=i,!this.gainNode)return this.t.error("amu.sma.2 no mixing audio found"),!1;var n=t*this.volumeFactor;return this.t.info("amu.sma.2 "+this.id+" set volume: "+n),this.gainNode.gain.value=n,!0},t.prototype.setDelay=function(t){return this.delayNode?(t/=1e3,!isNaN(t)&&(t>this.maxDelay&&(t=this.maxDelay),t<0&&(t=0),this.t.info("amu.sma.1 ".concat(this.id," set delay: ")+t),this.delayNode.delayTime.value=t,this.delay=t,!0)):(this.t.warn("amu.sma.1 no mixing audio found"),!1)},t}(),z=e(4872),O=function(){function t(t){this.i=t,this.audioDestNode=void 0,this._audioMixList=[],this._arrayBufferMap={},this._effectList=[],this.volumeFactor=1}return Object.defineProperty(t.prototype,"delay",{get:function(){return this.u.engineConfig.mixingAudioDelay+this.u.engineConfig.baseMixingAudioDelay},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"t",{get:function(){return this.i.logger},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_localStream",{get:function(){return this.i.localStream},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"h",{get:function(){return this.i.streamCenter},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"u",{get:function(){return this.i.stateCenter},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ac",{get:function(){return this.acMgr.ac},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"acMgr",{get:function(){return this.i.acMgr},enumerable:!1,configurable:!0}),t.prototype.startMixingAudio=function(t){var i=this;if(this.t.info(p+" call"),!this._localStream)return this.t.error(p+" localStream not found"),!1;var n=!0;return t.forEach(function(t){if(i._audioMixList.find(function(i){return i.media==t}))i.t.warn(p+" mix audio already exist");else if(i._localStream){i.h.soundLevelDelegate&&i.i.stopSoundLevel();var e=i.createDestNode(),s=new _(i.t,i.acMgr,i._localStream,i.u.browser,e,i.i.rtcViewer,i.volumeFactor);i._audioMixList.push({audioMix:s,media:t}),s.startMixingAudio(t)||(n=!1),s.setDelay(i.delay),i.h.soundLevelDelegate&&i.i.startSoundLevel()}}),n},t.prototype.stopMixingAudio=function(t){var i=this;return this.t.info("zc.p.0.sma.1 call"),t?t.forEach(function(t){for(var n=0;n<i._audioMixList.length;n++)if(i._audioMixList[n].media==t){i._audioMixList[n].audioMix.stopMixingAudio()&&i._audioMixList.splice(n--,1);break}}):(this._audioMixList.forEach(function(t){return t.audioMix.stopMixingAudio()}),this._audioMixList=[]),!0},t.prototype.setVolumeFactor=function(t){this.t.info(I+" set factor: "+t),isNaN(t)&&this.t.error(I+" set factor failed"),this.volumeFactor=t,this._audioMixList.forEach(function(i){i.audioMix.setMixingAudioVolume(void 0,t)})},t.prototype.setMixingAudioVolume=function(t,i){this.t.info(I+" call");var n=this._audioMixList.find(function(t){return t.media===i});return n?(n.audioMix.setMixingAudioVolume(t),this.t.info(I+" call success"),!0):(this.t.error(I+" audio is not mixing"),!1)},t.prototype.playEffect=function(t,i,n,e){var s=this;if(this.t.info(d+" call"),this._localStream)if(this._effectList.find(function(n){return n.effectID==t.effectID&&n.audioBuffer==i}))this.t.warn(d+" effect already exist ");else{this.h.soundLevelDelegate&&this.i.stopSoundLevel();var r=this.createDestNode(),u=new w(this.t,this.ac,this._localStream,r,this.i.rtcViewer);u.audioBuffer=i;var o={processor:u,effectID:t.effectID,audioBuffer:i};this._effectList.push(o);u.playEffect(t.playTime,t.loop,!1,function(){n&&n()},function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];s._effectList=s._effectList.filter(function(t){return t!==o}),e&&e.apply(void 0,t)}),this.h.soundLevelDelegate&&this.i.startSoundLevel(),this.t.info(d+" play effect "+t.effectID+" success")}else this.t.warn(d+" stream not found")},t.prototype.pauseEffect=function(t){var i=this._effectList.find(function(i){return i.effectID==t});if(i)this.h.soundLevelDelegate&&this.i.stopSoundLevel(),i.processor.pauseEffect(),this.h.soundLevelDelegate&&this.i.startSoundLevel(),this.t.info(m+" pause "+t+" success");else{if(!(0,z.TE)(t))return this.t.error(m+" effect not found"),!1;this.h.soundLevelDelegate&&this.i.stopSoundLevel(),this._effectList.forEach(function(t){return t.processor.pauseEffect()}),this.h.soundLevelDelegate&&this.i.startSoundLevel()}return!0},t.prototype.resumeEffect=function(t){var i=this._effectList.find(function(i){return i.effectID==t});if(i){this.h.soundLevelDelegate&&this.i.stopSoundLevel();var n=i.processor.resumeEffect();return this.h.soundLevelDelegate&&this.i.startSoundLevel(),this.t.info(v+" resume "+t+" success"),n}return(0,z.TE)(t)?(this.h.soundLevelDelegate&&this.i.stopSoundLevel(),this._effectList.forEach(function(t){return t.processor.resumeEffect()}),this.h.soundLevelDelegate&&this.i.startSoundLevel(),!0):(this.t.error(v+" no effect found"),!1)},t.prototype.stopEffect=function(t){var i=this._effectList.find(function(i){return i.effectID==t});if(i)this.h.soundLevelDelegate&&this.i.stopSoundLevel(),i.processor.stopMixingAudio(),this._effectList=this._effectList.filter(function(t){return t!==i}),this.h.soundLevelDelegate&&this.i.startSoundLevel(),this.t.info(g+" pause "+t+" success");else{if(!(0,z.TE)(t))return this.t.error(g+" effect not found"),!1;this.h.soundLevelDelegate&&this.i.stopSoundLevel(),this._effectList.forEach(function(t){return t.processor.stopMixingAudio()}),this._effectList=[],this.h.soundLevelDelegate&&this.i.startSoundLevel()}return!0},t.prototype.setEffectVolume=function(t,i,n){var e=this._effectList.find(function(t){return t.effectID==i});if(e)e.processor.setMixingAudioVolume(t),e.processor.setDelay(n||1e-7),this.t.info("zp.sev.0 set volume "+i+" success");else{if(!(0,z.TE)(i))return this.t.error("zp.sev.0 effect not found"),!1;this._effectList.forEach(function(i){return i.processor.setMixingAudioVolume(t)})}return!0},t.prototype.mixingBuffer=function(t,i,n){var e=this;if(this.t.info(y+" call"),this._localStream)if(this._arrayBufferMap[t])this.h.soundLevelDelegate&&this.i.stopSoundLevel(),this._arrayBufferMap[t].mixingBuffer(i,function(){e.h.soundLevelDelegate&&e.i.startSoundLevel(),n&&n()});else{this.h.soundLevelDelegate&&this.i.stopSoundLevel();var s=this.createDestNode(),r=new w(this.t,this.ac,this._localStream,s,this.i.rtcViewer);this._arrayBufferMap[t]=r,r.mixingBuffer(i,function(){e.h.soundLevelDelegate&&e.i.startSoundLevel(),n&&n()})}},t.prototype.stopMixingBuffer=function(t){if(t&&this._arrayBufferMap[t])return this.h.soundLevelDelegate&&this.i.stopSoundLevel(),this._arrayBufferMap[t].stopMixingBuffer(),delete this._arrayBufferMap[t],this.h.soundLevelDelegate&&this.i.startSoundLevel(),!0;if((0,z.TE)(t)){for(var i in this.h.soundLevelDelegate&&this.i.stopSoundLevel(),this._arrayBufferMap)this._arrayBufferMap[i].stopMixingBuffer();return this.h.soundLevelDelegate&&this.i.startSoundLevel(),!0}return this.t.warn(y+" arrayBuffer no found"),!1},t.prototype.getEffectProgress=function(t){var i=this._effectList.find(function(i){return i.effectID==t});return i?i.processor.getProcess():(this.t.error(o+" effect not found"),0)},t.prototype.seekAudioEffect=function(t,i){var n=this._effectList.find(function(i){return i.effectID==t});return n?(this.h.soundLevelDelegate&&this.i.stopSoundLevel(),n.processor.seekTo(i),this.h.soundLevelDelegate&&this.i.startSoundLevel(),!0):(this.t.error(o+" effect not found"),!1)},t.prototype.stopAudioManager=function(){this.stopMixingAudio(),this.stopMixingBuffer(),this.stopEffect()},t.prototype.createDestNode=function(){var t=null,i=this.i.createDestNode(this._localStream);return this.i.audioNodeQueue||((t=this.i.createSrcNode()).disconnect(),t.connect(i)),i},t.prototype.setMixingDelay=function(t){this._audioMixList.forEach(function(i){i.audioMix.setDelay(t)})},t}(),A=e(8866),N=e(327),S=function(t,i,n,e){return new(n||(n=Promise))(function(s,r){function u(t){try{h(e.next(t))}catch(t){r(t)}}function o(t){try{h(e.throw(t))}catch(t){r(t)}}function h(t){var i;t.done?s(t.value):(i=t.value,i instanceof n?i:new n(function(t){t(i)})).then(u,o)}h((e=e.apply(t,i||[])).next())})},M=function(t,i){var n,e,s,r,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function o(o){return function(h){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,o[0]&&(u=0)),u;)try{if(n=1,e&&(s=2&o[0]?e.return:o[0]?e.throw||((s=e.return)&&s.call(e),0):e.next)&&!(s=s.call(e,o[1])).done)return s;switch(e=0,s&&(o=[2&o[0],s.value]),o[0]){case 0:case 1:s=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,e=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(s=u.trys,(s=s.length>0&&s[s.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!s||o[1]>s[0]&&o[1]<s[3])){u.label=o[1];break}if(6===o[0]&&u.label<s[1]){u.label=s[1],s=o;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(o);break}s[2]&&u.ops.pop(),u.trys.pop();continue}o=i.call(t,u)}catch(t){o=[6,t],e=0}finally{n=s=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,h])}}},C=function(){function t(t,i,n,e,s,r){var u=this;this.t=t,this.dataReport=i,this.u=n,this.h=e,this.ac=s,this.rtcModules=r,this.buffer=null,this.blank=null,this.mixingDelay=0,(0,x.nr)()&&null==this.blank&&null==this.buffer&&(this.buffer=this.ac.createBuffer(1,1,this.ac.sampleRate),this.blank=this.ac.createBufferSource(),this.blank.buffer=this.buffer,this.blank.connect(this.ac.destination),this.blank.start()),this.rtcModules.bindListener("_engineConfigUpdate",function(t){var i=t.mixingAudioDelay+t.baseMixingAudioDelay;isNaN(i)||i===u.mixingDelay||(u.t.info("zc.am.mdu delay update:"+i+", origin:"+u.mixingDelay),u.mixingDelay=i,u.h.previewStreamList.forEach(function(t){t.audioMixManager&&t.audioMixManager.setMixingDelay(i)}))})}return t.prototype.preloadEffect=function(t,i,n){if(this.checkPreviewer(r,{effectID:t},{effectID:!0}))if(i&&(0,z.QP)(i)){if(this.u.audioEffectBuffer[t])return this.t.warn(r+" audio buffer already exists"),void(n&&n());this.t.info(r+" start preload effect"),this._preloadEffect(this.ac,t,i,n)}else this.t.error(r+" params error")},t.prototype.checkPreviewer=function(t,i,n){void 0===i&&(i={});var e=!!(null==n?void 0:n.effectID),s=!!(null==n?void 0:n.streamID),r=!!(null==n?void 0:n.previewer),u=i.effectID,o=i.streamID,h=o&&((0,z.QP)(o)?o:(0,N.L)(o,this.t));if((s||h)&&!(0,z.QP)(h)&&!(0,z.dr)(h))return this.t.error(t+" stream type error"),!1;if(e&&!u)return this.t.error(t+" effectID required"),!1;if(u&&!(0,z.QP)(u))return this.t.error(t+" effectID type error"),!1;if(r){var c=this.h.getPreviewer(h);return c||((0,z.QP)(h)?this.t.error(t+" stream is not publishing",{streamid:h}):this.t.error(t+" stream doesn't exist"),!1)}return!0},t.prototype.getEffectDuration=function(t){if(!this.checkPreviewer(o,{effectID:t},{effectID:!0}))return 0;var i=this.u.audioEffectBuffer[t];return i?i.duration?Math.floor(1e3*i.duration):0:(this.t.error(o+" effect not found"),0)},t.prototype.getEffectProgress=function(t,i){var n=this.checkPreviewer(o,{streamID:t,effectID:i},{effectID:!0,streamID:!0,previewer:!0});return(0,z.dd)(n)?0:this.getAudioManager(n).getEffectProgress(i)},t.prototype.seekAudioEffect=function(t,i,n){if(n<0)return this.t.error(o+" param time error "),!1;var e=this.checkPreviewer(o,{streamID:t,effectID:i},{effectID:!0,streamID:!0,previewer:!0});return!(0,z.dd)(e)&&this.getAudioManager(e).seekAudioEffect(i,n)},t.prototype.playEffect=function(t,i,n){return S(this,void 0,void 0,function(){var e,s,r,o,h=this;return M(this,function(c){switch(c.label){case 0:return e=(0,N.L)(t.stream,this.t)||t.streamID,s=t.path,this.checkPreviewer(u,{streamID:e,effectID:r=t.effectID},{streamID:!0,effectID:!0})?(o=this.u.audioEffectBuffer[r],s?o?(this.t.warn(u+" audio effect already exists"),[3,3]):[3,1]:[3,4]):[2];case 1:return[4,new A.l3(function(t,i){h.preloadEffect(r,s,function(n){n?(h.t.error(u+" preload audio effect failed"),i(n)):t(void 0)})})];case 2:c.sent(),c.label=3;case 3:return[3,5];case 4:if(!o)return this.t.error(u+" audio effect doesn't exists"),[2];c.label=5;case 5:return this._playEffect(t,i,n),[2]}})})},t.prototype.pauseEffect=function(t,i){var n=(0,z.QP)(t)?t:(0,N.L)(t,this.t);return this._pauseEffect(n,i)},t.prototype.resumeEffect=function(t,i){var n=(0,z.QP)(t)?t:(0,N.L)(t,this.t);return this._resumeEffect(n,i)},t.prototype.stopEffect=function(t,i){var n=(0,z.QP)(t)?t:(0,N.L)(t,this.t);return this._stopEffect(n,i)},t.prototype.unloadEffect=function(t){return!!this.checkPreviewer("zc.ue",{effectID:t},{effectID:!0})&&(delete this.u.audioEffectBuffer[t],!0)},t.prototype.setEffectVolume=function(t,i,n,e){if(!(0,z.Cs)(i)||i<0||i>200)return this.t.error(h+" volume must be a number between 0 and 200"),!1;var s=(0,z.QP)(t)?t:(0,N.L)(t,this.t),r=this.checkPreviewer(h,{streamID:s,effectID:n},{streamID:!0,previewer:!0});return!(0,z.dd)(r)&&this.getAudioManager(r).setEffectVolume(i/100,n,e)},t.prototype.startMixingAudio=function(t,i){var n=(0,z.QP)(t)?t:(0,N.L)(t,this.t);return this.t.info(c+" call "+n),n?i?(this.t.info(c+" end "+n),Array.isArray(i)&&0!==i.length&&i.every(function(t){return(0,z.Si)(t)})?this.l(n,i):(this.t.error(c+" audio list param type error"),!1)):(this.t.error(c+" no audio"),!1):(this.t.error(c+" stream not found"),!1)},t.prototype.stopMixingAudio=function(t,i){var n=(0,z.QP)(t)?t:(0,N.L)(t,this.t);return n?Array.isArray(i)&&0!==i.length||(0,z.TE)(i)?this._stopMixingAudio(n,i):(this.t.error(f+" audio param type error"),!1):(this.t.error(f+" stream not found"),!1)},t.prototype.mixingBuffer=function(t,i,n,e){var s=(0,z.QP)(t)?t:(0,N.L)(t,this.t);this.t.info(a+" call streamID: "+JSON.stringify(s)+" sourceID:"+i),s?i&&(0,z.QP)(i)?(this._mixingBuffer(s,i,n,e),this.t.info(a+" end")):this.t.error(a+" param source id format error"):this.t.error(a+" param streamid format error")},t.prototype.stopMixingBuffer=function(t,i){var n=(0,z.QP)(t)?t:(0,N.L)(t,this.t);return this._stopMixingBuffer(n,i)},t.prototype.setMixingAudioVolume=function(t,i,n){if(this.t.info(b+" call"),!t)return this.t.error(b+" stream not found"),!1;if(!(0,z.Cs)(i)||i<0||i>200)return this.t.error(b+" volume must be a number between 0 and 200"),!1;if(!n||!(0,z.Si)(n))return this.t.error(b+" no audio"),!1;var e=(0,z.QP)(t)?t:(0,N.L)(t,this.t);return this._setMixingAudioVolume(e,i,n)},t.prototype.getSoundLevel=function(t,i,n){var e="zc.gsl";(0,A.rA)(this.t,e);var s=this.h.getCloudSoundInterval();try{var r=this.h.createSoundLevel(this.ac,t,this.h.soundLevelInterval,s,function(t){i(t)});this.u.audioStreamList[t.id]={mic:r.mic,script:r.soundMeter}}catch(t){n(t)}(0,A.EK)(this.t,e)},t.prototype.stopSoundLevel=function(t){this.t.info("zc.ssl call");var i=this.u.audioStreamList[t.id];i.mic.disconnect(),i.script.destroy(),delete this.u.audioStreamList[t.id]},t.prototype._preloadEffect=function(t,i,n,e){var s=this,r=new XMLHttpRequest;r.open("GET",n,!0),r.setRequestHeader("Range","none"),r.responseType="arraybuffer",r.onload=function(){if(200==r.status||304==r.status){t.decodeAudioData(r.response,function(t){s.t.info("zc.pe.0 effect '".concat(i,"' preload success")),s.u.audioEffectBuffer[i]=t,e&&e()},function(t){s.t.error("zc.pe.0 effect '".concat(i,"' preload fail. ")+t),e&&e(t)})}else{var n=r.statusText;s.t.error("zc.pe.0 effect '".concat(i,"' preload fail.")+n),e&&e(n)}},r.send()},t.prototype._playEffect=function(t,i,n){var e=(0,N.L)(t.stream,this.t)||t.streamID,s=this.u.audioEffectBuffer[t.effectID];if(s){var r=this.checkPreviewer(u,{streamID:e,effectID:t.effectID},{streamID:!0,effectID:!0,previewer:!0});(0,z.dd)(r)||this.getAudioManager(r).playEffect(t,s,i,n)}else this.t.error(u+" no audio buffer found")},t.prototype._pauseEffect=function(t,i){var n=this.checkPreviewer("zc.pe.2",{streamID:t,effectID:i},{streamID:!0,previewer:!0});return!(0,z.dd)(n)&&this.getAudioManager(n).pauseEffect(i)},t.prototype._resumeEffect=function(t,i){var n=this.checkPreviewer("zc.re",{streamID:t,effectID:i},{streamID:!0,previewer:!0});return!(0,z.dd)(n)&&this.getAudioManager(n).resumeEffect(i)},t.prototype._stopEffect=function(t,i){var n=this.checkPreviewer("zc.se",{streamID:t,effectID:i},{streamID:!0,previewer:!0});return!(0,z.dd)(n)&&this.getAudioManager(n).stopEffect(i)},t.prototype._setMixingAudioVolume=function(t,i,n){var e=this.h.getPreviewer(t);return e?this.getAudioManager(e).setMixingAudioVolume(i/100,n):(this.t.error("zc.sma.2 publisher doesn't exist"),!1)},t.prototype.l=function(t,i){var n=this.h.getPreviewer(t);return n?this.getAudioManager(n).startMixingAudio(i):((0,z.QP)(t)?this.t.error("zc.sma.0 "+t+" stream is not publishing"):this.t.error("zc.sma.0 stream doesn't exist"),!1)},t.prototype._stopMixingAudio=function(t,i){var n=this.h.getPreviewer(t);return n?this.getAudioManager(n).stopMixingAudio(i):(this.t.error("zc.sma.0 stream doesn't exist"),!1)},t.prototype._mixingBuffer=function(t,i,n,e){var s=this.checkPreviewer(l,{streamID:t,effectID:i},{effectID:!0,streamID:!0,previewer:!0});(0,z.dd)(s)||((0,z.SY)(n)?this.getAudioManager(s).mixingBuffer(i,n,e):this.t.error("zc.mb.0 array buffer not found"))},t.prototype._stopMixingBuffer=function(t,i){var n=this.checkPreviewer(l,{streamID:t,effectID:i},{effectID:!0,streamID:!0,previewer:!0});return!(0,z.dd)(n)&&this.getAudioManager(n).stopMixingBuffer(i)},t.prototype.getAudioManager=function(t){var i=t.audioMixManager;return i||(i=new O(t),1===this.u.engineConfig.choirRole&&i.setVolumeFactor(.6),t.audioMixManager=i),i},t}(),E={type:"AudioMix",install:function(t){Object.defineProperty(t.prototype,"initAudioMix",{value:function(){this.audioMixModule=new C(this.logger,this.dataReport,this.stateCenter,this.streamCenter,this.ac,this)}})}};return s}()});