Forum Moderators: open
<html>
<head>
<title>Background sound Netscape</title>
</head>
<body>
<EMBED SRC="Audio.mp3" AUTOSTART=TRUE, HIDDEN=True, VOLUME=100, LOOP=TRUE>
</body>
</html>
Now I'm trying to get the page to play background music when viewed with the Netscape browser. I think the above code is close, but for some reason the music doesn't start when the above code is viewed with the Netscape browser. Help!
User should have control over the background sound/music therefore media player controls should always be visible. Don't try to script your own controls since they not work in all environments. If "branded" music player skin is absolutely needed then the best bet is to use flash based music player solution.
---
One valid way to do autostart (background) music player is to use Windows Media Player Active-X with IE and offer general solution to others: QuickTime, MPlayer plugins etc. If suitable player doesn't exist then fallback to plain link.
Code:
<!--[if IE]>
<object id="player" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="288" height="69">
<param name="URL" value="madonna.mid">
</object>
<![endif]-->
<!--[if!IE]> <-->
<object id="player" type="audio/midi" data="madonna.mid" width="288" height="69">
<a href="madonna.mid">Play background music (Madonna) [MIDI]</a>
</object>
<!--> <![endif]-->
If you want to maximize number of user who can hear music without clicking a link then you can use the following:
Code:
<object id="player" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="288" height="69">
<param name="URL" value="madonna.mid">
<embed type="audio/midi" src="madonna.mid" width="288" height="69" />
</object>
Drawbacks of this methdod are that it uses deprecated embed element and external fallback link is needed.
Other widely supported types are:
audio/x-wav for wav files
audio/mpeg for mp3 files
Note that Mozilla/Firefox users need to have QuickTime plug-in or equivalent if you use mp3, midi since Windows Media player-netscape plug-in only exposes windows-media format file types (wma, WebmasterWorld) to the browser.
Also check that your server sends correct MIME-types.