messed around

This commit is contained in:
alicestrt 2020-09-29 15:40:02 +02:00
parent ce69065a36
commit 47e6a4fd37

View File

@ -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>