Home

# Class goog.ui.media.Mp3

Subclasses a goog.ui.media.MediaRenderer to provide a Mp3 specific media renderer. This class knows how to parse mp3 URLs, and render the DOM structure of mp3 flash players. This class is meant to be used as a singleton static stateless class, that takes {@code goog.ui.media.Media} instances and renders it. It expects {@code goog.ui.media.Media.getModel} to return a well formed, previously checked, mp3 URL {@see goog.ui.media.PicasaAlbum.parseUrl}, which is the data model this renderer will use to construct the DOM structure. {@see goog.ui.media.PicasaAlbum.newControl} for an example of constructing a control with this renderer. This design is patterned after http://go/closure_control_subclassing It uses {@link goog.ui.media.FlashObject} to embed the flash object.

extends goog.ui.media.MediaRenderer

Instance Method Summary
| `createDom(?goog.ui.media.Media control) ⇒ ?Element` Creates the initial DOM structure of a mp3 video, which is basically a the flash object pointing to a flash mp3 player.
| `getCssClass() ⇒ string` Returns the CSS class to be applied to the root element of components rendered using this renderer.

Static Method Summary
| `buildFlashUrl(string mp3Url) ⇒ string` A static method that builds a URL that will contain the flash player that will play the {@code mp3Url}.

`newControl(?goog.ui.media.MediaModel dataModel, ?goog.dom.DomHelper= opt_domHelper) ⇒ ?goog.ui.media.Media`

A static convenient method to construct a goog.ui.media.Media control out of a mp3 URL. It checks the mp3 URL, sets it as the data model goog.ui.media.Mp3 renderer uses, sets the states supported by the renderer, and returns a Control that binds everything together. This is what you should be using for constructing Mp3 videos, except if you need more fine control over the configuration.

| `setFlashUrl(string flashUrl)` A static method that sets which flash URL this class should use. Use this if you want to host your own flash mp3 player.