gmgauthier.com/layouts/shortcodes/audio.html

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