crystalreut Posted April 10, 2019 Share Posted April 10, 2019 Hi, I'm trying to play an mp3 audio file stored on my computer and it's not working. My browser supports mp3, I wrote this code: <!DOCTYPE html> <html> <body> <audio controls> <source src="C:\Users\reut\Downloads\Nagham(1).mp3" type="audio/mpeg"> </audio> </body> </html> Link to comment Share on other sites More sharing options...
Funce Posted April 11, 2019 Share Posted April 11, 2019 You can't access your downloads folder with a local path. You'll need to change it to a relative path, or a relative-to-root path. Surely there are better ways to play an mp3 than using HTML? If you're trying to add this to a webpage, I would recommend placing it either in the same directory as the webpage, or a subdirectory underneath the webroot directory. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now