Socket
Socket
Sign inDemoInstall

audioworklet-polyfill

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    audioworklet-polyfill

AudioWorklet polyfill using the legacy ScriptProcessor API.


Version published
Weekly downloads
480
decreased by-7.34%
Maintainers
1
Install size
32.5 kB
Created
Weekly downloads
 

Readme

Source

AudioWorklet Polyfill

AudioWorklet Polyfill npm

1kB polyfill for AudioWorklet.

audioworklet-polyfill is a tiny JavaScript library that brings AudioWorklet support to all major browsers: Chrome, Firefox, Safari and Edge. It uses ScriptProcessorNode under the hood, and runs your Worklet code in an isolated scope on the main thread (read why).

Basic DemoDSP Playground Demo

New to AudioWorklet? Check out this great Introduction and Demos or the AudioWorklet Examples.

Usage

<script src="audioworklet-polyfill.js"></script>
<!-- or: -->
<script src="https://unpkg.com/audioworklet-polyfill/dist/audioworklet-polyfill.js"></script>

Or with a bundler:

import 'audioworklet-polyfill';

... or with ES Modules on the web:

import('https://unpkg.com/audioworklet-polyfill/dist/audioworklet-polyfill.js');

Roadmap

  • Improve support for custom parameters

Why are Worklets emulated on the main thread?

This polyfill is intended to be a bridging solution until AudioWorklet is implemented across all browsers. It's an improvement over ScriptProcessorNode even though that's what it uses under the hood, because code written using this polyfill is forwards-compatible: as native support improves, your application improves. This polyfill offers a simple, future-proof alternative to ScriptProcessorNode without introducing Workers or relying on shared memory.

Similar Libraries

@jariseon has implemented a similar polyfill that uses Web Workers for audio processing.

License

Apache 2.0

Keywords

FAQs

Last updated on 19 Sep 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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