Joshua Stengel

Everything...Is going...
To be okay!

A Simple Way to Embed MP3s

Yahoo! has released an API that allow you to easily embed a media play that will automatically attach itself to MP3 links.  They had one that just linked to their own music library, but that's boring.

 

Here is a sample HTML page that has some MP3 links and an embedded audio player:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>My MP3 Page</title> <script type="text/javascript" src="http://mediaplayer.yahoo.com/js"></script> </head> <body> <a href="http://podcastdownload.npr.org/anon.npr-podcasts/podcast/510008/17999726/npr_17999726.mp3?dl=1">NPR Podcast</a>
</body> </html>

 

Here's how it will render (Click the play icon):

NPR Podcast

When the play button is clicked, a media player will appear and the file will play in a pop-in media player.  It's nice because you have a good deal of control over the player just by changing the hyperlink.  It uses semantic HTML and an independent JavaScript file.

I wouldn't mind seeing more APIs that follow this type of implementation.  I know it puts a 3rd party in between you and the client, but so do things like PDFs and Flash.

Comments

mikedopp said:

This is awesome thanks for posting this.

Question is can we do video podcast with this technology?

mike dopp

# January 16, 2008 5:02 PM

jstengel said:

It was my original hope that that would be the function of the media player when I started looking into it.  In reading Yahoo!'s description of the project and the name "Yahoo! Media Player" I would like to think that turning it into some kind of universal media player is their ulimate goal.

I know I'll be keeping my eye on it...

# January 17, 2008 11:26 AM

Podcasting Directory said:

Excellent post. Could not have said it any better myself. Hat's off to a post well said.

# May 13, 2008 4:21 AM

Large CoFFee Mugs said:

Hi. I study a few of one's other posts and needed to understand if you would be interested in exchanging blogroll links?

--------------------------------------------

my website is  

http://shirtxxl.net

Also welcome you!

# November 22, 2010 6:32 PM

ipad accessories must said:

Gratitude is the sign of noble souls.

-----------------------------------

# December 20, 2010 4:20 AM

best ipad stand said:

-----------------------------------------------------------

"In browsing for sites associated to web internet hosting and particularly comparability hosting linux strategy internet,your internet site arrived up."

# January 3, 2011 5:19 AM

best ipad app said:

-----------------------------------------------------------

"Whats up, I am thrilled to skim all of of this website and am very elated and thrilled to guess that the proprietor is undertaking a really fantastic position here to place all the  content and info in 1 place, i should suggest this data which has a suggestion on my site."

# January 8, 2011 4:40 AM

digital camcorder reviews said:

Wow! what an thought  What an idea Attractive  Amazing …

--------------------------------------------------------------------  

I have a <a href="onlytopreviews.com/">digital slr reviews</a> Website,i love him.Mania !You are welcome to look!

# January 17, 2011 3:31 AM

hooher tod said:

Yes there should realize the reader to RSS my feed to RSS commentary, quite simply

# September 4, 2011 12:17 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)