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>
 | 
			
		||||
        <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>
 | 
			
		||||
@ -13,6 +13,13 @@
 | 
			
		||||
    </span>
 | 
			
		||||
    {{ end }}
 | 
			
		||||
    {{ .Content }}
 | 
			
		||||
    <script>
 | 
			
		||||
        let audio = document.getElementById("audio_player");
 | 
			
		||||
 | 
			
		||||
        function set_volume(){
 | 
			
		||||
            audio.volume = 0.4;
 | 
			
		||||
        }
 | 
			
		||||
    </script>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
{{ partial "footer.html" . }}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user