constant-source-node

1.1.1 • Public • Published

ConstantSourceNode

Build Status NPM Version License

ConstantSourceNode for legacy Web Audio API

https://webaudio.github.io/web-audio-api/#ConstantSourceNode

Installation

npm install constant-source-node

downloads:

Quick Example

At first, call polyfill() method.

require("ConstantSourceNode").polyfill();
<script src="/path/to/constant-source-node.js"></script>
<script>ConstantSourceNode.polyfill();</script> 

Then, you can use createConstantSource() method at AudioContext.

var constantSource = audioContext.createConstantSource();
 
constantSource.offset.value = 10;

Demo

https://mohayonao.github.io/constant-source-node/

API

ConstantSourceNode

  • constructor(audioContext: AudioContext, opts={})

Class Methods

  • polyfill(): void
    • install createConstantSource() method to BaseAudioContext.prototype if needed.
  • install(): void
    • install createConstantSource() method to BaseAudioContext.prototype force

Instance Attributes

  • offset: AudioParam readonly

AudioGraph

constant-source-node

License

MIT

Package Sidebar

Install

npm i constant-source-node

Weekly Downloads

1

Version

1.1.1

License

MIT

Last publish

Collaborators

  • mohayonao