customize the audio player. Set volume to 40% by default

This commit is contained in:
Greg Gauthier 2022-01-01 17:53:21 +00:00
parent 06c4bb0832
commit 5fac92339e

View File

@ -1,5 +1,12 @@
<div style="text-align: center;">
<audio controls>
<div style="text-align: center">
<audio id="audio_player" style="width:80%" onloadeddata="set_volume()" controls>
<source src="{{ index .Params 0 }}" type="audio/mpeg">
</audio>
<script>
var audio = document.getElementById("audio_player");
function set_volume(){
audio.volume = 0.4;
}
</script>
</div>