MozillaZine

Music and the Embed Tag

Discussion of general topics about Mozilla Firefox
laserlight

User avatar
 
Posts: 118
Joined: June 23rd, 2003, 9:05 am
Location: Singapore
May 31st, 2004, 8:26 am

Post Posted May 31st, 2004, 8:26 am

I dont normally use music on a webpage, so I havent really looked this up.

When I was first starting out, I was taught by various sources on using <bgsound> and <embed>, which I used quite gleefully along with <marquee> :oops:

Later, after I became more mature in this area, I decided to drop music completely as I could not find a simple way in W3C standards to support music.
My impression was that the method appeared to be some convoluted use of <object>, or simply placing a link.

However, recently, a user asked in the Mozilla Firefox support forum as to why <bgsound> didnt work:
http://forums.mozillazine.org/viewtopic.php?t=80660
The response was the standard "it's Microsoft only" mantra.
Cusser mentioned "Firefox supports the one official standardised way that you can use it", referring to background music.
scratch stated "embed works fine. bgsound does not. they are very different".

I thought that both <bgsound> and <embed> are nonstandard.

Is the <embed> tag standard, and if it is, where in the standard is it defined?
If it is not standard, then what is the standard way of supporting (embedded) music on a webpage, if one currently exists?

yamal

User avatar
 
Posts: 3667
Joined: January 8th, 2004, 9:12 pm
Location: near A'dam
May 31st, 2004, 8:39 am

Post Posted May 31st, 2004, 8:39 am

Its a mess.
The standard is;

<p><object data="siren.wav" type="audio/x-wav" height="0" width="0">
</object></p>

But that wont call the WMP in Moz/FF.
For that you have to use its own format.

<p>
<object data="siren.wma" type="audio/x-ms-wma" width="0" height="0">
<param name="FileName" value="siren.wma">
Quis custodiet ipsos custodes?
Awas, kelapa jatuh!

BenBasson
Moderator

User avatar
 
Posts: 13654
Joined: February 13th, 2004, 5:49 am
Location: Guildford, UK
May 31st, 2004, 8:40 am

Post Posted May 31st, 2004, 8:40 am


yamal

User avatar
 
Posts: 3667
Joined: January 8th, 2004, 9:12 pm
Location: near A'dam
May 31st, 2004, 9:07 am

Post Posted May 31st, 2004, 9:07 am

<object
type="application/x-shockwave-flash" data="movie.swf"
width="400" height="300">
<param name="movie" value="movie.swf" />
</object>

<object data="siren.wma" type="audio/x-ms-wma" width="0" height="0">
<param name="FileName" value="siren.wma">
</object>

As you can see you can call a lot of stuff with these two lines.
Quis custodiet ipsos custodes?
Awas, kelapa jatuh!

Robin_reala

User avatar
 
Posts: 1344
Joined: September 7th, 2003, 1:21 pm
Location: Guildford, UK
May 31st, 2004, 11:46 am

Post Posted May 31st, 2004, 11:46 am

As far as I understand, <embed> is the old Netscape way of doing things and is in place to retain compatibility with NS4 although it's beyond me why they bother.

MonkeeSage

User avatar
 
Posts: 1011
Joined: December 20th, 2002, 8:15 pm
May 31st, 2004, 11:48 am

Post Posted May 31st, 2004, 11:48 am

The embed tag is non-standard, it's just Netscape's non-standard tag rather than MS's. There is no standard defined for embedding [specific] media, there is only the object tag, because such media is not really part of the page -- it is a [foreign] object to the web space -- and how the client wants to deal with it is basically up to each client to decide (ignore it, use a plugin, download it, &c).

But, the object tag was made to allow fallbacks to be nested into it, and embed has a noembed counter-part, so you can cover your bases (you can even use bgsound in the noembed tag -- but it only supports au, wav and mid so it won't work for this example).

Code: Select all
<object type="audio/x-mpeg" data="blah.mp3" width="0" height="0">
   <embed type="audio/x-mpeg" src="blah.mp3" hidden="true"></embed>
   <noembed>
      <span>Oops, no audio for you!</span>
   </noembed>
</object>



Shelumi`El
Jordan

S.D.G
"[M]en are usually satisfied with bad argument only when their convictions rest on other grounds." --John Oman

David H
 
Posts: 2254
Joined: June 13th, 2003, 5:17 am
Location: Japan
May 31st, 2004, 12:50 pm

Post Posted May 31st, 2004, 12:50 pm

laserlight wrote:I dont normally use music on a webpage, so I havent really looked this up.


And I'm glad you don't. I've never yet run across a site where I actually appreciated the embedded music. The first thing I've always done on sites like that is look for a way to turn it off. And if I can't find a way to turn it off, I don't go back to that site.

wget

User avatar
 
Posts: 4701
Joined: November 8th, 2002, 9:51 am
Location: Denmark
May 31st, 2004, 4:45 pm

Post Posted May 31st, 2004, 4:45 pm

David H wrote:I've never yet run across a site where I actually appreciated the embedded music.

I beg to differ:
http://web.archive.org/web/200212030017 ... /shaun.htm

This site is worth switching to IE for.

Mitch Gant

User avatar
 
Posts: 282
Joined: February 9th, 2004, 9:33 pm
May 31st, 2004, 7:23 pm

Post Posted May 31st, 2004, 7:23 pm

booya

yamal

User avatar
 
Posts: 3667
Joined: January 8th, 2004, 9:12 pm
Location: near A'dam
May 31st, 2004, 7:43 pm

Post Posted May 31st, 2004, 7:43 pm

Quis custodiet ipsos custodes?
Awas, kelapa jatuh!

gaby
 
Posts: 1378
Joined: November 2nd, 2004, 12:53 pm
November 10th, 2004, 5:17 pm

Post Posted November 10th, 2004, 5:17 pm

i've been listening to this page for 3 days now :P

http://www.khaha.com

Return to Firefox General


Who is online

Users browsing this forum: No registered users and 8 guests