admin管理员组文章数量:1023546
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
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
Share Improve this question edited Oct 24, 2008 at 18:20 swilliams 49k27 gold badges102 silver badges130 bronze badges asked Oct 24, 2008 at 18:12 greggreg 1- Do you have to use an Embed Tag, or are you open to JS only solutions? – BigBlondeViking Commented Aug 18, 2009 at 15:23
5 Answers
Reset to default 4You can use javascript to construct the embeds and insert them into the DOM when a user clicks a button or something similar.
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.
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.
does for the podcasts...).
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.
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./
<a href="http://mediaplayer.yahoo./example1.mp3">First link</a>
<a href="http://mediaplayer.yahoo./example2.mp3">Second link</a>
<a href="http://mediaplayer.yahoo./example3.mp3">Third link</a>
<script type="text/javascript" src="http://mediaplayer.yahoo./js"></script>
Simple :)
You can even add album art and manipulate the order the mp3s are added to the playlist thru simple html.
http://yahoomediaplayer.wikia./wiki/How_to_link
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
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
Share Improve this question edited Oct 24, 2008 at 18:20 swilliams 49k27 gold badges102 silver badges130 bronze badges asked Oct 24, 2008 at 18:12 greggreg 1- Do you have to use an Embed Tag, or are you open to JS only solutions? – BigBlondeViking Commented Aug 18, 2009 at 15:23
5 Answers
Reset to default 4You can use javascript to construct the embeds and insert them into the DOM when a user clicks a button or something similar.
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.
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.
does for the podcasts...).
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.
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./
<a href="http://mediaplayer.yahoo./example1.mp3">First link</a>
<a href="http://mediaplayer.yahoo./example2.mp3">Second link</a>
<a href="http://mediaplayer.yahoo./example3.mp3">Third link</a>
<script type="text/javascript" src="http://mediaplayer.yahoo./js"></script>
Simple :)
You can even add album art and manipulate the order the mp3s are added to the playlist thru simple html.
http://yahoomediaplayer.wikia./wiki/How_to_link
本文标签: javascriptCan HTML embedltgt stop mp3s from automatically downloadingStack Overflow
版权声明:本文标题:javascript - Can HTML embed<> stop mp3s from automatically downloading? - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745547744a2155473.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论