Need help, pulling my hair!

I am doing the Drum Machine assignment for React. Instead, I chose to have my own audio sounds and I am having an issue right off the bat.
Running imported audio clips works when file are added to the public folder in React. But nothing works (file path is correct) when an audioclips folder is added to the src folder.

Can someone please clarify why this is so. I don’t understand why my js in my App.js file does not want to play nicely.
Thanks

You’re going to have to show some code, but from description I’d assume that your links are to files in the src folder, which isn’t a thing that exists in the built app

Hi Dan, when I inspect the issue, the console shows this
“App.js:51 Uncaught (in promise) DOMException: The element has no supported sources.”

I’m now finding out that when the play() method is called on Chrome, the

Dan, thank you for the insight. What you mentioned turned out to be my solution. I stored the audio files in public, which is different than any other methods I saw on the internet. Mostly, other people have been using external links to the audio clips, maybe that was the difference.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.