...

View Full Version : how do you turn autoplay off for FIREFOX?



brit878
06-15-2005, 02:48 AM
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

_Aerospace_Eng_
06-15-2005, 03:28 AM
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.

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

brit878
06-15-2005, 06:08 AM
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

_Aerospace_Eng_
06-15-2005, 07:20 AM
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.

erethir
07-23-2009, 12:22 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum