homepage Welcome to WebmasterWorld Guest from 54.211.138.180
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Background sound using Netscape
HTML code for background sound with Netscape
Adam5000




msg:568437
 8:45 am on Feb 23, 2006 (gmt 0)

I think this is close. When I set hidden to "False" and view the page with MSIE , a quicktime player appears on the screen. What I'm trying to do is automaticaly play an mp3 audio file in the background when the page is viewed using the Netscape browser. Help!

<html>
<head>
<title>Background sound Netscape</title>
</head>

<body>
<EMBED SRC="Audio.mp3" AUTOSTART=TRUE, HIDDEN=True, VOLUME=100, LOOP=TRUE>
</body>
</html>

 

BlobFisk




msg:568438
 9:30 am on Feb 23, 2006 (gmt 0)

<embed> is a Mozilla/Netscape support tag only - <object> is what you need for MSIE.

What about using Flash?

Adam5000




msg:568439
 6:50 pm on Feb 23, 2006 (gmt 0)

Thank you for your reply and you're correct. I've got the background music working with MSIE using the code <BGSOUND SRC=Audio.mp3 LOOP=INFINITE>

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!

Taffa




msg:568440
 7:15 pm on Feb 23, 2006 (gmt 0)

Netscape, which version? Do you need support for 4.x browsers?

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.

Adam5000




msg:568441
 8:38 am on Feb 25, 2006 (gmt 0)

Thank you T. I think I'm going to give it a rest for a few days.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved