I am new to this and I have a question. how can i put a volume slider? Thank you!! I can't find any code for the moment that works for me, I hope your help
HTML: <a id="play-pause-button" class="fa fa-play">
JavaScript:
<script type="text/javascript">
var audio = new Audio("http://21273.live.streamtheworld.com/LOS40_DANCE.mp3");
$('#play-pause-button').on("click",function(){
if($(this).hasClass('fa-play'))
{
$(this).removeClass('fa-play');
$(this).addClass('fa-pause');
autoplay = true;
audio.play();
audio.muted = false;
}
else
{
audio.muted = true;
$(this).removeClass('fa-pause');
$(this).addClass('fa-play');
}
});
audio.onended = function() {
$("#play-pause-button").removeClass('fa-pause');
$("#play-pause-button").addClass('fa-play');
};
</script>