goog.ui.media.YoutubeModel
Classgoog.ui.media.YoutubeModel
> goog.ui.media.MediaModel
goog.ui.media.YoutubeModel(videoId, opt_caption, opt_description)
The {@code goog.ui.media.Youtube} media data model. It stores a required {@code videoId} field, sets the youtube URL, and allows a few optional parameters.
videoId
{string
}
opt_caption
{string
=}
opt_description
{string
=}
.buildUrl(videoId)
The opposite of {@code goog.ui.media.Youtube.newInstance}: it takes a videoId and returns a youtube URL.
videoId
{string
}
string
}
.findCategoryWithScheme(scheme)
Inherited from goog.ui.media.MediaModel
.
Finds the first category with the given scheme.
scheme
{string
}
goog.ui.media.MediaModel.Category
}
.findCreditsWithRole(role)
Inherited from goog.ui.media.MediaModel
.
Finds all credits with the given role.
role
{string
}
Array
.<!goog.ui.media.MediaModel.Credit
>}
.getCaption()
Inherited from goog.ui.media.MediaModel
.
Gets the caption of this media.
string
|undefined
}
.getCategories()
Inherited from goog.ui.media.MediaModel
.
Gets the categories of the media.
Array
.<goog.ui.media.MediaModel.Category
>}
.getCredits()
Inherited from goog.ui.media.MediaModel
.
Gets the credits of the media.
Array
.<goog.ui.media.MediaModel.Credit
>}
.getDescription()
Inherited from goog.ui.media.MediaModel
.
Gets the description of this media.
string
|undefined
}
.getDuration()
Inherited from goog.ui.media.MediaModel
.
Gets the duration of the media.
number
|undefined
}
.getFlashUrl(videoId, opt_autoplay)
An auxiliary method that builds URL of the flash movie to be embedded, out of the youtube video id.
videoId
{string
}
opt_autoplay
{boolean
=}
string
}
.getHeight()
Inherited from goog.ui.media.MediaModel
.
Gets the height of the media in pixels.
number
|undefined
}
.getMedium()
Inherited from goog.ui.media.MediaModel
.
Gets the media medium.
goog.ui.media.MediaModel.Medium
|undefined
}
.getPlayer()
Inherited from goog.ui.media.MediaModel
.
Gets the player data.
goog.ui.media.MediaModel.Player
|undefined
}
.getSubTitles()
Inherited from goog.ui.media.MediaModel
.
Gets the subtitles for the media.
Array
.<goog.ui.media.MediaModel.SubTitle
>}
.getThumbnailUrl(youtubeId)
A static auxiliary method that builds a static image URL with a preview of the youtube video. NOTE(user): patterned after Gmail's gadgets/youtube, TODO(user): how do I specify the width/height of the resulting image on the url ? is there an official API for http://ytimg.com ?
youtubeId
{string
}
string
}
.getThumbnails()
Inherited from goog.ui.media.MediaModel
.
Gets the thumbnail urls.
Array
.<goog.ui.media.MediaModel.Thumbnail
>}
.getType()
Inherited from goog.ui.media.MediaModel
.
Gets the media mime type.
goog.ui.media.MediaModel.MimeType
|undefined
}
.getUrl()
Inherited from goog.ui.media.MediaModel
.
Gets the URL of this media.
string
|undefined
}
.getVideoId()
Gets the Youtube video id.
string
}
.getWidth()
Inherited from goog.ui.media.MediaModel
.
Gets the width of the media in pixels.
number
|undefined
}
.newInstance(youtubeUrl, opt_caption, opt_description)
A auxiliary static method that parses a youtube URL, extracting the ID of the video, and builds a YoutubeModel.
youtubeUrl
{string
}
opt_caption
{string
=}
opt_description
{string
=}
goog.ui.media.YoutubeModel
}
.setCaption(caption)
Inherited from goog.ui.media.MediaModel
.
Sets the caption of this media.
caption
{string
}
goog.ui.media.MediaModel
}
.setCategories(categories)
Inherited from goog.ui.media.MediaModel
.
Sets the categories of the media
categories
{Array
.<goog.ui.media.MediaModel.Category
>}
goog.ui.media.MediaModel
}
.setCredits(credits)
Inherited from goog.ui.media.MediaModel
.
Sets the credits of the media
credits
{!Array
.<goog.ui.media.MediaModel.Credit
>}
goog.ui.media.MediaModel
}
.setDescription(description)
Inherited from goog.ui.media.MediaModel
.
Sets the description of this media.
description
{string
}
goog.ui.media.MediaModel
}
.setDuration(duration)
Inherited from goog.ui.media.MediaModel
.
Sets duration of the media.
duration
{number
}
goog.ui.media.MediaModel
}
.setHeight(height)
Inherited from goog.ui.media.MediaModel
.
Sets the height of the media.
height
{number
}
goog.ui.media.MediaModel
}
.setMedium(medium)
Inherited from goog.ui.media.MediaModel
.
Sets the media medium.
medium
{goog.ui.media.MediaModel.Medium
}
goog.ui.media.MediaModel
}
.setPlayer(player)
Inherited from goog.ui.media.MediaModel
.
Sets the player data.
player
{goog.ui.media.MediaModel.Player
}
goog.ui.media.MediaModel
}
.setSubTitles(subtitles)
Inherited from goog.ui.media.MediaModel
.
Sets the subtitles for the media
subtitles
{Array
.<goog.ui.media.MediaModel.SubTitle
>}
goog.ui.media.MediaModel
}
.setThumbnails(thumbnails)
Inherited from goog.ui.media.MediaModel
.
Sets the thumbnail list.
thumbnails
{Array
.<goog.ui.media.MediaModel.Thumbnail
>}
goog.ui.media.MediaModel
}
.setType(type)
Inherited from goog.ui.media.MediaModel
.
Sets the media mime type.
type
{goog.ui.media.MediaModel.MimeType
}
goog.ui.media.MediaModel
}
.setUrl(url)
Inherited from goog.ui.media.MediaModel
.
Sets the URL of this media.
url
{string
}
goog.ui.media.MediaModel
}
.setWidth(width)
Inherited from goog.ui.media.MediaModel
.
Sets the width of the media.
width
{number
}
goog.ui.media.MediaModel
}