gmgauthier.com/layouts/shortcodes/audio.html

11 lines
361 B
HTML
Raw Normal View History

<div style="text-align: center">
<audio id="audio_player" style="width:80%" onloadeddata="set_volume()" controls>
2021-04-11 11:26:43 +00:00
<source src="{{ index .Params 0 }}" type="audio/mpeg">
</audio>
<script>
2022-01-01 18:05:38 +00:00
let audio = document.getElementById("audio_player");
function set_volume(){
audio.volume = 0.4;
}
</script>
2021-11-27 16:25:19 +00:00
</div>