Jump to content

Why do i get no sound when I added code for autoplay?

Recommended Posts

Still a real noob here.


Here is my code:

<!DOCTYPE html><html><head><style>body{background-color:black}h1{background-color:#00ff00;}p{background-color:rgb(255,0,255);}</style></head><body><center><h1>Welcome to my Cool Website!</h1></center><p>This is a paragraph.</p><audio controls autoplay>  <source src="aroundtheworld.ogg" type="audio/ogg">  <source src="aroundtheworld.mp3" type="audio/mpeg">Your browser does not support the audio element.</audio></body></html>

As far as I can tell the paths are ok on my hard drive but when I hit refresh nothing happens. If i hit refresh again the player does show up (whereas it didnt before) but the track listing shows 0.00 and nothing plays.




hmm jsut tried it with:

<audio src="aroundtheworld.mp3" autoplay></audio>

and put in root so I guess the folders were wrong somehow.

Edited by WebBuilder
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...