JSPM

audio-context-mock

0.1.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 81
  • Score
    100M100P100Q80159F
  • License ISC

Mock of webAPI AudioContext for Node

Package Exports

  • audio-context-mock

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (audio-context-mock) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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 !