View Full Version : Question with embedded media

02-23-2006, 06:32 AM
Hey is there anyway to delay a media start in the embed tag? I have an mp3 file embedded on a page and I have autostart set to true. The problem is the song starts up so fast that it is glitchy for the first, say, 5 seconds while the song buffers. If there is a way to set it to wait an alloted amount of time before the song starts to avoid the glitchyness that would be awesome :thumbsup: !

I am using a very simple media player code that looks like this:

<embed allowScriptAccess="never" SRC="__URL__" AUTOSTART=false WIDTH=144 HEIGHT=60 LOOP=true>

Any help is appreciated, thanks :D !!!

02-23-2006, 06:46 AM
I'm not even sure if this will work. HTML isn't made for preloading songs. Flash can do this though.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
function delayStart()
document.getElementById('music').innerHTML = '<embed allowScriptAccess="never" src="__URL__" autostart="1" width="144" height="60" loop="true"></embed>';

<div id="music"><embed allowScriptAccess="never" src="__URL__" autostart="0" width="144" height="60" loop="true"></embed></div>