WebAudio API questions

I'm playing with the WebAudio API in WebCore and am starting out by trying to reproduce some examples I've found online. They invariably all start out like this (in JS):

var audioContext = new AudioContext();

I'm guessing the equivalent in Delphi is:

audioContext := TJSAudioContext.Create;

Here's the class hierarchy I can see:

TJSAudioContext --> TJSBaseAudioContext --> TJSEventTarget --> TObject

So why does the compiler say it cannot find a .Create method? Nor even a .new method. (Well constructors or ... anything!)

In fact, none of the types in the imported class contain constructors, which is quite puzzling.

How are you supposed to create instances of them?

One common type, TJSObject, contains a 'new' constructor.

But there are only a couple of types in the imported WebAudio API library that descend from TJSObject, and they look pretty minor.

What sort of magic incantation is needed to get this to work?

BTW, I'm using Delphi 10.3.3 with the latest WebCore installed, although I get the exact same results in D10.4.

I was in touch with the pas2js RTL responsible and an issue happened during the import of webaudio.pas.
This was now addressed and the next update will have these latest RTL enhancements.

Awesome, I can’t wait!

Do you know when it’s like to be posted?

I’ve got someone chomping at the bit to hear the software actually make some noise. :)

-David Schwartz

We are working hard on the next major update right now.
The scope of this work is enormous but yet we hope to release an update as soon as possible.