Help - Search - Members - Calendar
Full Version: Mp3 Playing/Downloading
Forums > Resource Center > Webmasters' Corner > Webmasters' Corner Resolved Topics
JlIaTMK
Okay, I am fairly sure that when you do a regular link such as

CODE
<a href="music.mp3">My Song</a>


That is SHOULD play the song [as in going to a media player].

But my links, that I uploaded onto my server, go the the downloading screen that says [open, save, close] (just like any other downloading screen).

Do you know what the problem may be?

If you can help, I would like to know the code that will play my mp3 file urls [and im 100% sure they're mp3 files].

Thank You
--Jordan
IGB
it gets a little complicated.

There are simple codes, but that is only if you want the file to start playing by itself when the page loads, OR have a control panel on it to tell it to start.
The control panel is troublesome, coz depending on the default media players everyone has, it looks different for everybody and hard to blend into design.

either way, here's the code:

(you can turn autostart off, specify width and height for a control panel)

if you want a link sort of thing to play music when you click on it. then it involves some other tricks. like creating 1x1 iframe and load hidden music pages in there. stuff like that
mona lisa
are you using firefox? just wondering. if the mp3 is used as a link, then wouldn't you have to click open? then it plays in windows media player if that's the default program. when i used to use IE, media player would open automatically.
JlIaTMK
Thank you guys for the help

IGB, isnt that the code where it has the... media player.... :/ that's not what I wanted exactly lol, I wanted for the song to go into their computer's media player, not on the site >.< sorry.

and im not using firefox

if the mp3 is used as a link, then wouldn't you have to click open?

yeah, you would, but normally, for other links, it would just open itself up instead of going to the downloading menu that has open save and close.

That's what I want to know how to rid of :/.
IGB
well then you can make a new file in notepad, type in there the filename with location of your mp3 file. like:

music/song.mp3
song.mp3

then save it, rename it with extension .m3u
have your link link to the playlist .m3u file
that should solve the problem
mona lisa
sorry i don't really know for sure. could you like make a link on a test xanga and i can see what happens on my computer. i'm not sure if in firefox the open or save pop-up will appear because it doesn't for any other type of file.

edit\\
does the m3u extension make any difference?
IGB
QUOTE(gotnoheart @ Mar 31 2005, 11:46 PM)
edit\\
does the m3u extension make any difference?
*


from my experience, it does, it's processed as streaming I think.
JlIaTMK
bah, im so confused IGB, but thanks so much

if you would mind going step by step >.< with detail, i have never done this before >.< im sorry

oh and i shall indeed give you a link, pming of course lol
IGB
QUOTE(JlIaTMK @ Mar 31 2005, 10:46 PM)
CODE
<a href="music.mp3">My Song</a>


ok, so this is what you have.
1.what you need to do is create a new text document in that folder, so "New Document.txt".
2.open it with notepad, write "music.mp3". you're done, that's all that needs to be in there.
3.save it.
4.rename this saved new document to "music.m3u".
5.upload it along with your mp3 file.
6.in your html, change what you originally had, to:

CODE
<a href="music.m3u">My Song</a>


that's all there is. Basically instead of having to go straight to the mp3, you created a playlist with 1 song in it. With playlists, you most likely wont be asked to save or open. default media player will open it automatically as streaming file.
sweetxsimplicity
QUOTE(IGB @ Mar 31 2005, 7:54 PM)
it gets a little complicated. 

There are simple codes, but that is only if you want the file to start playing by itself when the page loads, OR have a control panel on it to tell it to start.
The control panel is troublesome, coz depending on the default media players everyone has, it looks different for everybody and hard to blend into design.

either way, here's the code:

(you can turn autostart off, specify width and height for a control panel)

if you want a link sort of thing to play music when you click on it. then it involves some other tricks. like creating 1x1 iframe and load hidden music pages in there. stuff like that
*


..That's only for listening to the song. blink.gif
IGB
QUOTE(sweetxsimplicity @ Apr 1 2005, 1:43 AM)
..That's only for listening to the song. blink.gif
*


well...

She wants the music to open in media player, but he doesn't want the save/open option. This is the only thing i can think of that would do exactly that. rolleyes.gif

edit:
oh I wasn't reading carefully, yeah I misunderstood in the beginning. well I made correction after didn't I pinch.gif
JlIaTMK
Thank you TGB :P. You're a great help.

[P.S.

Surprised that you didn't think I'm a girl wink.gif]
IGB
lol im sorry I totally wasn't paying attention to that pinch.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.