StereoPannerNode for legacy Web Audio API
http://webaudio.github.io/web-audio-api/#the-stereopannernode-interface
npm install stereo-panner-node
At first, call polyfill()
method.
require("StereoPannerNode").polyfill();
<script src="/path/to/stereo-panner-node.js"></script>
<script>StereoPannerNode.polyfill();</script>
Then, you can use createStereoPanner()
method at AudioContext.
var stereoPanner = audioContext.createStereoPanner();
stereoPanner.pan.value = Math.random() * 2 - 1;
https://mohayonao.github.io/stereo-panner-node/
constructor(audioContext: AudioContext)
polyfill(): void
- install
createStereoPanner()
method toAudioContext.prototype
if needed.
- install
install(): void
- install
createStereoPanner()
method toAudioContext.prototype
force
- install
pan: AudioParam
readonly
MIT