Friday, March 5, 2010

Embedding an audio file in a webpage- so easy!


ShareThis

The Yahoo! Media Player enhances your web site or blog by creating an embedded player for each audio link. All the links can be played with one click, turning the page into a playlist. This is done by adding our JavaScript to your page.

How Do I Get Started?
  1. Link to audio

    Insert one or more anchor elements containing the URL of an audio file into your web page. For example:

    <a href="example1.mp3">My first song</a>
    <a href="example2.mp3">My second song</a>



  2. Embed the Player

    Copy and paste this code into your page:



    <script type="text/javascript" src="http://mediaplayer.yahoo.com/js"></script>



  3. Use the player

    This play button will appear next to each of your audio links: 



    Press a play button. The Yahoo! Media Player will open:




    For more detail check out this yahoo help: http://developer.yahoo.com/mediaplayer/


0 comments: