Name

<fb:mp3/>

Synopsis

<fb:mp3 src="..."/>

Need a playlist for your band? Want to allow your application’s users to display their favorite music on their profile? This is a great tool for accomplishing these things and more. <fb:mp3/> displays a simple play button/music player for a specified MP3 file on your servers.

FBML-Specific Attributes

Required

src=[string] default: none

The URL and path of the MP3 file on your servers. The URL must be absolute.

Optional

title=[string] default: none

The title of the song.

artist=[string] default: none

The name of the artist.

album=[string] default: none

The name of the album.

width=[int] default: 300

The width of the player, in pixels.

height=[int] default: 29

The height of the player, in pixels.

Example FBML

Here is example FBML code for the <fb:mp3/> tag:

<fb:mp3 src="http://fbmlessentials.staynalive.com/metzener.mp3" 
    title="Take on Me" artist="Metzener" album="Take on Me Single"/>

Rendered HTML for Single Instance of Tag

When you run the example and the page loads, an image appears, as shown in Figure 3-41.

The play button that results from our <fb:mp3/> example
Figure 3-41. The play button that results from our <fb:mp3/> example

When you click on the image, it starts playing, as shown in Figure 3-42.

After clicking on the play button
Figure 3-42. After clicking on the play button

Additional Information

  • The file must end in the extension .mp3. Query strings and generic paths that still load an MP3 file will not work.

  • Only .mp3 files are supported.

  • The file’s bit rate must be in increments of 11 KHz.

  • Nonstandard character sets will not work for the artist, title, or album.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.37.12