Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

volume slider javascript

let slider = document.querySelector('input[type="slider"]')
let audio = document.querySelector('audio')
slider.min = 0;
slider.max = 100
slider.oninput = function () {
	audio.volume = slider.value / 100
}

// then create a audio element and input slider before this script 
 
PREVIOUS NEXT
Tagged: #volume #slider #javascript
ADD COMMENT
Topic
Name
3+7 =