Browse Source

messed around

master
alicestrt 4 years ago
parent
commit
47e6a4fd37
  1. 13
      templates/hello.html

13
templates/hello.html

@ -25,7 +25,7 @@
</div>
</div>
<div class="col-md-9">
<audio controls>
<audio id="audio-1" controls onclick="Start()">
<source src="../static/audio/myths.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
@ -90,6 +90,17 @@
var elem = document.getElementById("ele");
elem.scrollIntoView();
}
var soundToPlay = document.getElementById('audio-1');
function Start(){
randomStartingTime = Random.Range(0.0, 3099.0);
PlaySound();
}
function PlaySound(){
soundToPlay.time = randomStartingTime;
soundToPlay.Play();
}
</script>

Loading…
Cancel
Save