Fb:mp3

From Facebook Developer Wiki

Jump to: navigation, search

Contents

Description

Renders a Flash-based audio player.

Attributes

RequiredNameTypeDescription
required src string The URL of the audio file. The URL must be absolute.
optional title string The name of the song.
artist string The name of the artist performing the song.
album string The title of the album.
width int The width of the player in pixels. (Default value is 300.)
height int Does nothing. (Default value is 29.)

Examples

<fb:mp3 src="http://host.com/file.mp3" title="Song Name" artist="Song Artist" album="Album Name"/>
fbmp3tl5.png

Notes

  • Currently, Facebook requires a minimum Flash Player version of either 9.0.159.0 or 10.0.22.87 for all <fb:swf> tags. When Adobe discontinues security updates for Flash 9 (Flash 10 is unsupported on Windows 98 and ME), it will no longer be supported anywhere on Facebook.
  • If you want to call the Facebook Platform API from a Flash application (using the ActionScript 3.0 Library for Facebook Platform), you need to render your Flash object with fb:swf or fb:fbjs-bridge.
  • The src attribute must point directly to the mp3 file,[possible bug?][who says?] and cannot be played by a query string (for example, "songs.php?songid=35911").
  • Supported formats include .mp3.
  • .wav files are not supported[possible bug?].
  • File's bitrate must be in increments of 11KHz (11KHz, 22KHz, 44.1 KHz all work).
  • File must end in .mp3 (for example, /location/1385097 will not work).
  • The title, artist, and album attributes must be in ASCII characters or the file does not display correctly. For example, titles with Chinese characters do not display in Chinese but in gibberish or not at all[possible bug?].
  • Even though the artist attribute is optional, providing an empty string value (as in, artist="") will result in "Unknown Artist" being displayed, rather than nothing as specified[possible bug?].
  • The height attribute doesn't actually do anything[possible bug?].
  • If there are multiple fb:mp3 controls on the same page, it is possible for the user to play all of them simultaneously[possible bug?]

Requested Enhancements

  • Prevent the simultaneous playback of multiple fb:mp3 controls on the same page by stopping any currently playing fb:mp3 if another one is played.
  • Unicode Support
  • Enable the "height" attribute
  • Implement volume control
  • Add XSPF support
  • Make artist attribute truly optional. IE: When it is not specified, no artist is displayed and it does not scroll away from the song title

See Also

reference