Promise-based decodeAudioData for legacy Web Audio API
https://www.w3.org/TR/webaudio/
Support | |
---|---|
Firefox | ✅ |
Chrome 49+ | ✅ |
Older Chrome versions | ❌ |
Opera | ❌ |
Safari | ❌ |
Edge | Unknown |
Internet Explorer | ❌ No Web Audio API |
See here for full details.
npm install promise-decode-audio-data
AudioContext.prototype.decodeAudioData(audioData: ArrayBuffer): Promise<AudioBuffer>
var audioContext = new AudioContext();
audioContext.decodeAudioData(audioData).then(function(decodedData) {
// use the decoded data here
});
MIT