I need some help making a very simple Jquery playlist using audio html tag. So far I got his:
<audio id="myAudio" preload="auto">
Your user agent does not support the HTML5 Audio element.
</audio>
and the jquery part:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
bgAudio = document.getElementById("myAudio");
bgAudio.volume = 0.3;
bgAudio.controls = true;
bgAudio.loop = true;
bgAudio.autoplay = true;
bgAudio.src = "bg1.mp3";
bgAudio.src = "bg2.mp3";
bgAudio.play();
});
</script>
How can I make those 2 mp3's play one after another? Thanks for the help.