IonDen/ion.sound

TypeError · undefined is not a functio

plusbpm opened this issue · 2 comments

I get errors from client browsers chrome and samsung internet:

TypeError undefined is not a function 
    node_modules/ion-sound/js/ion.sound.js:321 Object.h.decode
    node_modules/ion-sound/js/ion.sound.js:313 Object.h.ready

How can I fix this?

So, the issue seems to come from:

audio.decodeAudioData(this.result.response, this.setBuffer.bind(this), this.error.bind(this));

I.e. audio belongs to an AudioContext instance, however audio.decodeAudioData() is not a function... however, according to MDN that should be supported on these browsers you did mention: https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/decodeAudioData

Will be investigated