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

    how do you turn autoplay off for FIREFOX?

    i have an embedded video in my site and autoplay is turned off. but that doesn't seem to stop firefox from playing it when the page loads. any ideas?

    http://farleft.blogspot.com

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Because I wasn't ever able to get autostart="false" or autoplay="false" I used javascript. The example below is using the same js that I use on my site.
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    <style type="text/css">
    body {
    text-align:center;
    }
    </style>
    <script type="text/javascript">  
    <!-- 
    function PlayIt(thesong){
    document.getElementById("video").innerHTML='<object id="mediaPlayer" width="165" height="165" '
          +'classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" '
          +'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" '
          +'standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">'
          +'<param name="fileName" value="'+thesong+'">'
          +'<param name="animationatStart" value="true">'
          +'<param name="transparentatStart" value="true">'
          +'<param name="autoStart" value="true">'
    	  +'<param name="transparentatstart" value="false">'
          +'<param name="showControls" value="true">'
          +'<param name="loop" value="true">'
    	  +'<param name="bgcolor" value="#000000">'
          +'<embed type="application/x-mplayer2" '
          +'pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" '
          +'bgcolor="#000000" showcontrols="true" width="165" height="165" '
          +'src="'+thesong+'" autostart="true" loop="true">'
          +'</embed>'
    +'</object>'
    }
    //-->
    </script>
    </head>
    
    <body>
    <span id="video">
    <object id="mediaPlayer" width="165" height="165" 
          classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" 
          codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
          standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
          <param name="fileName" value="">
          <param name="autoStart" value="false">
          <param name="showControls" value="true">
          <param name="loop" value="true">
    	  <param name="bgcolor" value="#000000">
          <embed type="application/x-mplayer2" 
          pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" 
          bgcolor="#000000" showcontrols="true" width="165" height="165" 
          src="" autoplay="false" autoStart="false" loop="true">
    </object>
    </span>
    <br>
    <a href="http://www.koreus.com/files/200405/mahnamahna.wmv" onclick="PlayIt(this.href);return false">Play Video</a>
    </body>
    </html>

  • #3
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks. i have another question now:

    does anyone know how to keep the contents of a window fixed when it is resized? for instance, MSN's site does that (www.msn.com). when i resize my window, it squeezes everything together.

    i have an offer of $10 on my site b/c this is driving me insane!

    http://farleft.blogspot.com

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You can't use absolute positioning, or you will get elements over lapping. Look into floats instead. MSN has a different layout than you do. They have a fixed width layout that that centers in the users browser.

  • #5
    New to the CF scene
    Join Date
    Jul 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by brit878 View Post
    i have an embedded video in my site and autoplay is turned off. but that doesn't seem to stop firefox from playing it when the page loads. any ideas?

    http://farleft.blogspot.com
    Hey,
    I had the same problem, and the solution was quite simple. Instead of setting autostart/play to "true"/"false", use "1"/"0" and it works for firefox (for me anyway). Both ways seem to work for IE. I tested this with video (using autostart), so there's a possibility its not the same for audio but I guess it should be.


  •  

    Posting Permissions

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