goog.ui.media.MediaModel
Classgoog.ui.media.MediaModel(opt_url, opt_caption, opt_description, opt_type, opt_medium,
opt_duration, opt_width, opt_height)
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.
opt_url
{string
=}
opt_caption
{string
=}
opt_description
{string
=}
opt_type
{goog.ui.media.MediaModel.MimeType
=}
opt_medium
{goog.ui.media.MediaModel.Medium
=}
opt_duration
{number
=}
opt_width
{number
=}
opt_height
{number
=}
goog.ui.media.MediaModel.Category
ClassA taxonomy to be set that gives an indication of the type of media content, and its particular contents. … more
goog.ui.media.MediaModel.Credit
ClassIndicates an entity that has contributed to a media object. Based on 'media.credit' in the rss spec. … more
goog.ui.media.MediaModel.Medium
EnumSupported mediums, found here: {@link http://video.search.yahoo.com/mrss} … more
goog.ui.media.MediaModel.MimeType
EnumThe supported media mime types, a subset of the media types found here: {@link http://www.iana.org/assignments/media-types/} and here {@link http://en.wikipedia.org/wiki/Internet_media_type} … more
goog.ui.media.MediaModel.Player
ClassConstructs a player containing details of the player's URL and optionally its size. … more
goog.ui.media.MediaModel.SubTitle
ClassA reference to the subtitle URI for a media object. Implements the 'media.subTitle' in the rss spec. … more
goog.ui.media.MediaModel.Thumbnail
ClassConstructs a thumbnail containing details of the thumbnail's image URL and optionally its size. … more
.findCategoryWithScheme(scheme)
Finds the first category with the given scheme.
scheme
{string
}
goog.ui.media.MediaModel.Category
}
.findCreditsWithRole(role)
Finds all credits with the given role.
role
{string
}
Array
.<!goog.ui.media.MediaModel.Credit
>}
.getCaption()
Gets the caption of this media.
string
|undefined
}
.getCategories()
Gets the categories of the media.
Array
.<goog.ui.media.MediaModel.Category
>}
.getCredits()
Gets the credits of the media.
Array
.<goog.ui.media.MediaModel.Credit
>}
.getDescription()
Gets the description of this media.
string
|undefined
}
.getDuration()
Gets the duration of the media.
number
|undefined
}
.getHeight()
Gets the height of the media in pixels.
number
|undefined
}
.getMedium()
Gets the media medium.
goog.ui.media.MediaModel.Medium
|undefined
}
.getPlayer()
Gets the player data.
goog.ui.media.MediaModel.Player
|undefined
}
.getSubTitles()
Gets the subtitles for the media.
Array
.<goog.ui.media.MediaModel.SubTitle
>}
.getThumbnails()
Gets the thumbnail urls.
Array
.<goog.ui.media.MediaModel.Thumbnail
>}
.getType()
Gets the media mime type.
goog.ui.media.MediaModel.MimeType
|undefined
}
.getUrl()
Gets the URL of this media.
string
|undefined
}
.getWidth()
Gets the width of the media in pixels.
number
|undefined
}
.setCaption(caption)
Sets the caption of this media.
caption
{string
}
goog.ui.media.MediaModel
}
.setCategories(categories)
Sets the categories of the media
categories
{Array
.<goog.ui.media.MediaModel.Category
>}
goog.ui.media.MediaModel
}
.setCredits(credits)
Sets the credits of the media
credits
{!Array
.<goog.ui.media.MediaModel.Credit
>}
goog.ui.media.MediaModel
}
.setDescription(description)
Sets the description of this media.
description
{string
}
goog.ui.media.MediaModel
}
.setDuration(duration)
Sets duration of the media.
duration
{number
}
goog.ui.media.MediaModel
}
.setHeight(height)
Sets the height of the media.
height
{number
}
goog.ui.media.MediaModel
}
.setMedium(medium)
Sets the media medium.
medium
{goog.ui.media.MediaModel.Medium
}
goog.ui.media.MediaModel
}
.setPlayer(player)
Sets the player data.
player
{goog.ui.media.MediaModel.Player
}
goog.ui.media.MediaModel
}
.setSubTitles(subtitles)
Sets the subtitles for the media
subtitles
{Array
.<goog.ui.media.MediaModel.SubTitle
>}
goog.ui.media.MediaModel
}
.setThumbnails(thumbnails)
Sets the thumbnail list.
thumbnails
{Array
.<goog.ui.media.MediaModel.Thumbnail
>}
goog.ui.media.MediaModel
}
.setType(type)
Sets the media mime type.
type
{goog.ui.media.MediaModel.MimeType
}
goog.ui.media.MediaModel
}
.setUrl(url)
Sets the URL of this media.
url
{string
}
goog.ui.media.MediaModel
}
.setWidth(width)
Sets the width of the media.
width
{number
}
goog.ui.media.MediaModel
}