I have a file with a story Demo story. When I move to the next page, I am using the right arrow key. The old page continues playing while I am in the new page and I need to hear the new record.
- How can I create an event or make another solution when I go to the next page to stop the old playing?
I am still in the same file when I go to the next page.
<footer>
<div style="position:relative;width:100%;margin-top:0px;margin-bottom:0px;">
<div style="width:960px;height:94px;position:relative;margin:0px;margin-left:auto;margin-right:auto;margin-top:5px;margin-bottom:5px;padding:0px;overflow:hidden">
<audio controls="controls">
<source src="CarlyAndHerLemons1.ogg" type="audio/ogg" />
<source src="CarlyAndHerLemons1.mp3" type="audio/mpeg" />
</audio>
</footer>
I think I should use by code similar to document.getElementById('demo').pause()
Many thanks.