gmgauthier.com/layouts/shortcodes/audio.html
2022-01-01 18:05:38 +00:00

11 lines
361 B
HTML

<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>
let audio = document.getElementById("audio_player");
function set_volume(){
audio.volume = 0.4;
}
</script>
</div>