How to control the audio sound in JavaScript? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

How to control the audio sound in JavaScript?

suppose i have a button if i click the button the sound of the audio gradually increase please explain it too on your answer with better example's.

11th Mar 2018, 6:56 AM
🦋FEATHER🦋
🦋FEATHER🦋 - avatar
3 Answers
+ 6
var audio=new Audio("song.src"); vol=0; audio.volume=vol; button.onclick=vol++;
11th Mar 2018, 7:14 AM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar
+ 3
yes
11th Mar 2018, 7:17 AM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar
+ 1
is Volume is the keyword in JavaScript
11th Mar 2018, 7:16 AM
🦋FEATHER🦋
🦋FEATHER🦋 - avatar