Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

embedded mediaplayer doesn't work in mozilla firefox

Status
Not open for further replies.

otaitau

IS-IT--Management
Joined
May 18, 2006
Messages
4
Location
LT
Hello,
I have a problem with embedding mediaplayer; the code works in IE, but not in mozilla firefox when I control movie with button - movie starts play when the button is clicked. I have read many posts in forums, but couldn't solve it. I don't want to use inner html, css, etc... I neeed a simple solution. Could anyone help me?
Thank you.
Here is the code:
<body>
<OBJECT
ID="MediaPlayer"
WIDTH="160"
HEIGHT="130"
CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="_i.wmv">
<PARAM NAME="autostart" VALUE="false">
<PARAM NAME="showcontrols" VALUE="false">
<embed
ID="player"
WIDTH="160"
HEIGHT="130"
TYPE="application/x-mplayer2"
SRC="_i.wmv"
AUTOSTART="0"
SHOWCONTROLS="0">
</embed>
</OBJECT>


<IMG SRC="rodyti1.bmp" NAME="but"
onMouseOver="document.but.src='rodyti2.bmp'"
onMouseOut="document.but.src='rodyti1.bmp'"
onclick="document.getElementById('player').play()">
</body>
 
What is your problem? You haven't actually said.

You say the movie starts playing when the button is clicked... but given you have an onclick event on the button that calls the movie's play method, isn't this exactly what should be happening?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
hi,
my mistake, the problem is that the code works in IE but not in mozilla firefox
 
something wrong is with getElementById, because when i set autostart=1, the *.wmv movie plays in firefox, but when i use this code with getElementById, nothing happens
 
even if there are lines:
onclick="document.getElementById('MediaPlayer').play()"
onclick="document.getElementById('player').play()"

it still doesn't work
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top