Web Audio OfflineAudioContext not found

#1

I’m using ionic 4 with Web Audio feature on iOS.

I need OfflineAudioContext to process the audio file, but it seems not supported.

const sampleRate = 44100;
const audioCtx = new OfflineAudioContext(1, sampleRate, sampleRate);

---

ReferenceError: Can't find variable: OfflineAudioContext

Is this related to ionic, or iOS webview doesn’t support this? And it also doesn’t work for AudioContext.

#2

What is the full error message?

#3

Thanks. I fixed by adding declare var AudioContext;