PDA

View Full Version : Video will not play using FF



kaitco
06-05-2006, 07:25 AM
I have a video that I would like to display as full screen through windows media player. The way I currently have it set up works perfectly, but only in IE. FF, Netscape and Opera do not play the file.

I think that the problem lies with the script here:

<script type="text/javascript">
function keyPressHandler(e) {
var kC = (window.event) ? // MSIE or Firefox?
event.keyCode : e.keyCode;
var Esc = (window.event) ?
27 : e.DOM_VK_ESCAPE // MSIE : Firefox <--specifically with this
if(kC==Esc) window.close();
}
</script>

...however, I am not sure what the issue is or how to fix it.

Here is the code I am using for the embedded media player:


<body onkeypress="keyPressHandler(event)">
<object id="mediaPlayer" width="100%" height="100%"
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="sweethome.mpg">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="loop" value="false">
<embed type="application/x-mplayer2"
pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"
showcontrols="true" width="100%" height="100%"
src="sweethome.mpg" autostart="true" loop="true"></object>
</body>

The page (http://www.doriennesmith.com/dorienne/videos/sweethome.html) works fine in IE, but does not show with anything else. Can anyone tell me what I am doing wrong?

Many thanks!

_Aerospace_Eng_
06-05-2006, 07:31 AM
Firefox is looking for the video in the dorienne directory. Look at the src for the embed.

<embed type="application/x-mplayer2"
pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"
showcontrols="true" width="100%" height="100%"
src="../sweethome.mpg" autostart="true" loop="true">
Do you ever follow up on your old threads? You have started a few and people responded but you never check back. Your video would best be done in flash video since flash video can preload on almost any server. I have to wait for it to download now to play it cleanly.

kaitco
06-05-2006, 04:05 PM
Thanks. I think Frontpage added the source (../sweethome.mpg) to the embed tag on its own because I do not remember adding it....



Do you ever follow up on your old threads? You have started a few and people responded but you never check back. Your video would best be done in flash video since flash video can preload on almost any server. I have to wait for it to download now to play it cleanly.

I saw everything about the FLV Encoder, the converters, and the flash video tutorials, but I have been having troubles embedding the videos into flash and with making flash display properly. I am in need of a temporary solution until I understand where I am making mistakes in flash. Thanks for all your tips with this, though!

_Aerospace_Eng_
06-06-2006, 12:58 AM
I converted the video to flash for you. See it in action here (http://students.db.erau.edu/~rodri97f/test/). If you press esc it closes the opened window. window.close() will only fire if it was opened as a popup. If it wasn't nothing will happen. I did it this way to avoid any JS errors. You can download it here (http://students.db.erau.edu/~rodri97f/test/flvplayer.zip). I included instructions on how to change the music file.

kaitco
06-06-2006, 02:28 AM
Wow! Thanks so much for taking the time to help me with this. My site is really coming together because of your tips!