put the volume script on the show notes page stub, rather than in the shortcode. Volume will ONLY get set on shownotes pages
This commit is contained in:
parent
f5607e3ff4
commit
52fdd033e6
@ -2,10 +2,4 @@
|
|||||||
<audio id="audio_player" style="width:80%" onloadeddata="set_volume()" controls>
|
<audio id="audio_player" style="width:80%" onloadeddata="set_volume()" controls>
|
||||||
<source src="{{ index .Params 0 }}" type="audio/mpeg">
|
<source src="{{ index .Params 0 }}" type="audio/mpeg">
|
||||||
</audio>
|
</audio>
|
||||||
<script>
|
|
||||||
let audio = document.getElementById("audio_player");
|
|
||||||
function set_volume(){
|
|
||||||
audio.volume = 0.4;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</div>
|
</div>
|
@ -13,6 +13,13 @@
|
|||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
<script>
|
||||||
|
let audio = document.getElementById("audio_player");
|
||||||
|
|
||||||
|
function set_volume(){
|
||||||
|
audio.volume = 0.4;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
|
Loading…
Reference in New Issue
Block a user