FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

playing mp3 in HTML??

 


ThePolemistis
HI,

Anyone know the code to play an mp3 file streaming?
e.g. once an image or text is clicked, it loads windows media player, or any player, to play the file, and the whole file does not need to be downloaded???

I don't want the normal hyperlink which allows you to open or download the file, where to open requires you to download the full file anyways.

Thanks
Azmo
make it a flash site, however, u can ad a media player or something,, cause it's a must to be able to turn the music off if you don't want to hear it. otherwise people will leave asap.
ThePolemistis
Azmo wrote:
make it a flash site, however, u can ad a media player or something,, cause it's a must to be able to turn the music off if you don't want to hear it. otherwise people will leave asap.


Isnt there a way thru HTML??
I only want it only to play once the hyperlink is clicked. And people will be able to switch it off because it should play in media player. But I do not want media Player embedded on the page, but rather it opens media player externally.
But, if there is a way to play sound in HTML (ie. without people being able to switch it off, and with no interface with sound file) then that way is also good.

Any solutions?
aningbo
are u talking about background sound?

Code:
<embed src="yourmusicfile.mid" autostart="true" loop="true"
width="2" height="0">
</embed>

Code:

<noembed>
<bgsound src="yourmusicfile.mid" loop="infinite">
</noembed>


dont know if thats what u want. good luck/.
qscomputing
Uh, you have to download the file to play it no matter how you go about it. You could look into using M3U files - a small file which is downloaded and opened by the player, which contains the location of an MP3 file which is then streamed.
ThePolemistis
qscomputing wrote:
Uh, you have to download the file to play it no matter how you go about it. You could look into using M3U files - a small file which is downloaded and opened by the player, which contains the location of an MP3 file which is then streamed.


cheers... yea I have looked at m3u which is like a playlist... I think the best solution would be to use realplayer.... where I can use .ram as the file, which enclosed has link to the .ra file.
This way it can play streaming,,

My $0.02: Never use quicktime (or make it ur default player for mp3), can't even play mp3s properly Smile
aningbo
and never use real player either for your website. nobody uses them except few. try to go by the windows default.
Azmo
anyways, do not forget.. you MUST be able to turn the music OFF, otherwise people might leave ur site just because of that..
qscomputing
aningbo wrote:
and never use real player either for your website. nobody uses them except few. try to go by the windows default.

No, use a format that *everyone* can play - ie, not RealPlayer, not Windows Media etc etc. The best format if you want everyone to be able to play it is MP3.

ED. "almost everyone" would be more appropriate for MP3, but significantly more people can play it than anything else.


Last edited by qscomputing on Mon May 28, 2007 5:43 pm; edited 1 time in total
KacperOo
The easiest way is flash mp3 player ; p

You can mute, set volume and more ; 0
dz9c
KacperOo wrote:
The easiest way is flash mp3 player ; p

You can mute, set volume and more ; 0

coffeecup has a cool program to ease the process of this and works really well u shud get it
hiquality
use embbed in html or follow other's adice and develop the site in flash ( or add a small flash player).
If you need more help I can help you with that
hicham_the_webmaster
Yeah the flash alternative is the best for rendering, performance and comptatibiliy factors, if you do a simple search you can find that there are many flash coded players free of use and ready to be added to your website . (of course you must encode your songs into the format that the player require ...)
frih
ThePolemistis wrote:
HI,

Anyone know the code to play an mp3 file streaming?
e.g. once an image or text is clicked, it loads windows media player, or any player, to play the file, and the whole file does not need to be downloaded???

I don't want the normal hyperlink which allows you to open or download the file, where to open requires you to download the full file anyways.

Thanks


i think you can play song and video using the following tag


<embed src="file.mp3" autostart="true">
</embed>



please confirm it before using , i m not sure.

regards
abhi
the Civilian
I think your best bet is with flash. Without that then the user will have to download it, especially if you want it to open up media player.

This links to a nice example of how you can use flash to integrate music without visitors having to download the file.
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.