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.Category Finds the first category with the given scheme. | |
findCreditWithRole(string role) ⇒ ?goog.ui.media.MediaModel.Credit Finds the first credit with the given role. | |
getCaption() ⇒ (string|undefined) Gets the caption of this media. | |
getCategories() ⇒ ?Array Gets the categories of the media. | |
getCredits() ⇒ ?Array Gets 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() ⇒ ?Array Gets the subtitles for the media. | |
getThumbnails() ⇒ ?Array Gets 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.MediaModel Sets the caption of this media. | |
setCategories(?Array categories) ⇒ !goog.ui.media.MediaModel Sets the categories of the media | |
setCredits(?Array credits) ⇒ !goog.ui.media.MediaModel Sets the credits of the media | |
setDescription(string description) ⇒ !goog.ui.media.MediaModel Sets the description of this media. | |
setDuration(number duration) ⇒ !goog.ui.media.MediaModel Sets duration of the media. | |
setHeight(number height) ⇒ !goog.ui.media.MediaModel Sets the height of the media. | |
setMedium(?goog.ui.media.MediaModel.Medium medium) ⇒ !goog.ui.media.MediaModel Sets the media medium. | |
setPlayer(?goog.ui.media.MediaModel.Player player) ⇒ !goog.ui.media.MediaModel Sets the player data. | |
setSubTitles(?Array subtitles) ⇒ !goog.ui.media.MediaModel Sets the subtitles for the media | |
setThumbnails(?Array thumbnails) ⇒ !goog.ui.media.MediaModel Sets the thumbnail list. | |
setType(?goog.ui.media.MediaModel.MimeType type) ⇒ !goog.ui.media.MediaModel Sets the media mime type. | |
setUrl(string url) ⇒ !goog.ui.media.MediaModel Sets the URL of this media. | |
setWidth(number width) ⇒ !goog.ui.media.MediaModel Sets the width of the media. |