[Pas2js] project SaintClaus for pas2js 1.5.1

Michael Van Canneyt michael at freepascal.org
Thu Oct 17 08:20:41 CEST 2019



On Wed, 16 Oct 2019, warleyalex via Pas2js wrote:

> The new changes:
> ===========
>
>  (...)
>  PlaySound( GetSound('assets/jingle_bells.mp3', true) ); // the audio play
> for me without errors :)
>
>
> [quote] The class is not Audio, but HTMLAudioElement. [/quote]
>
> --> if the GetSound method return the TJSHTMLAudioElement instead of
> TJSAudio, I've got "Illegal constructor" console error, the audio does not
> play for me :)

I am aware of this, but your solution is wrong. The class name is HTMLAudioElement.

Specially for such occasions, Mattias implemented a new constructor syntax 
which I need to check & implement.

Michael.


More information about the Pas2js mailing list