Uncaught (in promise) DOMException: Failed to load because no supported source was found.
Hii ! I am trying to build a music player using html, css, js. But I am having one issue. Earlier my player was playing , when I added just one song. But when I tried for all the songs using index variable, its not working for me. Please help...and tell me how to solve this.
element.addEventListener('click', (e) => { makeAllPlays(); index = parseInt(e.target.id); e.target.classList.remove('fa-play-circle'); e.target.classList.add('fa-pause-circle'); audioElement.src = '/songs/${index+1}.mp3'; audioElement.currentTime = 0; audioElement.play(); masterPlay.classList.remove('fa-play-circle'); masterPlay.classList.add('fa-pause-circle'); })
Hello ! I'm sorry but it will be hard to help you out without more context. The error makes me feel that the call to the .mp3 file you're trying to do isn't doing well. Could you trace the call in your browser network debug tool ?
Closing since there is no activity