Rinkusu – 22-42 Jan 5
hi, "DOMException: The element has no supported sources." for audio playing, help please
14 Replies
that means either you haven't finished loading the file or the file wasn't found where you told it to look
or potentially you're trying to play a file in a browser that doesn't support an mp3
google chrome
I used to play mp3 sounds in chrome with react projects
the path is 100% good
right now it's trying to load it from the current path you're on
so if you're on like
/blah
it's gonna try to load it from /blah/hihat.mp3
check your network tab in the devtools![](https://cdn.answeroverflow.com/928422619127091210/unknown.png)
../assets/hihat.mp3 is probably not the right path in the browser
even though it is in your file system
i see
for example
http://localhost:3000/../assets/hihat.mp3
wouldn't work properlyso where do I find this path ?
for the browser
well it depends on where your webroot is
i'm guessing thats that dist folder?
it is !
thx
ok. so then your assets folder would need to be inside dis
dist
yep
and then you'd do
/assets/hihat.mp3
This thread hasn’t had any activity in 12 hours, so it’s now locked.
If you have a followup question, you may reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/928418137769123881
Threads are closed automatically after 12 hours, or if the member who started it reacts to a message with ✅ to mark that as the accepted answer.