Stopping the “Autostart” command in HTML

When I uploaded my audio clips onto my website, I had an issue with the autostart command in both Chrome and Firefox. I used the typical embed audio code

< embed src = "...mp3" autostart = "false" volume = "50" height = "20" width = "350"/ >

to put the track on my website.

Using the “false” command usually produces the opposite effect of <autostart=”true”>. (Thanks, Captain Obvious). “True” manipulates the clip so that it starts as soon as the website loads. This might not be a problem for background music, but for the clips I wanted to post as my homework, this posed an issue.

However, as I updated my code to <autostart=”false”> and refreshed my webpage, the tracks automatically started up. After a bit of research, I discovered the trick.

There is a slight glitch in the default coding for Mozilla and Google Chrome. After the <autostart=”false”> command, you have to specify the type of file the browser is dealing with.

< embed src = "...mp3" autostart = "false" type = "audio/mpeg" volume = "50" height = "20" width = "350"/>

This enables the browser to recognize the “false” command and your clips will be ready to start at your users’ convenience.

Don’t forget to check your site at a CSS or HTML validator!

–Hannah Miller

~ by him22 on February 21, 2011.