� From weapons of war to great coffee | Main | Africa focus for climate summit �

November 2, 2006

How to play a WAV sound file automatically in Firefox without Javascript

Here's how to play a .WAV sound file in Microsoft Media Player within Firefox without using Javascript. You embed a Media Player object in the page and then use the embed tag to pass in the file to play. Both the object and the embed tags are required. No player UI will be displayed as width and height are 0. Tested with Firefox 2.0.

<object id="objMediaPlayer" width="0" height="0" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" standby="Loading file..." type="application/x-oleobject">
	<param name="FileName" value="filename.wav" />
	<param name="AutoStart" value="true" />
	<embed type="application/x-mplayer2" src="filename.wav" width="0" height="0" autostart="true"></embed>
</object>

Posted by thdyck on November 2, 2006

Trackback Pings

TrackBack URL for this entry:
http://blog.dyck.org/mt-tb.cgi/535

Comments

Post a comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?