customize the audio player. Set volume to 40% by default
This commit is contained in:
parent
06c4bb0832
commit
5fac92339e
@ -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>
|
Loading…
Reference in New Issue
Block a user