audio-context-mock
v0.1.3
Published
Mock of webAPI AudioContext for Node
Downloads
311
Maintainers
Readme
This project is based on web-audio-engine, which is now archived. It aims to be able to use the APIS web methods in Node and add mocks of the missing functions of the initial project.
Install
npm install audio-context-mock
Usage
const AudioContext = require("audio-context-mock");
const context = new AudioContext();
API
| Method | Documentation Link | Available | | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | :-------: | | createMediaElementSource() | https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createMediaElementSource | ✅ | | createMediaStreamDestination() | https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createMediaStreamDestination | ✅ | | createMediaStreamSource() | https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createMediaStreamSource | ✅ |
createMediaElementSource
const audioSourceNode = context.createMediaElementSource();
createMediaStreamDestination
const destination = audioCtx.createMediaStreamDestination();
createMediaStreamSource
const audioSourceNode = context.createMediaStreamSource();
Contributing
Contributions welcome !