经常要在你的博客中嵌入一些音乐吗,或许你在使用wordpress,他还有很多播放插件,但是对于其他的站点呢!你可以使用Yahoo Media Player.简单的3个步骤就可以在你的站点中嵌入播放器!
如何使用呢:在http://mediaplayer.yahoo.com/找答案!
----------------------------------------------
Yahoo released a clever service – the Yahoo Media Player that allowed any site owner to embed an MP3 media player into their site by adding just a small line of code. With a little hack, this media player can be embedded into any site that links to MP3 files allowing you to enjoy streaming music from virtually any website, and you don’t even need to be the owner of the site!
When you are the site owner
If you have a website and host directly downloadable MP3 files on your server, or link to MP3 files on your pages, then you can take advantage of Yahoo’s Media Player. All you have to do is add the following code to your pages
When you are not the site owner
Now obviously not every webmaster is aware of this service and might not have incorporated it on his site. There are two solutions to it:
1. Use a bookmarklet
Stoyan Stefanov has put together a few lines of code to build a bookmarklet. His bookmark however needs a little modification since it stopped working, probably because of changes in Yahoo’s codes. Another user has fixed it (in comments) and I’ve added the fix and created a new working bookmarklet. Drag this bookmarklet to your browser’s toolbar (or simply bookmark it). Now whenever you come across a site that has no embedded media player, just click on this bookmarklet and bingo! – Yahoo’s media player will pop open on your screen.
For some reason, this bookmarket is not working on Firefox but working fine in Opera. I haven’t tested it in IE.
2. Use a Greasemonkey script
Since the bookmarklet is having no effect on Firefox, use the Yahoo Media Player Greasemonkey script which is certainly better than a bookmarklet. This script will insert the media player on any website whenever it find playable MP3 files. Developer Scott has also created a Firefox addon, but I haven’t tried it.
Here is an example site to test your bookmarklet/script.
from http://www.instantfundas.com/2008/11/stream-music-from-any-website-using.html
如何使用呢:在http://mediaplayer.yahoo.com/找答案!
----------------------------------------------
Stream music from any website using Yahoo Media Player
Yahoo released a clever service – the Yahoo Media Player that allowed any site owner to embed an MP3 media player into their site by adding just a small line of code. With a little hack, this media player can be embedded into any site that links to MP3 files allowing you to enjoy streaming music from virtually any website, and you don’t even need to be the owner of the site!
When you are the site owner
If you have a website and host directly downloadable MP3 files on your server, or link to MP3 files on your pages, then you can take advantage of Yahoo’s Media Player. All you have to do is add the following code to your pages
<script src = "http://mediaplayer.yahoo.com/js"></script>
Automatically,
a small collapsible media player will appear at the bottom-left of the
screen that will create a playlist of all MP3 files found on the page.
Additionally, small play buttons appear in front of every MP3 links.
This allows visitors to play media files directly on the site without
having to download the files first. When you are not the site owner
Now obviously not every webmaster is aware of this service and might not have incorporated it on his site. There are two solutions to it:
1. Use a bookmarklet
Stoyan Stefanov has put together a few lines of code to build a bookmarklet. His bookmark however needs a little modification since it stopped working, probably because of changes in Yahoo’s codes. Another user has fixed it (in comments) and I’ve added the fix and created a new working bookmarklet. Drag this bookmarklet to your browser’s toolbar (or simply bookmark it). Now whenever you come across a site that has no embedded media player, just click on this bookmarklet and bingo! – Yahoo’s media player will pop open on your screen.
For some reason, this bookmarket is not working on Firefox but working fine in Opera. I haven’t tested it in IE.
2. Use a Greasemonkey script
Since the bookmarklet is having no effect on Firefox, use the Yahoo Media Player Greasemonkey script which is certainly better than a bookmarklet. This script will insert the media player on any website whenever it find playable MP3 files. Developer Scott has also created a Firefox addon, but I haven’t tried it.
Here is an example site to test your bookmarklet/script.
from http://www.instantfundas.com/2008/11/stream-music-from-any-website-using.html