Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2006
    Thanked 0 Times in 0 Posts

    Question with embedded media

    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 !

    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 !!!

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    In a place far, far away...
    Thanked 1,043 Times in 1,019 Posts
    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>
    ||||If you are getting paid to do a job, don't ask for help on it!||||


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts