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: noneThe URL and path of the MP3 file on your servers. The URL must be absolute.
Optional
title=[string] default: noneThe title of the song.
artist=[string] default: noneThe name of the artist.
album=[string] default: noneThe name of the album.
width=[int] default: 300The width of the player, in pixels.
height=[int] default: 29The 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.
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.
Figure 3-42. After clicking on the play button
Additional Information
The file must end in the extension .mp3. Query strings ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access