Sunday, June 20, 2010

Autostart=false is not working in FireFox for mplayer2

In my previous post I have embedded a mp3 song from using mplayer2.

I used below code for embedding it.

<embed type="application/x-mplayer2" pluginspage="" name="mediaplayer1" ShowStatusBar="true" EnableContextMenu="false" autostart="false" width="80%" height="50px" loop="false" src=" Conference Theme Song -" /></embed>

It is working fine in IE (Internet Explorer), but in FireFox it start playing the song automatically even when autostart is specified as false.

The reason is Embed tag is a non-standard tag. So, firebox is not taking its attributes correctly.

So, I searched some alternate code which will be working in both IE and FireFox.

I tried below codes.

<object data=" Conference Theme Song -" type="application/x-mplayer2" width="350" height="250">
<param name="filename" value=" Conference Theme Song -">
<param name="playcount" value="true">
<param name="width" value="350">
<param name="height" value="250">
<param name="autostart" value="false">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="true">

<OBJECT ID="MediaPlayer" WIDTH="192" HEIGHT="35" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE=" Conference Theme Song -">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="true">
<PARAM name="ShowDisplay" VALUE="true">
<PARAM name="autostart" VALUE="true">

But they didn't work as expected.

You can share the code, if you know any standard way of providing mp3 player which will work properly in both IE and FireFox.

More Articles...
You can bookmark this blog for further reading, or you can subscribe to our blog feed.


Maarja-Liisa said...

I have the same issue
Look forward for help

Anonymous said...

Use value "0" instead of "false".

Search This Blog