<embed src> question

P

Photog

Sorry if this is a silly question or posted in the wrong forum. I'm
adding music to a website and I'd like to have a few tracks (MP3s)
play back to back. I'm using the code below but I can't find the
syntax to play multiple tracks - only a single track. Can this be done
with the <embed src> tag? I know there are others ways to do this but
I am looking for the simpliest way.

<tr>
<td width="100%" colspan="2">
<p align="center">
<noembed>Your broswer does not support embedded music. This site is
best viewed in Internet Explorer 6 or higher.</noembed>
<embed src="song.mp3" width=150 height=25 autostart=true repeat=true
loop=true bgcolor=white></embed>
</td>
</tr>
 
D

dorayme

Photog said:
Sorry if this is a silly question or posted in the wrong forum. I'm
adding music to a website and I'd like to have a few tracks (MP3s)
play back to back. I'm using the code below but I can't find the
syntax to play multiple tracks - only a single track. Can this be done
with the <embed src> tag? I know there are others ways to do this but
I am looking for the simpliest way.

<tr>
<td width="100%" colspan="2">
<p align="center">
<noembed>Your broswer does not support embedded music. This site is
best viewed in Internet Explorer 6 or higher.</noembed>
<embed src="song.mp3" width=150 height=25 autostart=true repeat=true
loop=true bgcolor=white></embed>
</td>
</tr>


There are likely server side ways, even javascript ways but
simpler, you could join all the MP3's into one file. (On OS X
there is, apparently, a 10 sec way to do it). You lose the
advantage of having separate files which make it easier for the
user to turn off or skip tracks more easily.

But, best of all, go read:

<http://alistapart.com/articles/byebyeembed>
 
C

cwdjrxyz

Sorry if this is a silly question or posted in the wrong forum. I'm
adding music to a website and I'd like to have a few tracks (MP3s)
play back to back. I'm using the code below but I can't find the
syntax to play multiple tracks - only a single track. Can this be done
with the <embed src> tag? I know there are others ways to do this but
I am looking for the simpliest way.

<tr>
<td width="100%" colspan="2">
<p align="center">
<noembed>Your broswer does not support embedded music. This site is
best viewed in Internet Explorer 6 or higher.</noembed>
<embed src="song.mp3" width=150 height=25 autostart=true repeat=true
loop=true bgcolor=white></embed>
</td>
</tr>

As Dorayme suggested, you could combine all of the mp3s into one
track.

Do not use embed. It is not, and never has been, an official W3C html
tag, as validation of a page using at the W3C validator will quickly
show. The same is true of bgsound. Both are relics of the browser war
era. Moreover, when used for sound, embed does not now always work for
some modern browsers.

I suggest using a m3u playlist for your case. It can include any
number of mp3 and many other file types if desired. An m3u playlist
will work on many modern players including WMP, Real, Winamp, and
others. In the case of multiple players, the player that is used
depends on the default on the computer or for what player you specify
is primary for playing m3u playlists. I have a page at
http://www.cwdjr.net/souassorted/winamp.php that shows in detail how a
m3u playlist is constructed and how it is used to play. Although I
mention Winamp, as stated above, a m3u playlist will work on several
other players if they happen to be primary for it rather than Winamp.
In cause you include a more obscure file type in the playlist that
some player will not play, usually there is no great harm. That file
just is skipped.You may get a player on the screen when music is
called up. However you can drag and drop it out of the way if
necessary, or it can be minimized. You can, using considerably more
complex code, embed(using an object rather than illegal enbed tag) the
player on a page so that it is any desired size or even hidden.
However, when you have a playlist with several files, it is best to
have at least player controls so that the viewer can start and stop
the music, or skip cuts. Autostarted music that can not be turned off
offends many people. Unless your page is about music with the audio as
an example of what you are discussing, many people will become very
annoyed. if music comes on and can not be turned off. They may not
like the music, may be listening to something else while viewing your
page, or just do not want any noise that might wake up a baby or
whatever.
 
A

Andy Dingley

Do not use embed. It is not, and never has been, an official W3C html
tag, as validation of a page using at the W3C validator will quickly
show.

This is true enough, however it also works, and it works in a non-
player specific manner that's not emulatable by other standards-based
tricks.
Moreover, when used for sound, embed does not now always work for
some modern browsers.

Which ones?
I suggest using a m3u playlist for your case.

That ought to work (from my limited knowledge), but I'd be interested
to know from others just how widespread support for .m3u playlists is?

It's also worth remembering that the audience for music is highly
segmented. Target content at "the myspace generation" and they're
almost certain to have an MP3 player installed that will
recognise .m3u. Target exactly the same music page with older
content for an older audience and it might cause problems, just
because that audience hasn't manually installed the same set of add-
ins.
 
C

cwdjrxyz

This is true enough, however it also works, and it works in a non-
player specific manner that's not emulatable by other standards-based
tricks.


Which ones?

I only know that I have seen several posts in various groups were some
browser OS combination did not work for sound when embed was used. In
most cases this was corrected by using proper modern code - in a few
cases the problem was caused by some software or hardware problem that
had to be corrected and sometimes no sound would play at all despite
what code you used.. I have absolutely no interest in finding which
browser/OS combinations support an illegal tag such as embed or any
other illegal tag for that matter. There are other types of playlists
beside m3u, but m3u works on a wide variety of players, including the
most popular ones such as WMP, Real, Winamp, etc. On the other hand,
the Microsoft .wax playlist is not supported by several players.
However, even that is changing, and I believe recent Real players also
now support .wax.
That ought to work (from my limited knowledge), but I'd be interested
to know from others just how widespread support for .m3u playlists is?

It's also worth remembering that the audience for music is highly
segmented. Target content at "the myspace generation" and they're
almost certain to have an MP3 player installed that will
recognise .m3u. Target exactly the same music page with older
content for an older audience and it might cause problems, just
because that audience hasn't manually installed the same set of add-
ins.

Most computers that the general public buys have long come with one to
several players installed which will support .m3u and other code now
required for hearing sound from many mainstream audio sites. A few who
hate sound could have removed the player. A few could have used an
obscure OS, built their own computer, and not added a player. A few
could be using a text only device and can not support audio or images.
Now if you want to support some of the less usual sound formats, such
a Monkey Audio's .ape, FLAC etc., you will have to instruct your
audience that a plugin is required to hear the sound. A few bands have
used these mentioned lossless formats for free music from them from
the web. The reason is these large file size lossless formats are
free, and someone has to be paid for the use of many other more common
formats. Fans who have enough interest to follow the band's website
usually are interested enough to take the time to download a quick
plugin, especially when the band explains why they use the format.
 
C

cwdjrxyz

I only know that I have seen several posts in various groups were some
browser OS combination did not work for sound when embed was used. In
most cases this was corrected by using proper modern code - in a few
cases the problem was caused by some software or hardware problem that
had to be corrected and sometimes no sound would play at all despite
what code you used.. I have absolutely no interest in finding which
browser/OS combinations support an illegal tag such as embed or any
other illegal tag for that matter. There are other types of playlists
beside m3u, but m3u works on a wide variety of players, including the
most popular ones such as WMP, Real, Winamp, etc. On the other hand,
the Microsoft .wax playlist is not supported by several players.
However, even that is changing, and I believe recent Real players also
now support .wax.






Most computers that the general public buys have long come with one to
several players installed which will support .m3u and other code now
required for hearing sound from many mainstream audio sites. A few who
hate sound could have removed the player. A few could have used an
obscure OS, built their own computer, and not added a player. A few
could be using a text only device and can not support audio or images.
Now if you want to support some of the less usual sound formats, such
a Monkey Audio's .ape, FLAC etc., you will have to instruct your
audience that a plugin is required to hear the sound. A few bands have
used these mentioned lossless formats for free music from them from
the web. The reason is these large file size lossless formats are
free, and someone has to be paid for the use of many other more common
formats. Fans who have enough interest to follow the band's website
usually are interested enough to take the time to download a quick
plugin, especially when the band explains why they use the format.

By the way, a really old IE browser will not support embed. In the
early days of sound on the web, Netscape introduced embed for handling
sound and Microsoft introduced bgsound. The bgsound would not play on
Netscape, and embed sound would not play on IE. However it was not
very long before Microsoft started to support embed for sound. I do
not believe that Netscape ever supported bgsound. Browsers old enough
for this to matter are likely very seldom used these days, as they
will get kicked off of many very important sites. For a while, there
were scripts used to detect if an IE or Netscape browser was used, and
route an embed path or bgsound path to them as needed. Browser
detection now is very much out of favor, because some of the newer
browsers can report themselves as something else to avoid getting
locked out of some sites.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top