Socket
Socket
Sign inDemoInstall

@ng-web-apis/audio

Package Overview
Dependencies
4
Maintainers
4
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.0 to 1.5.1

2

bundles/ng-web-apis-audio.umd.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("rxjs"),require("rxjs/operators"),require("@angular/core")):"function"==typeof define&&define.amd?define("@ng-web-apis/audio",["exports","rxjs","rxjs/operators","@angular/core"],t):t((e["ng-web-apis"]=e["ng-web-apis"]||{},e["ng-web-apis"].audio={}),e.rxjs,e.rxjs.operators,e.ng.core)}(this,function(e,i,s,c){"use strict";function a(e,t,r){void 0===r&&(r=0),e.cancelAndHoldAtTime?e.cancelAndHoldAtTime(r):(e.cancelScheduledValues(r),e.setValueAtTime(p(e.value),r)),"number"!=typeof t?t instanceof Array?function o(t,e,r){e.forEach(function(e){"mode"in e?n(t,e,r):t.setValueCurveAtTime(e.value,r,e.duration),r+=e.duration})}(e,t,r):"mode"in t?(e.setValueAtTime(p(e.value),r),n(e,t,r)):e.setValueCurveAtTime(t.value,r,t.duration):e.setValueAtTime(p(t),r)}function n(e,t,r){var o=t.value,n=t.mode,a=void 0===n?"instant":n,i=t.duration;switch(a){case"instant":e.setValueAtTime(p(o),r),e.setValueAtTime(p(o),r+i);break;case"exponential":o<0||o*e.value<0?e.linearRampToValueAtTime(p(o),r+i):e.exponentialRampToValueAtTime(p(o),r+i),e.setValueAtTime(p(o),r+i);break;case"linear":e.linearRampToValueAtTime(p(o),r+i)}}function p(e){return e||1e-8}function t(n){void 0===n&&(n="");return function(r,o){Object.defineProperty(r,o,{set:function(e){e="string"==typeof e?Number.parseFloat(e):e;var t=this instanceof AudioWorkletNode?this.parameters.get(o):this[n];t instanceof AudioParam?a(t,e,this.context.currentTime):Object.defineProperty(r,o,{value:e})}})}}var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function r(e,t){function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function u(e,t,r,o){var n,a=arguments.length,i=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;0<=s;s--)(n=e[s])&&(i=(a<3?n(i):3<a?n(t,r,i):n(t,r))||i);return 3<a&&i&&Object.defineProperty(t,r,i),i}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}var y=new c.InjectionToken("Web Audio API context",{providedIn:"root",factory:function(){return new AudioContext}});var f,l=(r(g,f=AudioContext),g.prototype.ngOnDestroy=function(){this.close()},g.decorators=[{type:c.Directive,args:[{selector:"[waAudioContext]",providers:[{provide:y,useExisting:c.forwardRef(function(){return g})}]}]}],g.ctorParameters=function(){return[{type:undefined,decorators:[{type:c.Attribute,args:["latencyHint"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["sampleRate"]}]}]},g);function g(e,t){return f.call(this,{latencyHint:function r(e){return null===e?undefined:Number.parseFloat(e)||e}(e),sampleRate:parseInt(t||"",10)||undefined})||this}var h,m=new c.InjectionToken("Tests if constructor mode of node creation is supported or a fallback to factory method is needed",{providedIn:"root",factory:function(){try{return!!new GainNode(c.inject(y))}catch(e){return!1}}}),v=(r(b,h=GainNode),b.prototype.ngOnDestroy=function(){this.disconnect()},b.decorators=[{type:c.Directive,args:[{selector:"[waChannel]",exportAs:"AudioNode"}]}],b.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},b);function b(e,t){if(t)return h.call(this,e)||this;var r=e.createGain();return Object.setPrototypeOf(r,b.prototype),r}var A=new c.InjectionToken("Web Audio API audio node",{factory:function(){return null}});function P(e,t){e&&t&&e.connect(t)}var O,I=(r(j,O=AnalyserNode),j.prototype.ngOnDestroy=function(){this.disconnect()},j.prototype.isSilent=function(e){return Math.abs(e.reduce(function(e,t){return e+t},0))<.001},j.init=function(t,e){P(e,t),t.fftSize=256,t.connect(t.context.destination),t.quiet=i.interval(100).pipe(s.mapTo(new Float32Array(t.fftSize)),s.tap(function(e){return t.getFloatTimeDomainData(e)}),s.map(function(e){return t.isSilent(e)}),s.distinctUntilChanged(),s.skipWhile(function(e){return e}),s.debounceTime(5e3),s.filter(function(e){return e}))},j.decorators=[{type:c.Directive,args:[{selector:"[waAudioDestinationNode]",exportAs:"AudioNode"}]}],j.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},j.propDecorators={quiet:[{type:c.Output}]},j);function j(e,t,r){var o=this;if(r)return o=O.call(this,e)||this,j.init(o,t),o;var n=e.createAnalyser();return Object.setPrototypeOf(n,j.prototype),j.init(n,t),n}function w(e){if(!e)return 0;if("number"==typeof e)return e;if(e instanceof Array){var t=e[e.length-1].value;return"number"==typeof t?t:t[t.length-1]}return e.value instanceof Array?e.value[e.value.length-1]:e.value}var C,S=(r(x,C=GainNode),Object.defineProperty(x.prototype,"forwardX",{get:function(){return this.context.listener.forwardX},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"forwardY",{get:function(){return this.context.listener.forwardY},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"forwardZ",{get:function(){return this.context.listener.forwardZ},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"positionX",{get:function(){return this.context.listener.positionX},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"positionY",{get:function(){return this.context.listener.positionY},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"positionZ",{get:function(){return this.context.listener.positionZ},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"upX",{get:function(){return this.context.listener.upX},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"upY",{get:function(){return this.context.listener.upY},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"upZ",{get:function(){return this.context.listener.upZ},enumerable:!0,configurable:!0}),x.prototype.ngOnChanges=function(){this.context.listener.positionX instanceof AudioParam||(this.context.listener.setOrientation(w(this.forwardXParam),w(this.forwardYParam),w(this.forwardZParam),w(this.upXParam),w(this.upYParam),w(this.upZParam)),this.context.listener.setPosition(w(this.positionXParam),w(this.positionYParam),w(this.positionZParam)))},x.decorators=[{type:c.Directive,args:[{selector:"[waAudioContext],[waOfflineAudioContext][length][sampleRate]"}]}],x.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Self},{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},x.propDecorators={forwardXParam:[{type:c.Input,args:["forwardX"]}],forwardYParam:[{type:c.Input,args:["forwardY"]}],forwardZParam:[{type:c.Input,args:["forwardZ"]}],positionXParam:[{type:c.Input,args:["positionX"]}],positionYParam:[{type:c.Input,args:["positionY"]}],positionZParam:[{type:c.Input,args:["positionZ"]}],upXParam:[{type:c.Input,args:["upX"]}],upYParam:[{type:c.Input,args:["upY"]}],upZParam:[{type:c.Input,args:["upZ"]}]},u([t("forwardX"),d("design:type",Object)],x.prototype,"forwardXParam",void 0),u([t("forwardY"),d("design:type",Object)],x.prototype,"forwardYParam",void 0),u([t("forwardZ"),d("design:type",Object)],x.prototype,"forwardZParam",void 0),u([t("positionX"),d("design:type",Object)],x.prototype,"positionXParam",void 0),u([t("positionY"),d("design:type",Object)],x.prototype,"positionYParam",void 0),u([t("positionZ"),d("design:type",Object)],x.prototype,"positionZParam",void 0),u([t("upX"),d("design:type",Object)],x.prototype,"upXParam",void 0),u([t("upY"),d("design:type",Object)],x.prototype,"upYParam",void 0),u([t("upZ"),d("design:type",Object)],x.prototype,"upZParam",void 0),x);function x(e,t){if(t)return C.call(this,e)||this;var r=e.createGain();return Object.setPrototypeOf(r,x.prototype),r}var D,N=(r(k,D=OfflineAudioContext),k.decorators=[{type:c.Directive,args:[{selector:"[waOfflineAudioContext][length][sampleRate]",providers:[{provide:y,useExisting:c.forwardRef(function(){return k})}]}]}],k.ctorParameters=function(){return[{type:String,decorators:[{type:c.Attribute,args:["length"]}]},{type:String,decorators:[{type:c.Attribute,args:["sampleRate"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["numberOfChannels"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["autoplay"]}]}]},k.propDecorators={complete:[{type:c.Output}]},k);function k(e,t,r,o){var n=D.call(this,parseInt(r||"",10)||1,parseInt(e,10),parseInt(t,10))||this;return n.complete=new c.EventEmitter,n.oncomplete=function(e){var t=e.renderedBuffer;return n.complete.emit(t)},null!==o&&n.startRendering(),n}var T,B=(r(E,T=GainNode),Object.defineProperty(E.prototype,"waOutput",{set:function(e){this.disconnect(),P(this,e)},enumerable:!0,configurable:!0}),E.prototype.ngOnDestroy=function(){this.disconnect()},E.init=function(e,t){P(t,e)},E.decorators=[{type:c.Directive,args:[{selector:"[waOutput]"}]}],E.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},E.propDecorators={waOutput:[{type:c.Input}]},E);function E(e,t,r){var o=this;if(r)return P(t,o=T.call(this,e)||this),o;var n=e.createGain();return Object.setPrototypeOf(n,E.prototype),P(t,n),n}var R,M=(r(W,R=MediaStreamAudioDestinationNode),W.decorators=[{type:c.Directive,args:[{selector:"[waMediaStreamAudioDestinationNode]",exportAs:"AudioNode"}]}],W.ctorParameters=function(){return[{type:AudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},W);function W(e,t,r){var o=this;if(r)return P(t,o=R.call(this,e)||this),o;var n=e.createMediaStreamDestination();return Object.setPrototypeOf(n,W.prototype),P(t,n),n}function q(e,t){var r=parseFloat(e||"");return isNaN(r)?t:r}var F,X=(r(Y,F=AnalyserNode),Y.prototype.ngOnDestroy=function(){this.disconnect()},Y.init=function(e,t){P(t,e);var r=new Uint8Array(e.frequencyBinCount),o=new Float32Array(e.frequencyBinCount),n=new Uint8Array(e.fftSize),a=new Float32Array(e.fftSize);e.frequencyByte$=i.interval(0,i.animationFrameScheduler).pipe(s.map(function(){return r.length!==e.frequencyBinCount&&(r=new Uint8Array(e.frequencyBinCount)),e.getByteFrequencyData(r),r}),s.share()),e.frequencyFloat$=i.interval(0,i.animationFrameScheduler).pipe(s.map(function(){return o.length!==e.frequencyBinCount&&(o=new Float32Array(e.frequencyBinCount)),e.getFloatFrequencyData(o),o}),s.share()),e.timeByte$=i.interval(0,i.animationFrameScheduler).pipe(s.map(function(){return n.length!==e.fftSize&&(n=new Uint8Array(e.frequencyBinCount)),e.getByteTimeDomainData(n),n}),s.share()),e.timeFloat$=i.interval(0,i.animationFrameScheduler).pipe(s.map(function(){return a.length!==e.fftSize&&(a=new Float32Array(e.frequencyBinCount)),e.getFloatTimeDomainData(a),a}),s.share())},Y.decorators=[{type:c.Directive,args:[{selector:"[waAnalyserNode]",exportAs:"AudioNode",inputs:["fftSize","minDecibels","maxDecibels","smoothingTimeConstant","channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return Y})}]}]}],Y.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.Attribute,args:["fftSize"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["maxDecibels"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["minDecibels"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["smoothingTimeConstant"]}]}]},Y.propDecorators={frequencyByte$:[{type:c.Output}],frequencyFloat$:[{type:c.Output}],timeByte$:[{type:c.Output}],timeFloat$:[{type:c.Output}]},Y);function Y(e,t,r,o,n,a,i){var s=this,c=q(o,2048),p=q(n,-30),u=q(a,-100),d=q(i,.8);if(r)return s=F.call(this,e,{fftSize:c,maxDecibels:p,minDecibels:u,smoothingTimeConstant:d})||this,Y.init(s,t),s;var y=e.createAnalyser();return Object.setPrototypeOf(y,Y.prototype),Y.init(y,t),y.fftSize=c,y.maxDecibels=p,y.minDecibels=u,y.smoothingTimeConstant=d,y}var Z,_=(r($,Z=BiquadFilterNode),$.prototype.ngOnDestroy=function(){this.disconnect()},$.init=function(e,t){P(t,e)},$.decorators=[{type:c.Directive,args:[{selector:"[waBiquadFilterNode]",exportAs:"AudioNode",inputs:["type","channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return $})}]}]}],$.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:undefined,decorators:[{type:c.Attribute,args:["detune"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["frequency"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["gain"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["Q"]}]}]},$.propDecorators={detuneParam:[{type:c.Input,args:["detune"]}],frequencyParam:[{type:c.Input,args:["frequency"]}],gainParam:[{type:c.Input,args:["gain"]}],qParam:[{type:c.Input,args:["Q"]}]},u([t("detune"),d("design:type",Object)],$.prototype,"detuneParam",void 0),u([t("frequency"),d("design:type",Object)],$.prototype,"frequencyParam",void 0),u([t("gain"),d("design:type",Object)],$.prototype,"gainParam",void 0),u([t("Q"),d("design:type",Object)],$.prototype,"qParam",void 0),$);function $(e,t,r,o,n,a,i){var s=this,c=q(o,0),p=q(n,350),u=q(a,0),d=q(i,1);if(t)return P(r,s=Z.call(this,e,{detune:c,frequency:p,gain:u,Q:d})||this),s;var y=e.createBiquadFilter();return Object.setPrototypeOf(y,$.prototype),y.detune.value=c,y.frequency.value=p,y.gain.value=u,y.Q.value=d,P(r,y),y}var z,G=(r(U,z=ChannelMergerNode),Object.defineProperty(U.prototype,"channels",{set:function(e){var r=this;e.forEach(function(e,t){e.connect(r,0,t)})},enumerable:!0,configurable:!0}),U.prototype.ngOnDestroy=function(){this.disconnect()},U.decorators=[{type:c.Directive,args:[{selector:"[waChannelMergerNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return U})}]}]}],U.ctorParameters=function(){return[{type:undefined,decorators:[{type:c.Attribute,args:["numberOfInputs"]}]},{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},U.propDecorators={channels:[{type:c.ContentChildren,args:[v,{descendants:!1}]}]},U);function U(e,t,r){var o=parseInt(e||"",10)||6;if(r)return z.call(this,t,{numberOfInputs:o})||this;var n=t.createChannelMerger(o);return Object.setPrototypeOf(n,U.prototype),n}var V,H=(r(K,V=ChannelSplitterNode),Object.defineProperty(K.prototype,"channels",{set:function(e){var r=this;this.disconnect(),e.filter(function(e){return!!e}).forEach(function(e,t){r.connect(e,t)})},enumerable:!0,configurable:!0}),K.prototype.ngOnDestroy=function(){this.disconnect()},K.decorators=[{type:c.Directive,args:[{selector:"[waChannelSplitterNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useValue:null}]}]}],K.ctorParameters=function(){return[{type:undefined,decorators:[{type:c.Attribute,args:["numberOfOutputs"]}]},{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},K.propDecorators={channels:[{type:c.ContentChildren,args:[A,{descendants:!1}]}]},K);function K(e,t,r,o){var n=this,a=parseInt(e||"",10)||6;if(o)return P(r,n=V.call(this,t,{numberOfOutputs:a})||this),n;var i=t.createChannelSplitter(a);return Object.setPrototypeOf(i,K.prototype),P(r,i),i}var L=(Q.prototype.fetch=function(o){var n=this;return new Promise(function(t,e){if(n.cache.has(o))t(n.cache.get(o));else{var r=new XMLHttpRequest;r.open("GET",o,!0),r.responseType="arraybuffer",r.onerror=e,r.onabort=e,r.onload=function(){n.context.decodeAudioData(r.response,function(e){n.cache.set(o,e),t(e)},e)},r.send()}})},Q.decorators=[{type:c.Injectable,args:[{providedIn:"root"}]}],Q.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]}]},Q.ngInjectableDef=c.defineInjectable({factory:function(){return new Q(c.inject(y))},token:Q,providedIn:"root"}),Q);function Q(e){this.context=e,this.cache=new Map}var J,ee=(r(te,J=ConvolverNode),Object.defineProperty(te.prototype,"bufferSetter",{set:function(e){this.buffer$.next(e)},enumerable:!0,configurable:!0}),te.prototype.ngOnDestroy=function(){this.buffer$.complete(),this.disconnect()},te.init=function(t,e,r){P(e,t),t.buffer$=new i.Subject,t.buffer$.pipe(s.switchMap(function(e){return"string"==typeof e?r.fetch(e):i.of(e)})).subscribe(function(e){t.buffer=e})},te.decorators=[{type:c.Directive,args:[{selector:"[waConvolverNode]",exportAs:"AudioNode",inputs:["normalize","channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return te})}]}]}],te.ctorParameters=function(){return[{type:L,decorators:[{type:c.Inject,args:[L]}]},{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},te.propDecorators={bufferSetter:[{type:c.Input,args:["buffer"]}]},te);function te(e,t,r,o){var n=this;if(o)return n=J.call(this,t)||this,te.init(n,r,e),n;var a=t.createConvolver();return Object.setPrototypeOf(a,te.prototype),te.init(a,r,e),a}var re,oe=(r(ne,re=DelayNode),ne.prototype.ngOnDestroy=function(){this.disconnect()},ne.init=function(e,t){P(t,e)},ne.decorators=[{type:c.Directive,args:[{selector:"[waDelayNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return ne})}]}]}],ne.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.Attribute,args:["delayTime"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["maxDelayTime"]}]}]},ne.propDecorators={delayTimeParam:[{type:c.Input,args:["delayTime"]}]},u([t("delayTime"),d("design:type",Object)],ne.prototype,"delayTimeParam",void 0),ne);function ne(e,t,r,o,n){var a=this,i=q(o,0),s=q(n,1);if(r)return P(t,a=re.call(this,e,{delayTime:i,maxDelayTime:s})||this),a;var c=e.createDelay(s);return Object.setPrototypeOf(c,ne.prototype),P(t,c),c.delayTime.value=i,c}var ae,ie=(r(se,ae=DynamicsCompressorNode),se.prototype.ngOnDestroy=function(){this.disconnect()},se.decorators=[{type:c.Directive,args:[{selector:"[waDynamicsCompressorNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return se})}]}]}],se.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.Attribute,args:["attack"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["knee"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["ratio"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["release"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["threshold"]}]}]},se.propDecorators={attackParam:[{type:c.Input,args:["attack"]}],kneeParam:[{type:c.Input,args:["knee"]}],ratioParam:[{type:c.Input,args:["ratio"]}],releaseParam:[{type:c.Input,args:["release"]}],thresholdParam:[{type:c.Input,args:["threshold"]}]},u([t("attack"),d("design:type",Object)],se.prototype,"attackParam",void 0),u([t("knee"),d("design:type",Object)],se.prototype,"kneeParam",void 0),u([t("ratio"),d("design:type",Object)],se.prototype,"ratioParam",void 0),u([t("release"),d("design:type",Object)],se.prototype,"releaseParam",void 0),u([t("threshold"),d("design:type",Object)],se.prototype,"thresholdParam",void 0),se);function se(e,t,r,o,n,a,i,s){var c=this,p=q(o,.003),u=q(n,30),d=q(a,12),y=q(i,.25),f=q(s,-24);if(r)return P(t,c=ae.call(this,e,{attack:p,knee:u,ratio:d,release:y,threshold:f})||this),c;var l=e.createDynamicsCompressor();return Object.setPrototypeOf(l,se.prototype),P(t,l),l.attack.value=p,l.knee.value=u,l.ratio.value=d,l.release.value=y,l.threshold.value=f,l}var ce,pe=(r(ue,ce=GainNode),ue.prototype.ngOnDestroy=function(){this.disconnect()},ue.decorators=[{type:c.Directive,args:[{selector:"[waGainNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return ue})}]}]}],ue.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.Attribute,args:["gain"]}]}]},ue.propDecorators={gainParam:[{type:c.Input,args:["gain"]}]},u([t("gain"),d("design:type",Object)],ue.prototype,"gainParam",void 0),ue);function ue(e,t,r,o){var n=this,a=q(o,1);if(r)return P(t,n=ce.call(this,e,{gain:a})||this),n;var i=e.createGain();return Object.setPrototypeOf(i,ue.prototype),P(t,i),i.gain.value=a,i}var de,ye=new c.InjectionToken("A sequence of feedback coefficients for IIRFilterNode"),fe=new c.InjectionToken("A sequence of feedforward coefficients for IIRFilterNode"),le=(r(ge,de=IIRFilterNode),ge.prototype.ngOnDestroy=function(){this.disconnect()},ge.decorators=[{type:c.Directive,args:[{selector:"[waIIRFilterNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return ge})}]}]}],ge.ctorParameters=function(){return[{type:Array,decorators:[{type:c.Inject,args:[ye]}]},{type:Array,decorators:[{type:c.Inject,args:[fe]}]},{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]}]},ge);function ge(e,t,r,o,n){var a=this;if(o)return P(n,a=de.call(this,r,{feedback:e,feedforward:t})||this),a;var i=r.createIIRFilter(e,t);return Object.setPrototypeOf(i,ge.prototype),P(n,i),i}var he,me=(r(ve,he=PannerNode),ve.prototype.ngOnChanges=function(){this.positionX instanceof AudioParam||(this.setOrientation(w(this.orientationXParam),w(this.orientationYParam),w(this.orientationZParam)),this.setPosition(w(this.positionXParam),w(this.positionYParam),w(this.positionZParam)))},ve.prototype.ngOnDestroy=function(){this.disconnect()},ve.decorators=[{type:c.Directive,args:[{selector:"[waPannerNode]",exportAs:"AudioNode",inputs:["coneInnerAngle","coneOuterAngle","coneOuterGain","distanceModel","maxDistance","panningModel","refDistance","rolloffFactor","channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return ve})}]}]}],ve.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},ve.propDecorators={orientationXParam:[{type:c.Input}],orientationYParam:[{type:c.Input}],orientationZParam:[{type:c.Input}],positionXParam:[{type:c.Input}],positionYParam:[{type:c.Input}],positionZParam:[{type:c.Input}]},u([t("orientationX"),d("design:type",Object)],ve.prototype,"orientationXParam",void 0),u([t("orientationY"),d("design:type",Object)],ve.prototype,"orientationYParam",void 0),u([t("orientationZ"),d("design:type",Object)],ve.prototype,"orientationZParam",void 0),u([t("positionX"),d("design:type",Object)],ve.prototype,"positionXParam",void 0),u([t("positionY"),d("design:type",Object)],ve.prototype,"positionYParam",void 0),u([t("positionZ"),d("design:type",Object)],ve.prototype,"positionZParam",void 0),ve);function ve(e,t,r){var o=this;if(r)return P(t,o=he.call(this,e)||this),o;var n=e.createPanner();return Object.setPrototypeOf(n,ve.prototype),P(t,n),n}var be,Ae=(r(Pe,be=ScriptProcessorNode),Pe.prototype.ngOnDestroy=function(){this.disconnect()},Pe.decorators=[{type:c.Directive,args:[{selector:"[waScriptProcessorNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return Pe})}]}]}],Pe.ctorParameters=function(){return[{type:undefined,decorators:[{type:c.Attribute,args:["bufferSize"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["numberOfInputChannels"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["numberOfOutputChannels"]}]},{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]}]},Pe.propDecorators={audioprocess:[{type:c.Output}]},Pe);function Pe(e,t,r,o,n){try{var a=o.createScriptProcessor(parseInt(e||"",10)||0,parseInt(t||"",10)||2,parseInt(r||"",10)||2);Object.setPrototypeOf(a,Pe.prototype),P(n,a);var i=new c.EventEmitter;return a.audioprocess=i,a.onaudioprocess=function(e){return i.emit(e)},a}catch(s){}return be.call(this)||this}var Oe,Ie=(r(je,Oe=StereoPannerNode),Object.defineProperty(je.prototype,"panParam",{set:function(e){"setPosition"in this?this.fallbackToPannerNode(w(e)):a(this.pan,e,this.context.currentTime)},enumerable:!0,configurable:!0}),je.prototype.ngOnDestroy=function(){this.disconnect()},je.prototype.fallbackToPannerNode=function(e){var t=100*e,r=0<t?270-t:90+t,o=Math.sin(t*(Math.PI/180)),n=Math.sin(r*(Math.PI/180));this.setPosition(o,0,n)},je.decorators=[{type:c.Directive,args:[{selector:"[waStereoPannerNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return je})}]}]}],je.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:undefined,decorators:[{type:c.Attribute,args:["pan"]}]}]},je.propDecorators={panParam:[{type:c.Input,args:["pan"]}]},je);function je(e,t,r){var o,n=q(r,0);try{new StereoPannerNode(e)}catch(i){var a=e.createPanner();return Object.setPrototypeOf(a,je.prototype),a.fallbackToPannerNode(w(n)),P(t,a),a}return P(t,o=Oe.call(this,e,{pan:n})||this),o}var we,Ce=(r(Se,we=WaveShaperNode),Se.prototype.ngOnDestroy=function(){this.disconnect()},Se.decorators=[{type:c.Directive,args:[{selector:"[waWaveShaperNode]",exportAs:"AudioNode",inputs:["oversample","curve","channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return Se})}]}]}],Se.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},Se);function Se(e,t,r){var o=this;if(r)return P(t,o=we.call(this,e)||this),o;var n=e.createWaveShaper();return Object.setPrototypeOf(n,Se.prototype),P(t,n),n}var xe,De=(r(Ne,xe=AudioWorkletNode),Ne.prototype.ngOnDestroy=function(){this.disconnect()},Ne.decorators=[{type:c.Directive,args:[{selector:"[waAudioWorkletNode][name]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return Ne})}]}]}],Ne.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:String,decorators:[{type:c.Attribute,args:["name"]}]}]},Ne.propDecorators={processorerror:[{type:c.Output}]},Ne);function Ne(e,t,r){var o=xe.call(this,e,r)||this;return o.processorerror=new c.EventEmitter,o.onprocessorerror=function(){return o.processorerror.emit()},P(t,o),o}var ke=(Te.prototype.transform=function(e,t,r){return void 0===r&&(r="exponential"),e instanceof Array?{value:e,duration:t}:{value:e,duration:t,mode:r}},Te.decorators=[{type:c.Pipe,args:[{name:"waAudioParam"}]}],Te);function Te(){}var Be=(Ee.prototype.transform=function(e,t,r){return this.context.createPeriodicWave(new Float32Array(e),t?new Float32Array(t):new Float32Array(e.length),{disableNormalization:!!r})},Ee.decorators=[{type:c.Pipe,args:[{name:"waPeriodicWave"}]}],Ee.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]}]},Ee);function Ee(e){this.context=e}var Re,Me=(r(We,Re=AudioBufferSourceNode),Object.defineProperty(We.prototype,"bufferSetter",{set:function(e){this.buffer$.next(e)},enumerable:!0,configurable:!0}),We.prototype.ngOnDestroy=function(){this.buffer$.complete();try{this.stop()}catch(e){}this.disconnect()},We.init=function(t,e,r,o){null!==r&&t.start();var n=new c.EventEmitter;t.ended=n,t.onended=function(){return n.emit()},t.buffer$=new i.Subject,t.buffer$.pipe(s.switchMap(function(e){return"string"==typeof e?o.fetch(e):i.of(e)})).subscribe(function(e){t.buffer=e})},We.decorators=[{type:c.Directive,args:[{selector:"[waAudioBufferSourceNode]",exportAs:"AudioNode",inputs:["loop","loopStart","loopEnd","channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return We})}]}]}],We.ctorParameters=function(){return[{type:L,decorators:[{type:c.Inject,args:[L]}]},{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.Attribute,args:["autoplay"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["detune"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["playbackRate"]}]}]},We.propDecorators={bufferSetter:[{type:c.Input,args:["buffer"]}],detuneParam:[{type:c.Input,args:["detune"]}],playbackRateParam:[{type:c.Input,args:["playbackRate"]}],ended:[{type:c.Output}]},u([t("detune"),d("design:type",Object)],We.prototype,"detuneParam",void 0),u([t("playbackRate"),d("design:type",Object)],We.prototype,"playbackRateParam",void 0),We);function We(e,t,r,o,n,a){var i=this,s=q(n,0),c=q(a,1);if(r)return i=Re.call(this,t,{detune:s,playbackRate:c})||this,We.init(i,null,o,e),i;var p=t.createBufferSource();return Object.setPrototypeOf(We.prototype,Object.getPrototypeOf(p)),Object.setPrototypeOf(p,We.prototype),p.playbackRate.value=c,We.init(p,null,o,e),p}var qe,Fe=(r(Xe,qe=ConstantSourceNode),Xe.prototype.ngOnDestroy=function(){try{this.stop()}catch(e){}this.disconnect()},Xe.decorators=[{type:c.Directive,args:[{selector:"[waConstantSourceNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return Xe})}]}]}],Xe.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.Attribute,args:["autoplay"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["offset"]}]}]},Xe.propDecorators={offsetParam:[{type:c.Input,args:["offset"]}],ended:[{type:c.Output}]},u([t("offset"),d("design:type",Object)],Xe.prototype,"offsetParam",void 0),Xe);function Xe(e,t,r){var o=qe.call(this,e,{offset:q(r,0)})||this;return o.ended=new c.EventEmitter,o.onended=function(){return o.ended.emit()},null!==t&&o.start(),o}var Ye,Ze=(r(_e,Ye=MediaElementAudioSourceNode),_e.prototype.ngOnDestroy=function(){this.disconnect()},_e.decorators=[{type:c.Directive,args:[{selector:"audio[waMediaElementAudioSourceNode], video[waMediaElementAudioSourceNode]",exportAs:"AudioNode",providers:[{provide:A,useExisting:c.forwardRef(function(){return _e})}]}]}],_e.ctorParameters=function(){return[{type:AudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:c.ElementRef,decorators:[{type:c.Inject,args:[c.ElementRef]}]}]},_e);function _e(e,t,r){var o=r.nativeElement;if(t)return Ye.call(this,e,{mediaElement:o})||this;var n=e.createMediaElementSource(o);return Object.setPrototypeOf(n,_e.prototype),n}var $e,ze=new c.InjectionToken("MediaStream for MediaStreamAudioSourceNode"),Ge=(r(Ue,$e=MediaStreamAudioSourceNode),Ue.prototype.ngOnDestroy=function(){this.disconnect()},Ue.decorators=[{type:c.Directive,args:[{selector:"[waMediaStreamAudioSourceNode]",exportAs:"AudioNode",providers:[{provide:A,useExisting:c.forwardRef(function(){return Ue})}]}]}],Ue.ctorParameters=function(){return[{type:MediaStream,decorators:[{type:c.Inject,args:[ze]}]},{type:AudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},Ue);function Ue(e,t,r){if(r)return $e.call(this,t,{mediaStream:e})||this;var o=t.createMediaStreamSource(e);return Object.setPrototypeOf(o,Ue.prototype),o}var Ve,He=new c.InjectionToken("MediaStreamTrack for MediaStreamTrackAudioSourceNode"),Ke=(r(Le,Ve=MediaStreamTrackAudioSourceNode),Le.prototype.ngOnDestroy=function(){this.disconnect()},Le.decorators=[{type:c.Directive,args:[{selector:"[waMediaStreamTrackAudioSourceNode]",exportAs:"AudioNode",providers:[{provide:A,useExisting:c.forwardRef(function(){return Le})}]}]}],Le.ctorParameters=function(){return[{type:MediaStreamTrack,decorators:[{type:c.Inject,args:[He]}]},{type:AudioContext,decorators:[{type:c.Inject,args:[y]}]}]},Le);function Le(e,t){return Ve.call(this,t,{mediaStreamTrack:e})||this}var Qe,Je=(r(et,Qe=OscillatorNode),Object.defineProperty(et.prototype,"periodicWave",{set:function(e){this.setPeriodicWave(e)},enumerable:!0,configurable:!0}),et.prototype.ngOnDestroy=function(){try{this.stop()}catch(e){}this.disconnect()},et.init=function(e,t,r){P(t,e),null!==r&&e.start();var o=new c.EventEmitter;e.ended=o,e.onended=function(){return o.emit()}},et.decorators=[{type:c.Directive,args:[{selector:"[waOscillatorNode]",exportAs:"AudioNode",inputs:["type","channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return et})}]}]}],et.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.Attribute,args:["autoplay"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["detune"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["frequency"]}]}]},et.propDecorators={periodicWave:[{type:c.Input}],detuneParam:[{type:c.Input,args:["detune"]}],frequencyParam:[{type:c.Input,args:["frequency"]}],ended:[{type:c.Output}]},u([t("detune"),d("design:type",Object)],et.prototype,"detuneParam",void 0),u([t("frequency"),d("design:type",Object)],et.prototype,"frequencyParam",void 0),et);function et(e,t,r,o,n){var a=this,i=q(o,0),s=q(n,440);if(t)return a=Qe.call(this,e,{detune:i,frequency:s})||this,et.init(a,null,r),a;var c=e.createOscillator();return Object.setPrototypeOf(et.prototype,Object.getPrototypeOf(c)),Object.setPrototypeOf(c,et.prototype),c.detune.value=i,c.frequency.value=s,et.init(c,null,r),c}var tt=new c.InjectionToken("Web Audio API worklet processors paths",{providedIn:"root",factory:function(){return[]}}),rt=new c.InjectionToken("AudioWorklet browser support",{factory:function(){return!!c.inject(y).audioWorklet}}),ot=new c.InjectionToken("Web Audio API worklet processors resolution promise",{providedIn:"root",factory:function(){var t=c.inject(y),e=c.inject(tt);return c.inject(rt)?Promise.all(e.map(function(e){return t.audioWorklet.addModule(e)})).then(function(){return!0}):Promise.reject("AudioWorklet is not supported")}}),nt=new c.InjectionToken("Web Audio API support",{providedIn:"root",factory:function(){return!!AudioContext}}),at=(it.decorators=[{type:c.NgModule,args:[{declarations:[l,v,I,S,N,B,M,Me,Fe,Ze,Ge,Ke,Je,X,_,H,G,ee,oe,ie,pe,le,me,Ae,Ie,Ce,De,ke,Be],exports:[l,v,I,S,N,B,M,Me,Fe,Ze,Ge,Ke,Je,X,_,H,G,ee,oe,ie,pe,le,me,Ae,Ie,Ce,De,ke,Be]}]}],it);function it(){}e.audioParam=t,e.WebAudioContext=l,e.WebAudioChannel=v,e.WebAudioDestination=I,e.WebAudioListener=S,e.WebAudioOfflineContext=N,e.WebAudioOutput=B,e.WebAudioMediaStreamDestination=M,e.WebAudioAnalyser=X,e.WebAudioBiquadFilter=_,e.WebAudioChannelMerger=G,e.WebAudioChannelSplitter=H,e.WebAudioConvolver=ee,e.WebAudioDelay=oe,e.WebAudioDynamicsCompressor=ie,e.WebAudioGain=pe,e.WebAudioIIRFilter=le,e.WebAudioPanner=me,e.WebAudioScriptProcessor=Ae,e.WebAudioStereoPanner=Ie,e.WebAudioWaveShaper=Ce,e.WebAudioWorklet=De,e.WebAudioParamPipe=ke,e.WebAudioPeriodicWavePipe=Be,e.AudioBufferService=L,e.WebAudioBufferSource=Me,e.WebAudioConstantSource=Fe,e.WebAudioMediaSource=Ze,e.WebAudioMediaStreamSource=Ge,e.WebAudioMediaStreamTrackSource=Ke,e.WebAudioOscillator=Je,e.AUDIO_CONTEXT=y,e.AUDIO_NODE=A,e.AUDIO_WORKLET_PROCESSORS=tt,e.AUDIO_WORKLET_PROCESSORS_READY=ot,e.AUDIO_WORKLET_SUPPORT=rt,e.FEEDBACK_COEFFICIENTS=ye,e.FEEDFORWARD_COEFFICIENTS=fe,e.MEDIA_STREAM=ze,e.MEDIA_STREAM_TRACK=He,e.WEB_AUDIO_SUPPORT=nt,e.WebAudioModule=at,e.ɵa=m,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("rxjs"),require("rxjs/operators"),require("@angular/core")):"function"==typeof define&&define.amd?define("@ng-web-apis/audio",["exports","rxjs","rxjs/operators","@angular/core"],t):t((e["ng-web-apis"]=e["ng-web-apis"]||{},e["ng-web-apis"].audio={}),e.rxjs,e.rxjs.operators,e.ng.core)}(this,function(e,i,s,c){"use strict";function a(e,t,r){void 0===r&&(r=0),e.cancelAndHoldAtTime?e.cancelAndHoldAtTime(r):(e.cancelScheduledValues(r),e.setValueAtTime(p(e.value),r)),"number"!=typeof t?t instanceof Array?function o(t,e,r){e.forEach(function(e){"mode"in e?n(t,e,r):t.setValueCurveAtTime(e.value,r,e.duration),r+=e.duration})}(e,t,r):"mode"in t?(e.setValueAtTime(p(e.value),r),n(e,t,r)):e.setValueCurveAtTime(t.value,r,t.duration):e.setValueAtTime(p(t),r)}function n(e,t,r){var o=t.value,n=t.mode,a=void 0===n?"instant":n,i=t.duration;switch(a){case"instant":e.setValueAtTime(p(o),r),e.setValueAtTime(p(o),r+i);break;case"exponential":o<0||o*e.value<0?e.linearRampToValueAtTime(p(o),r+i):e.exponentialRampToValueAtTime(p(o),r+i),e.setValueAtTime(p(o),r+i);break;case"linear":e.linearRampToValueAtTime(p(o),r+i)}}function p(e){return e||1e-8}function t(n){void 0===n&&(n="");return function(r,o){Object.defineProperty(r,o,{set:function(e){e="string"==typeof e?Number.parseFloat(e):e;var t=this instanceof AudioWorkletNode?this.parameters.get(o):this[n];t instanceof AudioParam?a(t,e,this.context.currentTime):Object.defineProperty(r,o,{value:e})}})}}var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function r(e,t){function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function u(e,t,r,o){var n,a=arguments.length,i=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;0<=s;s--)(n=e[s])&&(i=(a<3?n(i):3<a?n(t,r,i):n(t,r))||i);return 3<a&&i&&Object.defineProperty(t,r,i),i}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}var y=new c.InjectionToken("Web Audio API context",{providedIn:"root",factory:function(){return new AudioContext}});var f,l=(r(g,f=AudioContext),g.prototype.ngOnDestroy=function(){this.close()},g.decorators=[{type:c.Directive,args:[{selector:"[waAudioContext]",providers:[{provide:y,useExisting:c.forwardRef(function(){return g})}]}]}],g.ctorParameters=function(){return[{type:undefined,decorators:[{type:c.Attribute,args:["latencyHint"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["sampleRate"]}]}]},g);function g(e,t){return f.call(this,{latencyHint:function r(e){return null===e?undefined:Number.parseFloat(e)||e}(e),sampleRate:parseInt(t||"",10)||undefined})||this}var h,m=new c.InjectionToken("Tests if constructor mode of node creation is supported or a fallback to factory method is needed",{providedIn:"root",factory:function(){try{return!!new GainNode(c.inject(y))}catch(e){return!1}}}),v=(r(b,h=GainNode),b.prototype.ngOnDestroy=function(){this.disconnect()},b.decorators=[{type:c.Directive,args:[{selector:"[waChannel]",exportAs:"AudioNode"}]}],b.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},b);function b(e,t){if(t)return h.call(this,e)||this;var r=e.createGain();return Object.setPrototypeOf(r,b.prototype),r}var A=new c.InjectionToken("Web Audio API audio node",{factory:function(){return null}});function P(e,t){e&&t&&e.connect(t)}var O,I=(r(j,O=AnalyserNode),j.prototype.ngOnDestroy=function(){this.disconnect()},j.prototype.isSilent=function(e){return Math.abs(e.reduce(function(e,t){return e+t},0))<.001},j.init=function(t,e){P(e,t),t.fftSize=256,t.connect(t.context.destination),t.quiet=i.interval(100).pipe(s.mapTo(new Float32Array(t.fftSize)),s.tap(function(e){return t.getFloatTimeDomainData(e)}),s.map(function(e){return t.isSilent(e)}),s.distinctUntilChanged(),s.skipWhile(function(e){return e}),s.debounceTime(5e3),s.filter(function(e){return e}))},j.decorators=[{type:c.Directive,args:[{selector:"[waAudioDestinationNode]",exportAs:"AudioNode"}]}],j.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},j.propDecorators={quiet:[{type:c.Output}]},j);function j(e,t,r){var o=this;if(r)return o=O.call(this,e)||this,j.init(o,t),o;var n=e.createAnalyser();return Object.setPrototypeOf(n,j.prototype),j.init(n,t),n}function w(e){if(!e)return 0;if("number"==typeof e)return e;if(e instanceof Array){var t=e[e.length-1].value;return"number"==typeof t?t:t[t.length-1]}return e.value instanceof Array?e.value[e.value.length-1]:e.value}var C,S=(r(x,C=GainNode),Object.defineProperty(x.prototype,"forwardX",{get:function(){return this.context.listener.forwardX},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"forwardY",{get:function(){return this.context.listener.forwardY},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"forwardZ",{get:function(){return this.context.listener.forwardZ},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"positionX",{get:function(){return this.context.listener.positionX},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"positionY",{get:function(){return this.context.listener.positionY},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"positionZ",{get:function(){return this.context.listener.positionZ},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"upX",{get:function(){return this.context.listener.upX},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"upY",{get:function(){return this.context.listener.upY},enumerable:!0,configurable:!0}),Object.defineProperty(x.prototype,"upZ",{get:function(){return this.context.listener.upZ},enumerable:!0,configurable:!0}),x.prototype.ngOnChanges=function(){this.context.listener.positionX instanceof AudioParam||(this.context.listener.setOrientation(w(this.forwardXParam),w(this.forwardYParam),w(this.forwardZParam),w(this.upXParam),w(this.upYParam),w(this.upZParam)),this.context.listener.setPosition(w(this.positionXParam),w(this.positionYParam),w(this.positionZParam)))},x.decorators=[{type:c.Directive,args:[{selector:"[waAudioContext],[waOfflineAudioContext][length][sampleRate]"}]}],x.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Self},{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},x.propDecorators={forwardXParam:[{type:c.Input,args:["forwardX"]}],forwardYParam:[{type:c.Input,args:["forwardY"]}],forwardZParam:[{type:c.Input,args:["forwardZ"]}],positionXParam:[{type:c.Input,args:["positionX"]}],positionYParam:[{type:c.Input,args:["positionY"]}],positionZParam:[{type:c.Input,args:["positionZ"]}],upXParam:[{type:c.Input,args:["upX"]}],upYParam:[{type:c.Input,args:["upY"]}],upZParam:[{type:c.Input,args:["upZ"]}]},u([t("forwardX"),d("design:type",Object)],x.prototype,"forwardXParam",void 0),u([t("forwardY"),d("design:type",Object)],x.prototype,"forwardYParam",void 0),u([t("forwardZ"),d("design:type",Object)],x.prototype,"forwardZParam",void 0),u([t("positionX"),d("design:type",Object)],x.prototype,"positionXParam",void 0),u([t("positionY"),d("design:type",Object)],x.prototype,"positionYParam",void 0),u([t("positionZ"),d("design:type",Object)],x.prototype,"positionZParam",void 0),u([t("upX"),d("design:type",Object)],x.prototype,"upXParam",void 0),u([t("upY"),d("design:type",Object)],x.prototype,"upYParam",void 0),u([t("upZ"),d("design:type",Object)],x.prototype,"upZParam",void 0),x);function x(e,t){if(t)return C.call(this,e)||this;var r=e.createGain();return Object.setPrototypeOf(r,x.prototype),r}var D,N=(r(k,D=OfflineAudioContext),k.decorators=[{type:c.Directive,args:[{selector:"[waOfflineAudioContext][length][sampleRate]",providers:[{provide:y,useExisting:c.forwardRef(function(){return k})}]}]}],k.ctorParameters=function(){return[{type:String,decorators:[{type:c.Attribute,args:["length"]}]},{type:String,decorators:[{type:c.Attribute,args:["sampleRate"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["numberOfChannels"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["autoplay"]}]}]},k.propDecorators={complete:[{type:c.Output}]},k);function k(e,t,r,o){var n=D.call(this,parseInt(r||"",10)||1,parseInt(e,10),parseInt(t,10))||this;return n.complete=new c.EventEmitter,n.oncomplete=function(e){var t=e.renderedBuffer;return n.complete.emit(t)},null!==o&&n.startRendering(),n}var T,B=(r(E,T=GainNode),Object.defineProperty(E.prototype,"waOutput",{set:function(e){this.disconnect(),P(this,e)},enumerable:!0,configurable:!0}),E.prototype.ngOnDestroy=function(){this.disconnect()},E.init=function(e,t){P(t,e)},E.decorators=[{type:c.Directive,args:[{selector:"[waOutput]"}]}],E.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},E.propDecorators={waOutput:[{type:c.Input}]},E);function E(e,t,r){var o=this;if(r)return P(t,o=T.call(this,e)||this),o;var n=e.createGain();return Object.setPrototypeOf(n,E.prototype),P(t,n),n}var R,M=(r(W,R=MediaStreamAudioDestinationNode),W.decorators=[{type:c.Directive,args:[{selector:"[waMediaStreamAudioDestinationNode]",exportAs:"AudioNode"}]}],W.ctorParameters=function(){return[{type:AudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},W);function W(e,t,r){var o=this;if(r)return P(t,o=R.call(this,e)||this),o;var n=e.createMediaStreamDestination();return Object.setPrototypeOf(n,W.prototype),P(t,n),n}function q(e,t){var r=parseFloat(e||"");return isNaN(r)?t:r}var F,X=(r(Y,F=AnalyserNode),Y.prototype.ngOnDestroy=function(){this.disconnect()},Y.init=function(e,t){P(t,e);var r=new Uint8Array(e.frequencyBinCount),o=new Float32Array(e.frequencyBinCount),n=new Uint8Array(e.fftSize),a=new Float32Array(e.fftSize);e.frequencyByte$=i.interval(0,i.animationFrameScheduler).pipe(s.map(function(){return r.length!==e.frequencyBinCount&&(r=new Uint8Array(e.frequencyBinCount)),e.getByteFrequencyData(r),r}),s.share()),e.frequencyFloat$=i.interval(0,i.animationFrameScheduler).pipe(s.map(function(){return o.length!==e.frequencyBinCount&&(o=new Float32Array(e.frequencyBinCount)),e.getFloatFrequencyData(o),o}),s.share()),e.timeByte$=i.interval(0,i.animationFrameScheduler).pipe(s.map(function(){return n.length!==e.fftSize&&(n=new Uint8Array(e.frequencyBinCount)),e.getByteTimeDomainData(n),n}),s.share()),e.timeFloat$=i.interval(0,i.animationFrameScheduler).pipe(s.map(function(){return a.length!==e.fftSize&&(a=new Float32Array(e.frequencyBinCount)),e.getFloatTimeDomainData(a),a}),s.share())},Y.decorators=[{type:c.Directive,args:[{selector:"[waAnalyserNode]",exportAs:"AudioNode",inputs:["fftSize","minDecibels","maxDecibels","smoothingTimeConstant","channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return Y})}]}]}],Y.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.Attribute,args:["fftSize"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["maxDecibels"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["minDecibels"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["smoothingTimeConstant"]}]}]},Y.propDecorators={frequencyByte$:[{type:c.Output}],frequencyFloat$:[{type:c.Output}],timeByte$:[{type:c.Output}],timeFloat$:[{type:c.Output}]},Y);function Y(e,t,r,o,n,a,i){var s=this,c=q(o,2048),p=q(n,-30),u=q(a,-100),d=q(i,.8);if(r)return s=F.call(this,e,{fftSize:c,maxDecibels:p,minDecibels:u,smoothingTimeConstant:d})||this,Y.init(s,t),s;var y=e.createAnalyser();return Object.setPrototypeOf(y,Y.prototype),Y.init(y,t),y.fftSize=c,y.maxDecibels=p,y.minDecibels=u,y.smoothingTimeConstant=d,y}var Z,_=(r($,Z=BiquadFilterNode),$.prototype.ngOnDestroy=function(){this.disconnect()},$.init=function(e,t){P(t,e)},$.decorators=[{type:c.Directive,args:[{selector:"[waBiquadFilterNode]",exportAs:"AudioNode",inputs:["type","channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return $})}]}]}],$.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:undefined,decorators:[{type:c.Attribute,args:["detune"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["frequency"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["gain"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["Q"]}]}]},$.propDecorators={detuneParam:[{type:c.Input,args:["detune"]}],frequencyParam:[{type:c.Input,args:["frequency"]}],gainParam:[{type:c.Input,args:["gain"]}],qParam:[{type:c.Input,args:["Q"]}]},u([t("detune"),d("design:type",Object)],$.prototype,"detuneParam",void 0),u([t("frequency"),d("design:type",Object)],$.prototype,"frequencyParam",void 0),u([t("gain"),d("design:type",Object)],$.prototype,"gainParam",void 0),u([t("Q"),d("design:type",Object)],$.prototype,"qParam",void 0),$);function $(e,t,r,o,n,a,i){var s=this,c=q(o,0),p=q(n,350),u=q(a,0),d=q(i,1);if(t)return P(r,s=Z.call(this,e,{detune:c,frequency:p,gain:u,Q:d})||this),s;var y=e.createBiquadFilter();return Object.setPrototypeOf(y,$.prototype),y.detune.value=c,y.frequency.value=p,y.gain.value=u,y.Q.value=d,P(r,y),y}var z,G=(r(U,z=ChannelMergerNode),Object.defineProperty(U.prototype,"channels",{set:function(e){var r=this;e.forEach(function(e,t){e.connect(r,0,t)})},enumerable:!0,configurable:!0}),U.prototype.ngOnDestroy=function(){this.disconnect()},U.decorators=[{type:c.Directive,args:[{selector:"[waChannelMergerNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return U})}]}]}],U.ctorParameters=function(){return[{type:undefined,decorators:[{type:c.Attribute,args:["numberOfInputs"]}]},{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},U.propDecorators={channels:[{type:c.ContentChildren,args:[v,{descendants:!1}]}]},U);function U(e,t,r){var o=parseInt(e||"",10)||6;if(r)return z.call(this,t,{numberOfInputs:o})||this;var n=t.createChannelMerger(o);return Object.setPrototypeOf(n,U.prototype),n}var V,H=(r(K,V=ChannelSplitterNode),Object.defineProperty(K.prototype,"channels",{set:function(e){var r=this;this.disconnect(),e.filter(function(e){return!!e}).forEach(function(e,t){r.connect(e,t)})},enumerable:!0,configurable:!0}),K.prototype.ngOnDestroy=function(){this.disconnect()},K.decorators=[{type:c.Directive,args:[{selector:"[waChannelSplitterNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useValue:null}]}]}],K.ctorParameters=function(){return[{type:undefined,decorators:[{type:c.Attribute,args:["numberOfOutputs"]}]},{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},K.propDecorators={channels:[{type:c.ContentChildren,args:[A,{descendants:!1}]}]},K);function K(e,t,r,o){var n=this,a=parseInt(e||"",10)||6;if(o)return P(r,n=V.call(this,t,{numberOfOutputs:a})||this),n;var i=t.createChannelSplitter(a);return Object.setPrototypeOf(i,K.prototype),P(r,i),i}var L=(Q.prototype.fetch=function(o){var n=this;return new Promise(function(t,e){if(n.cache.has(o))t(n.cache.get(o));else{var r=new XMLHttpRequest;r.open("GET",o,!0),r.responseType="arraybuffer",r.onerror=e,r.onabort=e,r.onload=function(){n.context.decodeAudioData(r.response,function(e){n.cache.set(o,e),t(e)},e)},r.send()}})},Q.decorators=[{type:c.Injectable,args:[{providedIn:"root"}]}],Q.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]}]},Q.ngInjectableDef=c.defineInjectable({factory:function(){return new Q(c.inject(y))},token:Q,providedIn:"root"}),Q);function Q(e){this.context=e,this.cache=new Map}var J,ee=(r(te,J=ConvolverNode),Object.defineProperty(te.prototype,"bufferSetter",{set:function(e){this.buffer$.next(e)},enumerable:!0,configurable:!0}),te.prototype.ngOnDestroy=function(){this.buffer$.complete(),this.disconnect()},te.init=function(t,e,r){P(e,t),t.buffer$=new i.Subject,t.buffer$.pipe(s.switchMap(function(e){return"string"==typeof e?r.fetch(e):i.of(e)})).subscribe(function(e){t.buffer=e})},te.decorators=[{type:c.Directive,args:[{selector:"[waConvolverNode]",exportAs:"AudioNode",inputs:["normalize","channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return te})}]}]}],te.ctorParameters=function(){return[{type:L,decorators:[{type:c.Inject,args:[L]}]},{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},te.propDecorators={bufferSetter:[{type:c.Input,args:["buffer"]}]},te);function te(e,t,r,o){var n=this;if(o)return n=J.call(this,t)||this,te.init(n,r,e),n;var a=t.createConvolver();return Object.setPrototypeOf(a,te.prototype),te.init(a,r,e),a}var re,oe=(r(ne,re=DelayNode),ne.prototype.ngOnDestroy=function(){this.disconnect()},ne.init=function(e,t){P(t,e)},ne.decorators=[{type:c.Directive,args:[{selector:"[waDelayNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return ne})}]}]}],ne.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.Attribute,args:["delayTime"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["maxDelayTime"]}]}]},ne.propDecorators={delayTimeParam:[{type:c.Input,args:["delayTime"]}]},u([t("delayTime"),d("design:type",Object)],ne.prototype,"delayTimeParam",void 0),ne);function ne(e,t,r,o,n){var a=this,i=q(o,0),s=q(n,1);if(r)return P(t,a=re.call(this,e,{delayTime:i,maxDelayTime:s})||this),a;var c=e.createDelay(s);return Object.setPrototypeOf(c,ne.prototype),P(t,c),c.delayTime.value=i,c}var ae,ie=(r(se,ae=DynamicsCompressorNode),se.prototype.ngOnDestroy=function(){this.disconnect()},se.decorators=[{type:c.Directive,args:[{selector:"[waDynamicsCompressorNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return se})}]}]}],se.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.Attribute,args:["attack"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["knee"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["ratio"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["release"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["threshold"]}]}]},se.propDecorators={attackParam:[{type:c.Input,args:["attack"]}],kneeParam:[{type:c.Input,args:["knee"]}],ratioParam:[{type:c.Input,args:["ratio"]}],releaseParam:[{type:c.Input,args:["release"]}],thresholdParam:[{type:c.Input,args:["threshold"]}]},u([t("attack"),d("design:type",Object)],se.prototype,"attackParam",void 0),u([t("knee"),d("design:type",Object)],se.prototype,"kneeParam",void 0),u([t("ratio"),d("design:type",Object)],se.prototype,"ratioParam",void 0),u([t("release"),d("design:type",Object)],se.prototype,"releaseParam",void 0),u([t("threshold"),d("design:type",Object)],se.prototype,"thresholdParam",void 0),se);function se(e,t,r,o,n,a,i,s){var c=this,p=q(o,.003),u=q(n,30),d=q(a,12),y=q(i,.25),f=q(s,-24);if(r)return P(t,c=ae.call(this,e,{attack:p,knee:u,ratio:d,release:y,threshold:f})||this),c;var l=e.createDynamicsCompressor();return Object.setPrototypeOf(l,se.prototype),P(t,l),l.attack.value=p,l.knee.value=u,l.ratio.value=d,l.release.value=y,l.threshold.value=f,l}var ce,pe=(r(ue,ce=GainNode),ue.prototype.ngOnDestroy=function(){this.disconnect()},ue.decorators=[{type:c.Directive,args:[{selector:"[waGainNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return ue})}]}]}],ue.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.Attribute,args:["gain"]}]}]},ue.propDecorators={gainParam:[{type:c.Input,args:["gain"]}]},u([t("gain"),d("design:type",Object)],ue.prototype,"gainParam",void 0),ue);function ue(e,t,r,o){var n=this,a=q(o,1);if(r)return P(t,n=ce.call(this,e,{gain:a})||this),n;var i=e.createGain();return Object.setPrototypeOf(i,ue.prototype),P(t,i),i.gain.value=a,i}var de,ye=new c.InjectionToken("A sequence of feedback coefficients for IIRFilterNode"),fe=new c.InjectionToken("A sequence of feedforward coefficients for IIRFilterNode"),le=(r(ge,de=IIRFilterNode),ge.prototype.ngOnDestroy=function(){this.disconnect()},ge.decorators=[{type:c.Directive,args:[{selector:"[waIIRFilterNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return ge})}]}]}],ge.ctorParameters=function(){return[{type:Array,decorators:[{type:c.Inject,args:[ye]}]},{type:Array,decorators:[{type:c.Inject,args:[fe]}]},{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]}]},ge);function ge(e,t,r,o,n){var a=this;if(o)return P(n,a=de.call(this,r,{feedback:e,feedforward:t})||this),a;var i=r.createIIRFilter(e,t);return Object.setPrototypeOf(i,ge.prototype),P(n,i),i}var he,me=(r(ve,he=PannerNode),ve.prototype.ngOnChanges=function(){this.positionX instanceof AudioParam||(this.setOrientation(w(this.orientationXParam),w(this.orientationYParam),w(this.orientationZParam)),this.setPosition(w(this.positionXParam),w(this.positionYParam),w(this.positionZParam)))},ve.prototype.ngOnDestroy=function(){this.disconnect()},ve.decorators=[{type:c.Directive,args:[{selector:"[waPannerNode]",exportAs:"AudioNode",inputs:["coneInnerAngle","coneOuterAngle","coneOuterGain","distanceModel","maxDistance","panningModel","refDistance","rolloffFactor","channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return ve})}]}]}],ve.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},ve.propDecorators={orientationXParam:[{type:c.Input}],orientationYParam:[{type:c.Input}],orientationZParam:[{type:c.Input}],positionXParam:[{type:c.Input}],positionYParam:[{type:c.Input}],positionZParam:[{type:c.Input}]},u([t("orientationX"),d("design:type",Object)],ve.prototype,"orientationXParam",void 0),u([t("orientationY"),d("design:type",Object)],ve.prototype,"orientationYParam",void 0),u([t("orientationZ"),d("design:type",Object)],ve.prototype,"orientationZParam",void 0),u([t("positionX"),d("design:type",Object)],ve.prototype,"positionXParam",void 0),u([t("positionY"),d("design:type",Object)],ve.prototype,"positionYParam",void 0),u([t("positionZ"),d("design:type",Object)],ve.prototype,"positionZParam",void 0),ve);function ve(e,t,r){var o=this;if(r)return P(t,o=he.call(this,e)||this),o;var n=e.createPanner();return Object.setPrototypeOf(n,ve.prototype),P(t,n),n}var be,Ae=(r(Pe,be=ScriptProcessorNode),Pe.prototype.ngOnDestroy=function(){this.disconnect()},Pe.decorators=[{type:c.Directive,args:[{selector:"[waScriptProcessorNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return Pe})}]}]}],Pe.ctorParameters=function(){return[{type:undefined,decorators:[{type:c.Attribute,args:["bufferSize"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["numberOfInputChannels"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["numberOfOutputChannels"]}]},{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]}]},Pe.propDecorators={audioprocess:[{type:c.Output}]},Pe);function Pe(e,t,r,o,n){try{var a=o.createScriptProcessor(parseInt(e||"",10)||0,parseInt(t||"",10)||2,parseInt(r||"",10)||2);Object.setPrototypeOf(a,Pe.prototype),P(n,a);var i=new c.EventEmitter;return a.audioprocess=i,a.onaudioprocess=function(e){return i.emit(e)},a}catch(s){}return be.call(this)||this}var Oe,Ie=(r(je,Oe=StereoPannerNode),Object.defineProperty(je.prototype,"panParam",{set:function(e){"setPosition"in this?this.fallbackToPannerNode(w(e)):a(this.pan,e,this.context.currentTime)},enumerable:!0,configurable:!0}),je.prototype.ngOnDestroy=function(){this.disconnect()},je.prototype.fallbackToPannerNode=function(e){var t=100*e,r=0<t?270-t:90+t,o=Math.sin(t*(Math.PI/180)),n=Math.sin(r*(Math.PI/180));this.setPosition(o,0,n)},je.decorators=[{type:c.Directive,args:[{selector:"[waStereoPannerNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return je})}]}]}],je.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:undefined,decorators:[{type:c.Attribute,args:["pan"]}]}]},je.propDecorators={panParam:[{type:c.Input,args:["pan"]}]},je);function je(e,t,r){var o,n=q(r,0);try{new StereoPannerNode(e)}catch(i){var a=e.createPanner();return Object.setPrototypeOf(a,je.prototype),a.fallbackToPannerNode(w(n)),P(t,a),a}return P(t,o=Oe.call(this,e,{pan:n})||this),o}var we,Ce=(r(Se,we=WaveShaperNode),Se.prototype.ngOnDestroy=function(){this.disconnect()},Se.decorators=[{type:c.Directive,args:[{selector:"[waWaveShaperNode]",exportAs:"AudioNode",inputs:["oversample","curve","channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return Se})}]}]}],Se.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},Se);function Se(e,t,r){var o=this;if(r)return P(t,o=we.call(this,e)||this),o;var n=e.createWaveShaper();return Object.setPrototypeOf(n,Se.prototype),P(t,n),n}var xe,De=(r(Ne,xe=AudioWorkletNode),Ne.prototype.ngOnDestroy=function(){this.disconnect()},Ne.decorators=[{type:c.Directive,args:[{selector:"[waAudioWorkletNode][name]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return Ne})}]}]}],Ne.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.SkipSelf},{type:c.Inject,args:[A]}]},{type:String,decorators:[{type:c.Attribute,args:["name"]}]}]},Ne.propDecorators={processorerror:[{type:c.Output}]},Ne);function Ne(e,t,r){var o=xe.call(this,e,r)||this;return o.processorerror=new c.EventEmitter,o.onprocessorerror=function(){return o.processorerror.emit()},P(t,o),o}var ke=(Te.prototype.transform=function(e,t,r){return void 0===r&&(r="exponential"),e instanceof Array?{value:e,duration:t}:{value:e,duration:t,mode:r}},Te.decorators=[{type:c.Pipe,args:[{name:"waAudioParam"}]}],Te);function Te(){}var Be=(Ee.prototype.transform=function(e,t,r){return this.context.createPeriodicWave(new Float32Array(e),t?new Float32Array(t):new Float32Array(e.length),{disableNormalization:!!r})},Ee.decorators=[{type:c.Pipe,args:[{name:"waPeriodicWave"}]}],Ee.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]}]},Ee);function Ee(e){this.context=e}var Re,Me=(r(We,Re=AudioBufferSourceNode),Object.defineProperty(We.prototype,"bufferSetter",{set:function(e){this.buffer$.next(e)},enumerable:!0,configurable:!0}),We.prototype.ngOnDestroy=function(){this.buffer$.complete();try{this.stop()}catch(e){}this.disconnect()},We.init=function(t,e,r,o){null!==r&&t.start();var n=new c.EventEmitter;t.ended=n,t.onended=function(){return n.emit()},t.buffer$=new i.Subject,t.buffer$.pipe(s.switchMap(function(e){return"string"==typeof e?o.fetch(e):i.of(e)})).subscribe(function(e){t.buffer=e})},We.decorators=[{type:c.Directive,args:[{selector:"[waAudioBufferSourceNode]",exportAs:"AudioNode",inputs:["loop","loopStart","loopEnd","channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return We})}]}]}],We.ctorParameters=function(){return[{type:L,decorators:[{type:c.Inject,args:[L]}]},{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.Attribute,args:["autoplay"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["detune"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["playbackRate"]}]}]},We.propDecorators={bufferSetter:[{type:c.Input,args:["buffer"]}],detuneParam:[{type:c.Input,args:["detune"]}],playbackRateParam:[{type:c.Input,args:["playbackRate"]}],ended:[{type:c.Output}]},u([t("detune"),d("design:type",Object)],We.prototype,"detuneParam",void 0),u([t("playbackRate"),d("design:type",Object)],We.prototype,"playbackRateParam",void 0),We);function We(e,t,r,o,n,a){var i=this,s=q(n,0),c=q(a,1);if(r)return i=Re.call(this,t,{detune:s,playbackRate:c})||this,We.init(i,null,o,e),i;var p=t.createBufferSource();return Object.setPrototypeOf(We.prototype,Object.getPrototypeOf(p)),Object.setPrototypeOf(p,We.prototype),p.playbackRate.value=c,We.init(p,null,o,e),p}var qe,Fe=(r(Xe,qe=ConstantSourceNode),Xe.prototype.ngOnDestroy=function(){try{this.stop()}catch(e){}this.disconnect()},Xe.decorators=[{type:c.Directive,args:[{selector:"[waConstantSourceNode]",exportAs:"AudioNode",inputs:["channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return Xe})}]}]}],Xe.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:undefined,decorators:[{type:c.Attribute,args:["autoplay"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["offset"]}]}]},Xe.propDecorators={offsetParam:[{type:c.Input,args:["offset"]}],ended:[{type:c.Output}]},u([t("offset"),d("design:type",Object)],Xe.prototype,"offsetParam",void 0),Xe);function Xe(e,t,r){var o=qe.call(this,e,{offset:q(r,0)})||this;return o.ended=new c.EventEmitter,o.onended=function(){return o.ended.emit()},null!==t&&o.start(),o}var Ye,Ze=(r(_e,Ye=MediaElementAudioSourceNode),_e.prototype.ngOnDestroy=function(){this.disconnect()},_e.decorators=[{type:c.Directive,args:[{selector:"audio[waMediaElementAudioSourceNode], video[waMediaElementAudioSourceNode]",exportAs:"AudioNode",providers:[{provide:A,useExisting:c.forwardRef(function(){return _e})}]}]}],_e.ctorParameters=function(){return[{type:AudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:c.ElementRef,decorators:[{type:c.Inject,args:[c.ElementRef]}]}]},_e);function _e(e,t,r){var o=r.nativeElement;if(t)return Ye.call(this,e,{mediaElement:o})||this;var n=e.createMediaElementSource(o);return Object.setPrototypeOf(n,_e.prototype),n}var $e,ze=new c.InjectionToken("MediaStream for MediaStreamAudioSourceNode"),Ge=(r(Ue,$e=MediaStreamAudioSourceNode),Ue.prototype.ngOnDestroy=function(){this.disconnect()},Ue.decorators=[{type:c.Directive,args:[{selector:"[waMediaStreamAudioSourceNode]",exportAs:"AudioNode",providers:[{provide:A,useExisting:c.forwardRef(function(){return Ue})}]}]}],Ue.ctorParameters=function(){return[{type:MediaStream,decorators:[{type:c.Inject,args:[ze]}]},{type:AudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]}]},Ue);function Ue(e,t,r){if(r)return $e.call(this,t,{mediaStream:e})||this;var o=t.createMediaStreamSource(e);return Object.setPrototypeOf(o,Ue.prototype),o}var Ve,He=new c.InjectionToken("MediaStreamTrack for MediaStreamTrackAudioSourceNode"),Ke=(r(Le,Ve=MediaStreamTrackAudioSourceNode),Le.prototype.ngOnDestroy=function(){this.disconnect()},Le.decorators=[{type:c.Directive,args:[{selector:"[waMediaStreamTrackAudioSourceNode]",exportAs:"AudioNode",providers:[{provide:A,useExisting:c.forwardRef(function(){return Le})}]}]}],Le.ctorParameters=function(){return[{type:MediaStreamTrack,decorators:[{type:c.Inject,args:[He]}]},{type:AudioContext,decorators:[{type:c.Inject,args:[y]}]}]},Le);function Le(e,t){return Ve.call(this,t,{mediaStreamTrack:e})||this}var Qe,Je=(r(et,Qe=OscillatorNode),Object.defineProperty(et.prototype,"periodicWave",{set:function(e){this.setPeriodicWave(e)},enumerable:!0,configurable:!0}),et.prototype.ngOnDestroy=function(){try{this.stop()}catch(e){}this.disconnect()},et.init=function(e,t,r){P(t,e),null!==r&&e.start();var o=new c.EventEmitter;e.ended=o,e.onended=function(){return o.emit()}},et.decorators=[{type:c.Directive,args:[{selector:"[waOscillatorNode]",exportAs:"AudioNode",inputs:["type","channelCount","channelCountMode","channelInterpretation"],providers:[{provide:A,useExisting:c.forwardRef(function(){return et})}]}]}],et.ctorParameters=function(){return[{type:BaseAudioContext,decorators:[{type:c.Inject,args:[y]}]},{type:Boolean,decorators:[{type:c.Inject,args:[m]}]},{type:undefined,decorators:[{type:c.Attribute,args:["autoplay"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["detune"]}]},{type:undefined,decorators:[{type:c.Attribute,args:["frequency"]}]}]},et.propDecorators={periodicWave:[{type:c.Input}],detuneParam:[{type:c.Input,args:["detune"]}],frequencyParam:[{type:c.Input,args:["frequency"]}],ended:[{type:c.Output}]},u([t("detune"),d("design:type",Object)],et.prototype,"detuneParam",void 0),u([t("frequency"),d("design:type",Object)],et.prototype,"frequencyParam",void 0),et);function et(e,t,r,o,n){var a=this,i=q(o,0),s=q(n,440);if(t)return a=Qe.call(this,e,{detune:i,frequency:s})||this,et.init(a,null,r),a;var c=e.createOscillator();return Object.setPrototypeOf(et.prototype,Object.getPrototypeOf(c)),Object.setPrototypeOf(c,et.prototype),c.detune.value=i,c.frequency.value=s,et.init(c,null,r),c}var tt=new c.InjectionToken("Web Audio API worklet processors paths",{providedIn:"root",factory:function(){return[]}}),rt=new c.InjectionToken("AudioWorklet browser support",{factory:function(){return!!c.inject(y).audioWorklet}}),ot=new c.InjectionToken("Web Audio API worklet processors resolution promise",{providedIn:"root",factory:function(){var t=c.inject(y),e=c.inject(tt);return c.inject(rt)?Promise.all(e.map(function(e){return t.audioWorklet.addModule(e)})).then(function(){return!0}):Promise.reject("AudioWorklet is not supported")["catch"](function(){return!1})}}),nt=new c.InjectionToken("Web Audio API support",{providedIn:"root",factory:function(){return!!AudioContext}}),at=(it.decorators=[{type:c.NgModule,args:[{declarations:[l,v,I,S,N,B,M,Me,Fe,Ze,Ge,Ke,Je,X,_,H,G,ee,oe,ie,pe,le,me,Ae,Ie,Ce,De,ke,Be],exports:[l,v,I,S,N,B,M,Me,Fe,Ze,Ge,Ke,Je,X,_,H,G,ee,oe,ie,pe,le,me,Ae,Ie,Ce,De,ke,Be]}]}],it);function it(){}e.audioParam=t,e.WebAudioContext=l,e.WebAudioChannel=v,e.WebAudioDestination=I,e.WebAudioListener=S,e.WebAudioOfflineContext=N,e.WebAudioOutput=B,e.WebAudioMediaStreamDestination=M,e.WebAudioAnalyser=X,e.WebAudioBiquadFilter=_,e.WebAudioChannelMerger=G,e.WebAudioChannelSplitter=H,e.WebAudioConvolver=ee,e.WebAudioDelay=oe,e.WebAudioDynamicsCompressor=ie,e.WebAudioGain=pe,e.WebAudioIIRFilter=le,e.WebAudioPanner=me,e.WebAudioScriptProcessor=Ae,e.WebAudioStereoPanner=Ie,e.WebAudioWaveShaper=Ce,e.WebAudioWorklet=De,e.WebAudioParamPipe=ke,e.WebAudioPeriodicWavePipe=Be,e.AudioBufferService=L,e.WebAudioBufferSource=Me,e.WebAudioConstantSource=Fe,e.WebAudioMediaSource=Ze,e.WebAudioMediaStreamSource=Ge,e.WebAudioMediaStreamTrackSource=Ke,e.WebAudioOscillator=Je,e.AUDIO_CONTEXT=y,e.AUDIO_NODE=A,e.AUDIO_WORKLET_PROCESSORS=tt,e.AUDIO_WORKLET_PROCESSORS_READY=ot,e.AUDIO_WORKLET_SUPPORT=rt,e.FEEDBACK_COEFFICIENTS=ye,e.FEEDFORWARD_COEFFICIENTS=fe,e.MEDIA_STREAM=ze,e.MEDIA_STREAM_TRACK=He,e.WEB_AUDIO_SUPPORT=nt,e.WebAudioModule=at,e.ɵa=m,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ng-web-apis-audio.umd.min.js.map

@@ -18,3 +18,3 @@ /**

if (!inject(AUDIO_WORKLET_SUPPORT)) {
return Promise.reject('AudioWorklet is not supported');
return Promise.reject('AudioWorklet is not supported').catch(() => false);
}

@@ -24,2 +24,2 @@ return Promise.all(processors.map(processor => context.audioWorklet.addModule(processor))).then(() => true);

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXVkaW8td29ya2xldC1wcm9jZXNzb3JzLXJlYWR5LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5nLXdlYi1hcGlzL2F1ZGlvLyIsInNvdXJjZXMiOlsidG9rZW5zL2F1ZGlvLXdvcmtsZXQtcHJvY2Vzc29ycy1yZWFkeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFDLE1BQU0sRUFBRSxjQUFjLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDckQsT0FBTyxFQUFDLGFBQWEsRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBQzlDLE9BQU8sRUFBQyx3QkFBd0IsRUFBQyxNQUFNLDRCQUE0QixDQUFDO0FBQ3BFLE9BQU8sRUFBQyxxQkFBcUIsRUFBQyxNQUFNLHlCQUF5QixDQUFDOztBQUU5RCxNQUFNLE9BQU8sOEJBQThCLEdBQUcsSUFBSSxjQUFjLENBQzVELHFEQUFxRCxFQUNyRDtJQUNJLFVBQVUsRUFBRSxNQUFNO0lBQ2xCLE9BQU8sRUFBRSxHQUFHLEVBQUU7O2NBQ0osT0FBTyxHQUFHLE1BQU0sQ0FBQyxhQUFhLENBQUM7O2NBQy9CLFVBQVUsR0FBRyxNQUFNLENBQUMsd0JBQXdCLENBQUM7UUFFbkQsSUFBSSxDQUFDLE1BQU0sQ0FBQyxxQkFBcUIsQ0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8Ym9vbGVhbj4+KFxyXG4gICAgJ1dlYiBBdWRpbyBBUEkgd29ya2xldCBwcm9jZXNzb3JzIHJlc29sdXRpb24gcHJvbWlzZScsXHJcbiAgICB7XHJcbiAgICAgICAgcHJvdmlkZWRJbjogJ3Jvb3QnLFxyXG4gICAgICAgIGZhY3Rvcnk6ICgpID0+IHtcclxuICAgICAgICAgICAgY29uc3QgY29udGV4dCA9IGluamVjdChBVURJT19DT05URVhUKTtcclxuICAgICAgICAgICAgY29uc3QgcHJvY2Vzc29ycyA9IGluamVjdChBVURJT19XT1JLTEVUX1BST0NFU1NPUlMpO1xyXG5cclxuICAgICAgICAgICAgaWYgKCFpbmplY3QoQVVESU9fV09SS0xFVF9TVVBQT1JUKSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIFByb21pc2UucmVqZWN0KCdBdWRpb1dvcmtsZXQgaXMgbm90IHN1cHBvcnRlZCcpLmNhdGNoKCgpID0+IGZhbHNlKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgcmV0dXJuIFByb21pc2UuYWxsKFxyXG4gICAgICAgICAgICAgICAgcHJvY2Vzc29ycy5tYXAocHJvY2Vzc29yID0+IGNvbnRleHQuYXVkaW9Xb3JrbGV0LmFkZE1vZHVsZShwcm9jZXNzb3IpKSxcclxuICAgICAgICAgICAgKS50aGVuKCgpID0+IHRydWUpO1xyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG4pO1xyXG4iXX0=

@@ -18,3 +18,3 @@ /**

if (!inject(AUDIO_WORKLET_SUPPORT)) {
return Promise.reject('AudioWorklet is not supported');
return Promise.reject('AudioWorklet is not supported').catch(function () { return false; });
}

@@ -24,2 +24,2 @@ return Promise.all(processors.map(function (processor) { return context.audioWorklet.addModule(processor); })).then(function () { return true; });

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXVkaW8td29ya2xldC1wcm9jZXNzb3JzLXJlYWR5LmpzIiwic291cm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xyXG5cclxuICAgICAgICAgICAgaWYgKCFpbmplY3QoQVVESU9fV09SS0xFVF9TVVBQT1JUKSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIFByb21pc2UucmVqZWN0KCdBdWRpb1dvcmtsZXQgaXMgbm90IHN1cHBvcnRlZCcpLmNhdGNoKCgpID0+IGZhbHNlKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgcmV0dXJuIFByb21pc2UuYWxsKFxyXG4gICAgICAgICAgICAgICAgcHJvY2Vzc29ycy5tYXAocHJvY2Vzc29yID0+IGNvbnRleHQuYXVkaW9Xb3JrbGV0LmFkZE1vZHVsZShwcm9jZXNzb3IpKSxcclxuICAgICAgICAgICAgKS50aGVuKCgpID0+IHRydWUpO1xyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG4pO1xyXG4iXX0=
{
"name": "@ng-web-apis/audio",
"version": "1.5.0",
"version": "1.5.1",
"peerDependencies": {

@@ -5,0 +5,0 @@ "@angular/core": ">=7.0.0",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc