Skip to content Skip to sidebar Skip to footer

Html5 Audio Javascript Looping But

function nextSong() { var v30 = 1; var v07 = 1; var v......[continues] var audioPlayer = document.getElementsByTagName('audio')[0]; if (v07 == '1') { au

Solution 1:

audioPlayer.src='wavs/1507.mp3';audioPlayer.src='wavs/1530.mp3';

You are setting the source twice on the same element, which results in it only playing the second source (1530.mp3) as it overwrites the first source (1507.mp3).

You need two audio elements to play two files.

Post a Comment for "Html5 Audio Javascript Looping But"