+ 4
Sound
How can I make a sound in js and wrap it in a function, and I need the sound to play 1 time when I call it
8 ответов
+ 9
White Cat Studios
Use the Audio() object of Javascript for achieving that.
Audio allows you to have a audio and play it whenever you want.
For example
var sound = new Audio();
sound.src = "audiolink";
When you want to play
sound.play()
+ 6
🅰🅹 - ɪ'ᴍ ᴄʀɪᴍɪɴᴀʟʟʏ ɢᴏᴏᴅ!
You should answer only if you know the answer. I really don't see any reason of saying "search on google".
+ 6
Sir 🅰🅹 - ɪ'ᴍ ᴄʀɪᴍɪɴᴀʟʟʏ ɢᴏᴏᴅ!
Actually every single thing asked on this Q/A is available on Google. Stack overflow is much much much bigger and advanced.
So we could recommend every single one to go on Google, can we? No
You can always suggest them Google but give some links they can refer to directly 😉😉
+ 4
🐼 Coding Panda 🐼 I know the answer but if we can easily get on Google then I can suggest. No offense.
+ 3
🅰🅹 - ɪ'ᴍ ᴄʀɪᴍɪɴᴀʟʟʏ ɢᴏᴏᴅ! Then why we need Q&A? 🤔
+ 1
Try to find on Google.
+ 1
$hardul B Ok then I will ask what is java and no-one can say this is basic things or you can get on Google.😂😂
- 3
https://www.sololearn.com/learn/Java/2131/
Yes no one will say.