mp3 in code

liunx

Guest
If I want a link to play a mp3 file, don't I just 'a href' tag it as I would any other link?<br />
<br />
ie<br />
<br />
a href=http://www.webdeveloper.com/forum/archive/index.php/"filename.mp3"<br />
<br />
I'm getting a "Page not found" error, but I know the file is there in the same folder as the document I'm coding...but I am calling it from an Iframe. Not sure if I'm trying to call it with the wrong tag or if I'm having trouble with it understanding what I want to do from within the Iframe (which is called from a different folder than the parent document).<br />
<br />
Thanks!<!--content-->It depends on what you want to do. The code you have will cause the user to Download <!--more--> the mp3 file.<br />
<br />
If you want the file to automatically play, then use the following:<br />
<bgsound src=http://www.webdeveloper.com/forum/archive/index.php/"URL HERE" LOOP ="infinite"> <br />
That will cause the sound file to be played once the page has loaded. It will loop infinitely. You can specify the amount of loops by changing 'infinite' to a number value.<!--content-->neenach2002 forgot to point out that this causes your visitors to scurry to the top left (close button, back button) or right of their screens (X button). Posting a link, such as <a href=http://www.webdeveloper.com/forum/archive/index.php/"http://mysite.com/myMp3.mp3"> will allow users to Download <!--more--> the file, and play at their own willingness, which will keep your site traffic at your site :)<!--content-->Yeah, I certainly don't want to use it as background sound. I thought there was a way without using a javascript to just stream the mp3 though? Obviously still new to all this, so I'm not sure if I'm explaining what I want that well.<br />
<br />
I have multiple mp3 examples of stuff, I want the user to click one they want to hear and their machine to preferrably stream it. I'm actually rewriting alot of this from an existing site where the guy used nothing but image maps, but called these mp3s to stream through a javascript...but it also popped them up in a new window and given how many people view this site have pop blockers, I just wanted to call it in a much simpler fashion. I would go Real Audio, but the quality has to be extremely good as these mp3s are demonstrating sound recording quality as opposed to just what's being recorded. I don't know the quality capabilities of RA.<br />
<br />
Thanks all!<!--content-->Ahhh...I misunderstood the question...<br />
There is a way to stream the file through the built-in 'Media; on IE...I think just clicking the link will do that.<br />
As for Netscape and Opera, I have no idea...yet...I just started using these browsers...LOL!<!--content-->to play a media file in the IE-built in media player, use in your link, target="_media"<!--content-->Aw jeez...I'm close...marked my target="media" and it works just fine on my local drive...but when I post it live, I now get "the page cannot be displayed: the page is currently unavailable"<br />
<br />
I even tried typing the direct url to the audio file and get a 404 page cannot be found. I've checked and triple checked and then 4 more times to make sure I'm putting in the correct url...course it is on a linux server which confuses me to begin with, so who knows now.<!--content-->err...okay? Just for Shizzles and giggles I set my bgsound to my file to see if it would even recognize the file that way...still no go...but works on local drive. I'm thinking I just don't understand how to map this correctly on the linux server, but I'm going by what's previously there that works and just transposing for what I need.<br />
<br />
Linux hates me.<!--content-->Try using the slashes that face the other way...<br />
So if you're using '/'<br />
try '\'<br />
I think I once read somewhere that this is part of Linux servers...but maybe I'm way off!<!--content-->Always the most obvious problem that gets most overlooked hahaha... <br />
<br />
For anyone interested in the resolution: Linux=CaSE senSitiVE.<br />
<br />
Now I know <br />
<br />
Thanks for all the help, everyone!<!--content-->
 
Back
Top