Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

recorder-audio-worklet

Package Overview
Dependencies
Maintainers
1
Versions
298
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

recorder-audio-worklet - npm Package Compare versions

Comparing version 1.1.8 to 1.1.9

2

build/es2015/worklet/worklet.d.ts

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

export declare const worklet = "!function(e){var t={};function r(s){if(t[s])return t[s].exports;var o=t[s]={i:s,l:!1,exports:{}};return e[s].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,s){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:s})},r.r=function(e){Object.defineProperty(e,\"__esModule\",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=1)}([function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});class s extends AudioWorkletProcessor{constructor(e){super(e),this._encoderPort=null,this._isSupportingTransferables=!1,this._state=\"inactive\",this.port.onmessage=(({data:e})=>{\"record\"===e.method?\"inactive\"===this._state?(this._encoderPort=e.params.encoderPort,this._isSupportingTransferables=e.params.isSupportingTransferables,this._state=\"recording\",this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:\"The internal state does not allow to process the given message.\"},id:e.id}):\"stop\"===e.method?\"recording\"===this._state&&null!==this._encoderPort?(this._stop(this._encoderPort),this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:\"The internal state does not allow to process the given message.\"},id:e.id}):\"number\"==typeof e.id&&this.port.postMessage({error:{code:-32601,message:\"The requested method is not supported.\"},id:e.id})})}process([e]){if(\"inactive\"===this._state)return!0;if(\"recording\"===this._state&&null!==this._encoderPort){if(void 0===e)throw new Error(\"No channelData was received for the first input.\");return 0===e.length&&this._stop(this._encoderPort),this._encoderPort.postMessage(e,this._isSupportingTransferables?e.map(({buffer:e})=>e):[]),!0}return!1}_stop(e){e.postMessage([]),e.close(),this._encoderPort=null,this._state=\"stopped\"}}t.RecorderAudioWorkletProcessor=s,s.parameterDescriptors=[]},function(e,t,r){\"use strict\";var s=r(0);registerProcessor(\"recorder-audio-worklet-processor\",s.RecorderAudioWorkletProcessor)}]);";
export declare const worklet = "!function(e){var t={};function r(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var s in e)r.d(o,s,function(t){return e[t]}.bind(null,s));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=1)}([function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});class o extends AudioWorkletProcessor{constructor(e){super(e),this._encoderPort=null,this._isSupportingTransferables=!1,this._state=\"inactive\",this.port.onmessage=(({data:e})=>{\"record\"===e.method?\"inactive\"===this._state?(this._encoderPort=e.params.encoderPort,this._isSupportingTransferables=e.params.isSupportingTransferables,this._state=\"recording\",this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:\"The internal state does not allow to process the given message.\"},id:e.id}):\"stop\"===e.method?\"recording\"===this._state&&null!==this._encoderPort?(this._stop(this._encoderPort),this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:\"The internal state does not allow to process the given message.\"},id:e.id}):\"number\"==typeof e.id&&this.port.postMessage({error:{code:-32601,message:\"The requested method is not supported.\"},id:e.id})})}process([e]){if(\"inactive\"===this._state)return!0;if(\"recording\"===this._state&&null!==this._encoderPort){if(void 0===e)throw new Error(\"No channelData was received for the first input.\");return 0===e.length&&this._stop(this._encoderPort),this._encoderPort.postMessage(e,this._isSupportingTransferables?e.map(({buffer:e})=>e):[]),!0}return!1}_stop(e){e.postMessage([]),e.close(),this._encoderPort=null,this._state=\"stopped\"}}t.RecorderAudioWorkletProcessor=o,o.parameterDescriptors=[]},function(e,t,r){\"use strict\";var o=r(0);registerProcessor(\"recorder-audio-worklet-processor\",o.RecorderAudioWorkletProcessor)}]);";
// tslint:disable-next-line:max-line-length
export const worklet = `!function(e){var t={};function r(s){if(t[s])return t[s].exports;var o=t[s]={i:s,l:!1,exports:{}};return e[s].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,s){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:s})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends AudioWorkletProcessor{constructor(e){super(e),this._encoderPort=null,this._isSupportingTransferables=!1,this._state="inactive",this.port.onmessage=(({data:e})=>{"record"===e.method?"inactive"===this._state?(this._encoderPort=e.params.encoderPort,this._isSupportingTransferables=e.params.isSupportingTransferables,this._state="recording",this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:"The internal state does not allow to process the given message."},id:e.id}):"stop"===e.method?"recording"===this._state&&null!==this._encoderPort?(this._stop(this._encoderPort),this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:"The internal state does not allow to process the given message."},id:e.id}):"number"==typeof e.id&&this.port.postMessage({error:{code:-32601,message:"The requested method is not supported."},id:e.id})})}process([e]){if("inactive"===this._state)return!0;if("recording"===this._state&&null!==this._encoderPort){if(void 0===e)throw new Error("No channelData was received for the first input.");return 0===e.length&&this._stop(this._encoderPort),this._encoderPort.postMessage(e,this._isSupportingTransferables?e.map(({buffer:e})=>e):[]),!0}return!1}_stop(e){e.postMessage([]),e.close(),this._encoderPort=null,this._state="stopped"}}t.RecorderAudioWorkletProcessor=s,s.parameterDescriptors=[]},function(e,t,r){"use strict";var s=r(0);registerProcessor("recorder-audio-worklet-processor",s.RecorderAudioWorkletProcessor)}]);`;
export const worklet = `!function(e){var t={};function r(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)r.d(o,s,function(t){return e[t]}.bind(null,s));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends AudioWorkletProcessor{constructor(e){super(e),this._encoderPort=null,this._isSupportingTransferables=!1,this._state="inactive",this.port.onmessage=(({data:e})=>{"record"===e.method?"inactive"===this._state?(this._encoderPort=e.params.encoderPort,this._isSupportingTransferables=e.params.isSupportingTransferables,this._state="recording",this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:"The internal state does not allow to process the given message."},id:e.id}):"stop"===e.method?"recording"===this._state&&null!==this._encoderPort?(this._stop(this._encoderPort),this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:"The internal state does not allow to process the given message."},id:e.id}):"number"==typeof e.id&&this.port.postMessage({error:{code:-32601,message:"The requested method is not supported."},id:e.id})})}process([e]){if("inactive"===this._state)return!0;if("recording"===this._state&&null!==this._encoderPort){if(void 0===e)throw new Error("No channelData was received for the first input.");return 0===e.length&&this._stop(this._encoderPort),this._encoderPort.postMessage(e,this._isSupportingTransferables?e.map(({buffer:e})=>e):[]),!0}return!1}_stop(e){e.postMessage([]),e.close(),this._encoderPort=null,this._state="stopped"}}t.RecorderAudioWorkletProcessor=o,o.parameterDescriptors=[]},function(e,t,r){"use strict";var o=r(0);registerProcessor("recorder-audio-worklet-processor",o.RecorderAudioWorkletProcessor)}]);`;
//# sourceMappingURL=/build/es2015/worklet/worklet.js.map

@@ -25,3 +25,3 @@ (function (global, factory) {

// tslint:disable-next-line:max-line-length
var worklet = "!function(e){var t={};function r(s){if(t[s])return t[s].exports;var o=t[s]={i:s,l:!1,exports:{}};return e[s].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,s){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:s})},r.r=function(e){Object.defineProperty(e,\"__esModule\",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=1)}([function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});class s extends AudioWorkletProcessor{constructor(e){super(e),this._encoderPort=null,this._isSupportingTransferables=!1,this._state=\"inactive\",this.port.onmessage=(({data:e})=>{\"record\"===e.method?\"inactive\"===this._state?(this._encoderPort=e.params.encoderPort,this._isSupportingTransferables=e.params.isSupportingTransferables,this._state=\"recording\",this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:\"The internal state does not allow to process the given message.\"},id:e.id}):\"stop\"===e.method?\"recording\"===this._state&&null!==this._encoderPort?(this._stop(this._encoderPort),this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:\"The internal state does not allow to process the given message.\"},id:e.id}):\"number\"==typeof e.id&&this.port.postMessage({error:{code:-32601,message:\"The requested method is not supported.\"},id:e.id})})}process([e]){if(\"inactive\"===this._state)return!0;if(\"recording\"===this._state&&null!==this._encoderPort){if(void 0===e)throw new Error(\"No channelData was received for the first input.\");return 0===e.length&&this._stop(this._encoderPort),this._encoderPort.postMessage(e,this._isSupportingTransferables?e.map(({buffer:e})=>e):[]),!0}return!1}_stop(e){e.postMessage([]),e.close(),this._encoderPort=null,this._state=\"stopped\"}}t.RecorderAudioWorkletProcessor=s,s.parameterDescriptors=[]},function(e,t,r){\"use strict\";var s=r(0);registerProcessor(\"recorder-audio-worklet-processor\",s.RecorderAudioWorkletProcessor)}]);";
var worklet = "!function(e){var t={};function r(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var s in e)r.d(o,s,function(t){return e[t]}.bind(null,s));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=1)}([function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});class o extends AudioWorkletProcessor{constructor(e){super(e),this._encoderPort=null,this._isSupportingTransferables=!1,this._state=\"inactive\",this.port.onmessage=(({data:e})=>{\"record\"===e.method?\"inactive\"===this._state?(this._encoderPort=e.params.encoderPort,this._isSupportingTransferables=e.params.isSupportingTransferables,this._state=\"recording\",this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:\"The internal state does not allow to process the given message.\"},id:e.id}):\"stop\"===e.method?\"recording\"===this._state&&null!==this._encoderPort?(this._stop(this._encoderPort),this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:\"The internal state does not allow to process the given message.\"},id:e.id}):\"number\"==typeof e.id&&this.port.postMessage({error:{code:-32601,message:\"The requested method is not supported.\"},id:e.id})})}process([e]){if(\"inactive\"===this._state)return!0;if(\"recording\"===this._state&&null!==this._encoderPort){if(void 0===e)throw new Error(\"No channelData was received for the first input.\");return 0===e.length&&this._stop(this._encoderPort),this._encoderPort.postMessage(e,this._isSupportingTransferables?e.map(({buffer:e})=>e):[]),!0}return!1}_stop(e){e.postMessage([]),e.close(),this._encoderPort=null,this._state=\"stopped\"}}t.RecorderAudioWorkletProcessor=o,o.parameterDescriptors=[]},function(e,t,r){\"use strict\";var o=r(0);registerProcessor(\"recorder-audio-worklet-processor\",o.RecorderAudioWorkletProcessor)}]);";

@@ -28,0 +28,0 @@ var blob = new Blob([worklet], { type: 'application/javascript; charset=utf-8' });

// tslint:disable-next-line:max-line-length
export var worklet = "!function(e){var t={};function r(s){if(t[s])return t[s].exports;var o=t[s]={i:s,l:!1,exports:{}};return e[s].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,s){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:s})},r.r=function(e){Object.defineProperty(e,\"__esModule\",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=1)}([function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});class s extends AudioWorkletProcessor{constructor(e){super(e),this._encoderPort=null,this._isSupportingTransferables=!1,this._state=\"inactive\",this.port.onmessage=(({data:e})=>{\"record\"===e.method?\"inactive\"===this._state?(this._encoderPort=e.params.encoderPort,this._isSupportingTransferables=e.params.isSupportingTransferables,this._state=\"recording\",this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:\"The internal state does not allow to process the given message.\"},id:e.id}):\"stop\"===e.method?\"recording\"===this._state&&null!==this._encoderPort?(this._stop(this._encoderPort),this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:\"The internal state does not allow to process the given message.\"},id:e.id}):\"number\"==typeof e.id&&this.port.postMessage({error:{code:-32601,message:\"The requested method is not supported.\"},id:e.id})})}process([e]){if(\"inactive\"===this._state)return!0;if(\"recording\"===this._state&&null!==this._encoderPort){if(void 0===e)throw new Error(\"No channelData was received for the first input.\");return 0===e.length&&this._stop(this._encoderPort),this._encoderPort.postMessage(e,this._isSupportingTransferables?e.map(({buffer:e})=>e):[]),!0}return!1}_stop(e){e.postMessage([]),e.close(),this._encoderPort=null,this._state=\"stopped\"}}t.RecorderAudioWorkletProcessor=s,s.parameterDescriptors=[]},function(e,t,r){\"use strict\";var s=r(0);registerProcessor(\"recorder-audio-worklet-processor\",s.RecorderAudioWorkletProcessor)}]);";
export var worklet = "!function(e){var t={};function r(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var s in e)r.d(o,s,function(t){return e[t]}.bind(null,s));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=1)}([function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});class o extends AudioWorkletProcessor{constructor(e){super(e),this._encoderPort=null,this._isSupportingTransferables=!1,this._state=\"inactive\",this.port.onmessage=(({data:e})=>{\"record\"===e.method?\"inactive\"===this._state?(this._encoderPort=e.params.encoderPort,this._isSupportingTransferables=e.params.isSupportingTransferables,this._state=\"recording\",this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:\"The internal state does not allow to process the given message.\"},id:e.id}):\"stop\"===e.method?\"recording\"===this._state&&null!==this._encoderPort?(this._stop(this._encoderPort),this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:\"The internal state does not allow to process the given message.\"},id:e.id}):\"number\"==typeof e.id&&this.port.postMessage({error:{code:-32601,message:\"The requested method is not supported.\"},id:e.id})})}process([e]){if(\"inactive\"===this._state)return!0;if(\"recording\"===this._state&&null!==this._encoderPort){if(void 0===e)throw new Error(\"No channelData was received for the first input.\");return 0===e.length&&this._stop(this._encoderPort),this._encoderPort.postMessage(e,this._isSupportingTransferables?e.map(({buffer:e})=>e):[]),!0}return!1}_stop(e){e.postMessage([]),e.close(),this._encoderPort=null,this._state=\"stopped\"}}t.RecorderAudioWorkletProcessor=o,o.parameterDescriptors=[]},function(e,t,r){\"use strict\";var o=r(0);registerProcessor(\"recorder-audio-worklet-processor\",o.RecorderAudioWorkletProcessor)}]);";
//# sourceMappingURL=/build/es2015/worklet/worklet.js.map

@@ -13,8 +13,8 @@ {

"babel-runtime": "^6.26.0",
"broker-factory": "^1.2.23",
"broker-factory": "^1.2.24",
"fast-unique-numbers": "^2.0.2",
"recorder-audio-worklet-processor": "^1.0.2",
"standardized-audio-context": "^12.1.12",
"recorder-audio-worklet-processor": "^1.0.3",
"standardized-audio-context": "^12.1.13",
"tslib": "^1.9.1",
"worker-factory": "^2.4.7"
"worker-factory": "^2.4.8"
},

@@ -55,3 +55,3 @@ "description": "This module provides an loader for the RecorderAudioWorkletProcessor and the corresponding RecorderAudioWorkletNode.",

"mocha": "^5.2.0",
"rollup": "^0.59.3",
"rollup": "^0.59.4",
"rollup-plugin-babel": "^3.0.4",

@@ -61,7 +61,7 @@ "sinon": "^5.0.10",

"ts-loader": "^4.3.0",
"tsconfig-holy-grail": "^4.0.18",
"tsconfig-holy-grail": "^4.0.19",
"tslint": "^5.10.0",
"tslint-config-holy-grail": "^28.0.1",
"tslint-config-holy-grail": "^28.0.2",
"typescript": "^2.8.3",
"webpack": "^4.9.1"
"webpack": "^4.10.1"
},

@@ -90,3 +90,3 @@ "files": [

"types": "build/es2015/module.d.ts",
"version": "1.1.8"
"version": "1.1.9"
}
// tslint:disable-next-line:max-line-length
export const worklet = `!function(e){var t={};function r(s){if(t[s])return t[s].exports;var o=t[s]={i:s,l:!1,exports:{}};return e[s].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,s){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:s})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends AudioWorkletProcessor{constructor(e){super(e),this._encoderPort=null,this._isSupportingTransferables=!1,this._state="inactive",this.port.onmessage=(({data:e})=>{"record"===e.method?"inactive"===this._state?(this._encoderPort=e.params.encoderPort,this._isSupportingTransferables=e.params.isSupportingTransferables,this._state="recording",this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:"The internal state does not allow to process the given message."},id:e.id}):"stop"===e.method?"recording"===this._state&&null!==this._encoderPort?(this._stop(this._encoderPort),this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:"The internal state does not allow to process the given message."},id:e.id}):"number"==typeof e.id&&this.port.postMessage({error:{code:-32601,message:"The requested method is not supported."},id:e.id})})}process([e]){if("inactive"===this._state)return!0;if("recording"===this._state&&null!==this._encoderPort){if(void 0===e)throw new Error("No channelData was received for the first input.");return 0===e.length&&this._stop(this._encoderPort),this._encoderPort.postMessage(e,this._isSupportingTransferables?e.map(({buffer:e})=>e):[]),!0}return!1}_stop(e){e.postMessage([]),e.close(),this._encoderPort=null,this._state="stopped"}}t.RecorderAudioWorkletProcessor=s,s.parameterDescriptors=[]},function(e,t,r){"use strict";var s=r(0);registerProcessor("recorder-audio-worklet-processor",s.RecorderAudioWorkletProcessor)}]);`;
export const worklet = `!function(e){var t={};function r(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)r.d(o,s,function(t){return e[t]}.bind(null,s));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends AudioWorkletProcessor{constructor(e){super(e),this._encoderPort=null,this._isSupportingTransferables=!1,this._state="inactive",this.port.onmessage=(({data:e})=>{"record"===e.method?"inactive"===this._state?(this._encoderPort=e.params.encoderPort,this._isSupportingTransferables=e.params.isSupportingTransferables,this._state="recording",this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:"The internal state does not allow to process the given message."},id:e.id}):"stop"===e.method?"recording"===this._state&&null!==this._encoderPort?(this._stop(this._encoderPort),this.port.postMessage({id:e.id,result:null})):this.port.postMessage({error:{code:-32603,message:"The internal state does not allow to process the given message."},id:e.id}):"number"==typeof e.id&&this.port.postMessage({error:{code:-32601,message:"The requested method is not supported."},id:e.id})})}process([e]){if("inactive"===this._state)return!0;if("recording"===this._state&&null!==this._encoderPort){if(void 0===e)throw new Error("No channelData was received for the first input.");return 0===e.length&&this._stop(this._encoderPort),this._encoderPort.postMessage(e,this._isSupportingTransferables?e.map(({buffer:e})=>e):[]),!0}return!1}_stop(e){e.postMessage([]),e.close(),this._encoderPort=null,this._state="stopped"}}t.RecorderAudioWorkletProcessor=o,o.parameterDescriptors=[]},function(e,t,r){"use strict";var o=r(0);registerProcessor("recorder-audio-worklet-processor",o.RecorderAudioWorkletProcessor)}]);`;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc