Audio in Javascript and HTML

Does anyone know how to add audio in both Javascript and HTML?

16 07

I tried adding sound for a HTML image using both HTML and Javascript but it doesn’t work. Can anyone suggest how I can add sound onto it.

The webaudio_* examples are a good start to learn.

https://threejs.org/examples/?q=webaudio

Look there.

to find there Collection of examples from discourse.threejs.org

try there Audio Recorder

Why dont use https://howlerjs.com/
In my project I have Howler for simple sounds (music, ambinet, effects) and threeJs do positional Audio and other sound 3D stuff. :slight_smile:

Example:
https://artstrona.pl/prod/?level=7

Positional Audio is water sound & church bell (hear when you approaching )

1 Like