An base data value class for all media data models. MediaModels are exact matches to the fields defined in the Yahoo RSS media specification {@link http://search.yahoo.com/mrss/}. The current common data shared by medias is to have URLs, mime types, captions, descriptions, thumbnails and players. Some of these may not be available, or applications may not want to render them, so {@code null} values are allowed. {@code goog.ui.media.MediaRenderer} checks whether the values are available before creating DOMs for them. TODO(user): support asynchronous data models by subclassing {@link goog.events.EventTarget} or {@link goog.ds.DataNode}. Understand why {@link http://goto/datanode} is not available in closure. Add setters to MediaModel once this is supported.
| Instance Method Summary | |
findCategoryWithScheme(string scheme) ⇒ ?goog.ui.media.MediaModel.CategoryFinds the first category with the given scheme. | |
findCreditWithRole(string role) ⇒ ?goog.ui.media.MediaModel.CreditFinds the first credit with the given role. | |
getCaption() ⇒ (string|undefined)Gets the caption of this media. | |
getCategories() ⇒ ?ArrayGets the categories of the media. | |
getCredits() ⇒ ?ArrayGets the credits of the media. | |
getDescription() ⇒ (string|undefined)Gets the description of this media. | |
getDuration() ⇒ (number|undefined)Gets the duration of the media. | |
getHeight() ⇒ (number|undefined)Gets the height of the media in pixels. | |
getMedium() ⇒ (goog.ui.media.MediaModel.Medium|null|undefined)Gets the media medium. | |
getPlayer() ⇒ (goog.ui.media.MediaModel.Player|null|undefined)Gets the player data. | |
getSubTitles() ⇒ ?ArrayGets the subtitles for the media. | |
getThumbnails() ⇒ ?ArrayGets the thumbnail urls. | |
getType() ⇒ (goog.ui.media.MediaModel.MimeType|null|undefined)Gets the media mime type. | |
getUrl() ⇒ (string|undefined)Gets the URL of this media. | |
getWidth() ⇒ (number|undefined)Gets the width of the media in pixels. | |
setCaption(string caption) ⇒ !goog.ui.media.MediaModelSets the caption of this media. | |
setCategories(?Array categories) ⇒ !goog.ui.media.MediaModelSets the categories of the media | |
setCredits(?Array credits) ⇒ !goog.ui.media.MediaModelSets the credits of the media | |
setDescription(string description) ⇒ !goog.ui.media.MediaModelSets the description of this media. | |
setDuration(number duration) ⇒ !goog.ui.media.MediaModelSets duration of the media. | |
setHeight(number height) ⇒ !goog.ui.media.MediaModelSets the height of the media. | |
setMedium(?goog.ui.media.MediaModel.Medium medium) ⇒ !goog.ui.media.MediaModelSets the media medium. | |
setPlayer(?goog.ui.media.MediaModel.Player player) ⇒ !goog.ui.media.MediaModelSets the player data. | |
setSubTitles(?Array subtitles) ⇒ !goog.ui.media.MediaModelSets the subtitles for the media | |
setThumbnails(?Array thumbnails) ⇒ !goog.ui.media.MediaModelSets the thumbnail list. | |
setType(?goog.ui.media.MediaModel.MimeType type) ⇒ !goog.ui.media.MediaModelSets the media mime type. | |
setUrl(string url) ⇒ !goog.ui.media.MediaModelSets the URL of this media. | |
setWidth(number width) ⇒ !goog.ui.media.MediaModelSets the width of the media. | |