Jump to content

Audio not playing


crystalreut
 Share

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...