promise-decode-audio-data
v0.4.1
Published
Promise-based decodeAudioData for legacy Web Audio API
Downloads
1,007
Maintainers
Readme
< Promise > decodeAudioData
Promise-based decodeAudioData for legacy Web Audio API
Specification
https://www.w3.org/TR/webaudio/
Native API supports
| | Support | | --------------------- |:--------------------:| | Firefox | :white_check_mark: | | Chrome 49+ | :white_check_mark: | | Older Chrome versions | :x: | | Opera | :x: | | Safari | :x: | | Edge | Unknown | | Internet Explorer | :x: No Web Audio API |
See here for full details.
Installation
npm install promise-decode-audio-data
downloads
API
AudioContext.prototype.decodeAudioData(audioData: ArrayBuffer): Promise<AudioBuffer>
Example
var audioContext = new AudioContext();
audioContext.decodeAudioData(audioData).then(function(decodedData) {
// use the decoded data here
});
License
MIT