views:

774

answers:

6

Hi

I have lots of mp3s on my site that I want my friends to be able to play only- but I don't want them all downloading as soon as the page opens and would prefer them to only start downloading into the buffer if someone wants to play it- is this possible with the embed tag? I can't seem to find anything on Google so I am wondering if it's something I'll have to do in JavaScript or think of an HTML work around.

cheers

+4  A: 

You can use javascript to construct the embeds and insert them into the DOM when a user clicks a button or something similar.

Nick
A: 

You will want to use the Object tag vs. the Embed tag for one, but that said, don't set the auto-play option and they won't load until requested.

scunliffe
A: 

object tag yeah? i will look into that- i have set autoplay to off in the embed statement as i don't want any of them playing at all until they are clicked but they each still download the songs meaning the page takes a long time to load- but ill see if i have any joy with the object tag

cheers

A: 

If you want a really simple fix - don't embed the music files just have links to them. Then a user won't have the file download until they click on them (this is what blog.stackoverflow.com does for the podcasts...).

domgblackwell
A: 

If you have time on your hands you can go for my solution... I created a separate html page for each song and used the embed tag on each. Then I just created links to the pages to open in a new window. I know... hack! But it works well, and the other related links go along with it in the new window for each song.

A: 

You could always try out Yahoo Media Player,

You just make link to the mp3s and they can play them at their own pace.

I have seen this used for PodCasts, and Playlists of Mp3s its very handy and free.

http://mediaplayer.yahoo.com/

<a href="http://mediaplayer.yahoo.com/example1.mp3"&gt;First link</a>
<a href="http://mediaplayer.yahoo.com/example2.mp3"&gt;Second link</a>
<a href="http://mediaplayer.yahoo.com/example3.mp3"&gt;Third link</a>


<script type="text/javascript" src="http://mediaplayer.yahoo.com/js"&gt;&lt;/script&gt;

Simple :)

You can even add album art and manipulate the order the mp3s are added to the playlist thru simple html.

http://yahoomediaplayer.wikia.com/wiki/How_to_link

BigBlondeViking