From what I can tell, this is already fixed, but there's been no release for a long time. I'll drop my polyfill that monkey patches this functionality into version 0.2.2, which is what you get from npm, right now.
import { AudioContext } from "web-audio-api";
export function installPolyfill() {
function decodeAudioData_polyfill(audioData, successCallback, errorCallback) {
if (arguments.length > 1) {
// Callback
this.decodeAudioData(audioData, successCallback, errorCallback);
} else {
// Promise
return new Promise((success, reject) => this.decodeAudioData_original(audioData, success, reject));
}
}
if (!AudioContext.prototype.decodeAudioData_original) {
AudioContext.prototype.decodeAudioData_original = AudioContext.prototype.decodeAudioData;
AudioContext.prototype.decodeAudioData = decodeAudioData_polyfill;
}
}
Please release sometime soon. Until then, please leave this issue open, so that someone having this problem can find this solution.
From what I can tell, this is already fixed, but there's been no release for a long time. I'll drop my polyfill that monkey patches this functionality into version
0.2.2
, which is what you get fromnpm
, right now.Please release sometime soon. Until then, please leave this issue open, so that someone having this problem can find this solution.