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 6.0.22 to 6.0.23

2

build/es5/bundle.js

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

// This is the minified and stringified code of the recorder-audio-worklet-processor package.
var worklet = "(()=>{var e={133:function(e,t,r){!function(e,t,r,o,n,s,u){\"use strict\";function a(e,t,r){return t=n(t),o(e,p()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}var i=function(o){function n(){var e;return t(this,n),(e=a(this,n))._encoderPort=null,e._numberOfChannels=0,e._state=\"inactive\",e.port.onmessage=function(t){var r=t.data;\"pause\"===r.method?\"active\"===e._state||\"recording\"===e._state?(e._state=\"paused\",e._sendAcknowledgement(r.id)):e._sendUnexpectedStateError(r.id):\"record\"===r.method?\"inactive\"===e._state?(e._encoderPort=r.params.encoderPort,e._state=\"active\",e._sendAcknowledgement(r.id)):e._sendUnexpectedStateError(r.id):\"resume\"===r.method?\"paused\"===e._state?(e._state=\"active\",e._sendAcknowledgement(r.id)):e._sendUnexpectedStateError(r.id):\"stop\"===r.method?\"active\"!==e._state&&\"paused\"!==e._state&&\"recording\"!==e._state||null===e._encoderPort?e._sendUnexpectedStateError(r.id):(e._stop(e._encoderPort),e._sendAcknowledgement(r.id)):\"number\"==typeof r.id&&e.port.postMessage({error:{code:-32601,message:\"The requested method is not supported.\"},id:r.id})},e}return s(n,o),r(n,[{key:\"process\",value:function(t){var r=e(t,1)[0];if(\"inactive\"===this._state||\"paused\"===this._state)return!0;if(\"active\"===this._state){if(void 0===r)throw new Error(\"No channelData was received for the first input.\");if(0===r.length)return!0;this._state=\"recording\"}if(\"recording\"===this._state&&null!==this._encoderPort){if(void 0===r)throw new Error(\"No channelData was received for the first input.\");return 0===r.length?this._encoderPort.postMessage(Array.from({length:this._numberOfChannels},(function(){return 128}))):(this._encoderPort.postMessage(r,r.map((function(e){return e.buffer}))),this._numberOfChannels=r.length),!0}return!1}},{key:\"_sendAcknowledgement\",value:function(e){this.port.postMessage({id:e,result:null})}},{key:\"_sendUnexpectedStateError\",value:function(e){this.port.postMessage({error:{code:-32603,message:\"The internal state does not allow to process the given message.\"},id:e})}},{key:\"_stop\",value:function(e){e.postMessage([]),e.close(),this._encoderPort=null,this._state=\"stopped\"}}]),n}(u(AudioWorkletProcessor));i.parameterDescriptors=[],registerProcessor(\"recorder-audio-worklet-processor\",i)}(r(715),r(383),r(579),r(452),r(72),r(511),r(837))},79:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o},e.exports.__esModule=!0,e.exports.default=e.exports},987:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},475:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e},e.exports.__esModule=!0,e.exports.default=e.exports},383:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")},e.exports.__esModule=!0,e.exports.default=e.exports},646:(e,t,r)=>{var o=r(636),n=r(550);e.exports=function(e,t,r){if(n())return Reflect.construct.apply(null,arguments);var s=[null];s.push.apply(s,t);var u=new(e.bind.apply(e,s));return r&&o(u,r.prototype),u},e.exports.__esModule=!0,e.exports.default=e.exports},579:(e,t,r)=>{var o=r(736);function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,\"prototype\",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},72:e=>{function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},511:(e,t,r)=>{var o=r(636);e.exports=function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,\"prototype\",{writable:!1}),t&&o(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},691:e=>{e.exports=function(e){try{return-1!==Function.toString.call(e).indexOf(\"[native code]\")}catch(t){return\"function\"==typeof e}},e.exports.__esModule=!0,e.exports.default=e.exports},550:e=>{function t(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(r){}return(e.exports=t=function(){return!!r},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},156:e=>{e.exports=function(e,t){var r=null==e?null:\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(null!=r){var o,n,s,u,a=[],p=!0,i=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;p=!1}else for(;!(p=(o=s.call(r)).done)&&(a.push(o.value),a.length!==t);p=!0);}catch(e){i=!0,n=e}finally{try{if(!p&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(i)throw n}}return a}},e.exports.__esModule=!0,e.exports.default=e.exports},752:e=>{e.exports=function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")},e.exports.__esModule=!0,e.exports.default=e.exports},452:(e,t,r)=>{var o=r(738).default,n=r(475);e.exports=function(e,t){if(t&&(\"object\"===o(t)||\"function\"==typeof t))return t;if(void 0!==t)throw new TypeError(\"Derived constructors may only return object or undefined\");return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},636:e=>{function t(r,o){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},715:(e,t,r)=>{var o=r(987),n=r(156),s=r(122),u=r(752);e.exports=function(e,t){return o(e)||n(e,t)||s(e,t)||u()},e.exports.__esModule=!0,e.exports.default=e.exports},45:(e,t,r)=>{var o=r(738).default;e.exports=function(e,t){if(\"object\"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||\"default\");if(\"object\"!=o(n))return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},736:(e,t,r)=>{var o=r(738).default,n=r(45);e.exports=function(e){var t=n(e,\"string\");return\"symbol\"==o(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(r){return e.exports=t=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},122:(e,t,r)=>{var o=r(79);e.exports=function(e,t){if(e){if(\"string\"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},837:(e,t,r)=>{var o=r(72),n=r(636),s=r(691),u=r(646);function a(t){var r=\"function\"==typeof Map?new Map:void 0;return e.exports=a=function(e){if(null===e||!s(e))return e;if(\"function\"!=typeof e)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return u(e,arguments,o(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,a(t)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var s=t[o]={exports:{}};return e[o].call(s.exports,s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{\"use strict\";r(133)})()})();"; // tslint:disable-line:max-line-length
var worklet = "(()=>{var e={133:function(e,t,r){!function(e,t,r,o,n,s,u){\"use strict\";function a(e,t,r){return t=n(t),o(e,p()?Reflect.construct(t,r||[],n(e).constructor):t.apply(e,r))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}var i=function(o){function n(){var e;return t(this,n),(e=a(this,n))._encoderPort=null,e._numberOfChannels=0,e._state=\"inactive\",e.port.onmessage=function(t){var r=t.data;\"pause\"===r.method?\"active\"===e._state||\"recording\"===e._state?(e._state=\"paused\",e._sendAcknowledgement(r.id)):e._sendUnexpectedStateError(r.id):\"record\"===r.method?\"inactive\"===e._state?(e._encoderPort=r.params.encoderPort,e._state=\"active\",e._sendAcknowledgement(r.id)):e._sendUnexpectedStateError(r.id):\"resume\"===r.method?\"paused\"===e._state?(e._state=\"active\",e._sendAcknowledgement(r.id)):e._sendUnexpectedStateError(r.id):\"stop\"===r.method?\"active\"!==e._state&&\"paused\"!==e._state&&\"recording\"!==e._state||null===e._encoderPort?e._sendUnexpectedStateError(r.id):(e._stop(e._encoderPort),e._sendAcknowledgement(r.id)):\"number\"==typeof r.id&&e.port.postMessage({error:{code:-32601,message:\"The requested method is not supported.\"},id:r.id})},e}return s(n,o),r(n,[{key:\"process\",value:function(t){var r=e(t,1)[0];if(\"inactive\"===this._state||\"paused\"===this._state)return!0;if(\"active\"===this._state){if(void 0===r)throw new Error(\"No channelData was received for the first input.\");if(0===r.length)return!0;this._state=\"recording\"}if(\"recording\"===this._state&&null!==this._encoderPort){if(void 0===r)throw new Error(\"No channelData was received for the first input.\");return 0===r.length?this._encoderPort.postMessage(Array.from({length:this._numberOfChannels},(function(){return 128}))):(this._encoderPort.postMessage(r,r.map((function(e){return e.buffer}))),this._numberOfChannels=r.length),!0}return!1}},{key:\"_sendAcknowledgement\",value:function(e){this.port.postMessage({id:e,result:null})}},{key:\"_sendUnexpectedStateError\",value:function(e){this.port.postMessage({error:{code:-32603,message:\"The internal state does not allow to process the given message.\"},id:e})}},{key:\"_stop\",value:function(e){e.postMessage([]),e.close(),this._encoderPort=null,this._state=\"stopped\"}}])}(u(AudioWorkletProcessor));i.parameterDescriptors=[],registerProcessor(\"recorder-audio-worklet-processor\",i)}(r(715),r(383),r(579),r(452),r(72),r(511),r(837))},79:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o},e.exports.__esModule=!0,e.exports.default=e.exports},987:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},475:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e},e.exports.__esModule=!0,e.exports.default=e.exports},383:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")},e.exports.__esModule=!0,e.exports.default=e.exports},646:(e,t,r)=>{var o=r(636),n=r(550);e.exports=function(e,t,r){if(n())return Reflect.construct.apply(null,arguments);var s=[null];s.push.apply(s,t);var u=new(e.bind.apply(e,s));return r&&o(u,r.prototype),u},e.exports.__esModule=!0,e.exports.default=e.exports},579:(e,t,r)=>{var o=r(736);function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,\"prototype\",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},72:e=>{function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},511:(e,t,r)=>{var o=r(636);e.exports=function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,\"prototype\",{writable:!1}),t&&o(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},691:e=>{e.exports=function(e){try{return-1!==Function.toString.call(e).indexOf(\"[native code]\")}catch(t){return\"function\"==typeof e}},e.exports.__esModule=!0,e.exports.default=e.exports},550:e=>{function t(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(r){}return(e.exports=t=function(){return!!r},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},156:e=>{e.exports=function(e,t){var r=null==e?null:\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(null!=r){var o,n,s,u,a=[],p=!0,i=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;p=!1}else for(;!(p=(o=s.call(r)).done)&&(a.push(o.value),a.length!==t);p=!0);}catch(e){i=!0,n=e}finally{try{if(!p&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(i)throw n}}return a}},e.exports.__esModule=!0,e.exports.default=e.exports},752:e=>{e.exports=function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")},e.exports.__esModule=!0,e.exports.default=e.exports},452:(e,t,r)=>{var o=r(738).default,n=r(475);e.exports=function(e,t){if(t&&(\"object\"===o(t)||\"function\"==typeof t))return t;if(void 0!==t)throw new TypeError(\"Derived constructors may only return object or undefined\");return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},636:e=>{function t(r,o){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},715:(e,t,r)=>{var o=r(987),n=r(156),s=r(122),u=r(752);e.exports=function(e,t){return o(e)||n(e,t)||s(e,t)||u()},e.exports.__esModule=!0,e.exports.default=e.exports},45:(e,t,r)=>{var o=r(738).default;e.exports=function(e,t){if(\"object\"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||\"default\");if(\"object\"!=o(n))return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},736:(e,t,r)=>{var o=r(738).default,n=r(45);e.exports=function(e){var t=n(e,\"string\");return\"symbol\"==o(t)?t:t+\"\"},e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(r){return e.exports=t=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},122:(e,t,r)=>{var o=r(79);e.exports=function(e,t){if(e){if(\"string\"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},837:(e,t,r)=>{var o=r(72),n=r(636),s=r(691),u=r(646);function a(t){var r=\"function\"==typeof Map?new Map:void 0;return e.exports=a=function(e){if(null===e||!s(e))return e;if(\"function\"!=typeof e)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return u(e,arguments,o(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,a(t)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var s=t[o]={exports:{}};return e[o].call(s.exports,s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{\"use strict\";r(133)})()})();"; // tslint:disable-line:max-line-length

@@ -205,0 +205,0 @@ var addRecorderAudioWorkletModule = createAddRecorderAudioWorkletModule(Blob, URL, worklet);

@@ -12,17 +12,17 @@ {

"dependencies": {
"@babel/runtime": "^7.24.0",
"broker-factory": "^3.0.94",
"fast-unique-numbers": "^9.0.1",
"recorder-audio-worklet-processor": "^5.0.15",
"standardized-audio-context": "^25.3.66",
"subscribable-things": "^2.1.32",
"@babel/runtime": "^7.24.1",
"broker-factory": "^3.0.95",
"fast-unique-numbers": "^9.0.2",
"recorder-audio-worklet-processor": "^5.0.16",
"standardized-audio-context": "^25.3.67",
"subscribable-things": "^2.1.33",
"tslib": "^2.6.2",
"worker-factory": "^7.0.21"
"worker-factory": "^7.0.22"
},
"description": "This module provides a loader for the RecorderAudioWorkletProcessor and the corresponding RecorderAudioWorkletNode.",
"devDependencies": {
"@babel/core": "^7.24.0",
"@babel/plugin-external-helpers": "^7.23.3",
"@babel/plugin-transform-runtime": "^7.24.0",
"@babel/preset-env": "^7.24.0",
"@babel/core": "^7.24.3",
"@babel/plugin-external-helpers": "^7.24.1",
"@babel/plugin-transform-runtime": "^7.24.3",
"@babel/preset-env": "^7.24.3",
"@commitlint/cli": "^18.6.1",

@@ -37,3 +37,3 @@ "@commitlint/config-angular": "^18.6.1",

"eslint": "^8.57.0",
"eslint-config-holy-grail": "^58.0.9",
"eslint-config-holy-grail": "^58.0.10",
"grunt": "^1.6.1",

@@ -53,7 +53,7 @@ "grunt-cli": "^1.4.3",

"load-grunt-config": "^4.0.1",
"memfs": "^4.7.7",
"memfs": "^4.8.0",
"mocha": "^10.3.0",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"rollup": "^4.12.1",
"rollup": "^4.13.0",
"sinon": "^17.0.1",

@@ -66,4 +66,4 @@ "sinon-chai": "^3.7.0",

"tslint-config-holy-grail": "^56.0.0",
"typescript": "^5.4.2",
"webpack": "^5.90.3",
"typescript": "^5.4.3",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4"

@@ -96,3 +96,3 @@ },

"types": "build/es2019/module.d.ts",
"version": "6.0.22"
"version": "6.0.23"
}
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