PDA

View Full Version : Embedding mp3



theundeadhero
09-04-2006, 08:42 PM
This is what I'm using:

"Sign for less than"embed src="http://www.geocities.com/floydsarmy/name.mp3"
width="140" height="40" autostart="false" loop="false">
</embed>

What I'm getting is a url invalid messege where the mp3 player should be. Any ideas why? The address is right.

eestlinc
09-04-2006, 09:10 PM
I went directly to that url and got a page not found error.

theundeadhero
09-04-2006, 09:38 PM
Name isn't the real name of the file. I wanted to leave that a surprise for when you see my lj.

o_O
09-05-2006, 01:27 AM
Try creating an M3U file containing the URL of the song, and setting the src flag of your embed tag to the M3U flag.
In other words:

Create a text file
Put "http://www.geocities.com/floydsarmy/name.mp3" in it
Save it as "song.m3u"
Change your embed tag to "&lt;embed src="http://www.geocities.com/floydsarmy/song.m3u" width="140" height="40" autostart="false" loop="false"&gt; (assuming you save the song in the root of your web directory.


Even if that doesn't work, that's a better way to embed stuff; you only need to change one file to change the song, which is handy if you have multiple songs in the m3u file, and it also allows for more immediate playback.

Also, some versions or configurations of Firefox have trouble with WMP plugins, and don't automatically assume an mp3 is to be played by the WMP plugin; for example, my Firefox uses the Quicktime plugin (don't worry, only on Windows, which I hardly use. :p). So, you should specify the plugin, by including 'type="application/x-mplayer2"' as a parameter of your embed tag.

Here's an example of how I would code an embed tag:
<pre>&lt;emb<b></b>ed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
src="http://www.geocities.com/floydsarmy/song.m3u" showstatusbar=1 EnableContextMenu=1
width=140 height=46 autostart=0 showcontrols=1 volume=30 \&gt;</pre>
It would appear also, that you aren't going to get far hosting mp3s on Geocities. They allow 4.2Mb of bandwith per hour or something tiny like that, so that might be your problem.

P.S.
To make a "&lt;", just use the escape code "&amp;lt;" ("&amp;gt;" is for &gt;, I'll let you figure out what the letters stand for) :p

EDIT: It would also appear that stupid geocities don't allow M3U files. Just leave out that step and keep it as an mp3 embed then, or get your m3u file hosted somewhere that allows both that file type and hotlinking to files. :p

Samuraid
09-05-2006, 01:43 AM
Also, if you want to use &lt; on the forums...

&amp;lt; = &lt;

:D

Xaven
09-05-2006, 02:01 AM
http://www.dazzled.com/ offers unlimited bandwidth, so you may want to head to a place like that instead of Geocities. :D