How can i add make a volume bar using JavaScript and html. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can i add make a volume bar using JavaScript and html.

I am working on a music player that uses the <input type="range"/> to increase the volume of the music. How can I add volume function to the input using JavaScript

11th Oct 2022, 10:53 PM
Elijah Adebanwo
Elijah Adebanwo - avatar
3 Answers
+ 3
The HTMLMediaElement.volume property sets the volume at which the media will be played. MDN is a great resource for for HTML CSS JS AND WEb APIs https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volume
13th Oct 2022, 8:30 PM
Chris Coder
Chris Coder - avatar
+ 1
Hi! You try Google it before asking here?
11th Oct 2022, 11:04 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
14th Oct 2022, 11:48 AM
Elijah Adebanwo
Elijah Adebanwo - avatar