asasass
1
What’s missing, and needed here is the javascript for the volume slider.
I’m not sure how that would be written.

<audio controls class="player">
<source src="" type="audio/mpeg">
</audio>
<br><br>
<button class="style" onclick="document.querySelector('.player').play()">Play</button>
<button class="style" onclick="document.querySelector('.player').pause()">Pause</button>
<div class="volbox">
Volume:<br/>
<input class="volume" type="range" min="0" max="100" step="0.1">
</div>
I’m seeing that there are numerous ways this code could be written.
And range is used for the slider.
Gandalf
2
You already have play/pause controls by adding “controls” in your audio tag. Why use buttons as well?
asasass
3
Because I’m going to remove the controls from it. And so, I thought to do that, I would want to add in a volume slider as a way to control the volume.
To set that part up, javascript would be needed.
<audio class="player">

Gandalf
4
It would help if you got your code right before posting then, save wasting people’s time reviewing something you intend to change.
asasass
5
I’m not wasting people’s time, I’m trying to figure out how to get the volume slider to work.
That’s what my question was.
I should have have made it more clear, I’m sorry.
system
Closed
6
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.