Audio Problem VSCode

Hi everyone, so I am currently learning CSS HTML and especially Java Script, and I made some sort of Music Player, by coding it from someone. Now I tried to add my Mp3 Files, and it says "An error occurred while loading the audio file". After I downloaded the guy that made the Player and inserting them, they work. Does anyone know how to fix it?
23 Replies
Jochem
Jochem13mo ago
this really doesn't sound like a VSCode problem. Are you having this issue in your browser? If so, please read #how-to-ask-good-questions then make a new post in #front-end that shares your code
FireCreeper21
FireCreeper21OP13mo ago
what do you mean in my browser? No If I drag and drop my own audio files into vs code, opens up a window IN vs code that says "error while loading the audio file". If I use one of the person that made the original player and do the same thing, they load
Jochem
Jochem13mo ago
I'm not sure why you'd want to play an audio file in vscode? seems like it supports mp3 files, what type of audio file are you dragging on there?
FireCreeper21
FireCreeper21OP13mo ago
.mp3 so It should work As i mentioned, it is supposed to be a small audio player where I can put some audio files wait I can send screenshot
FireCreeper21
FireCreeper21OP13mo ago
This is what it looks like If I drag one of the authors files
No description
FireCreeper21
FireCreeper21OP13mo ago
this si what it looks like with one of mine
No description
FireCreeper21
FireCreeper21OP13mo ago
both are .mp3
Jochem
Jochem13mo ago
does yours play in another player?
FireCreeper21
FireCreeper21OP13mo ago
Yep both do
Jochem
Jochem13mo ago
I'm still not sure why you want it to work when you drag it onto VS Code though like, what does that accomplish?
FireCreeper21
FireCreeper21OP13mo ago
For the music player, I refer to the folder assets and pull the mp3 files in numerical order but it doesnt load in vs code and thus it doesnt play with my music player
Jochem
Jochem13mo ago
but VS Code isn't involved in playing the file when you open your project in your browser
FireCreeper21
FireCreeper21OP13mo ago
no but it also doesnt play in my browser
Jochem
Jochem13mo ago
how did you make the mp3 file?
FireCreeper21
FireCreeper21OP13mo ago
downloaded it in the live preview addon mine againt dont play and his do, as well in the browser
Jochem
Jochem13mo ago
can you legally link to it?
FireCreeper21
FireCreeper21OP13mo ago
YT premium and then converted it and obv renamed
Jochem
Jochem13mo ago
did you change the extension?
FireCreeper21
FireCreeper21OP13mo ago
no it downlaoded as mp3 with that I mean renamed and moved it to my folder, so converted it to a theoretically functional file for the vs code ah whatever I give up thx for ur help
Jochem
Jochem13mo ago
if you downloaded it from youtube, it might have drm on it or something, that's the only thing I can think of
FireCreeper21
FireCreeper21OP13mo ago
wait Ill try using my python script to download it that might work well alr, kinda worked in the browser it plays now but not in vs code and that live preview addon
Jochem
Jochem13mo ago
sounds like a codec issue maybe, hard to tell without the file. But you may want to use live server instead of the preview in vscode https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer that way you can test in your browser, which is after all where you'll be using your code
FireCreeper21
FireCreeper21OP13mo ago
Ok thx it works okay now Ill use that now
Want results from more Discord servers?
Add your server