Home

# Class goog.ui.media.YoutubeModel

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.

extends goog.ui.media.MediaModel

Instance Method Summary
| `getFlashUrl(string videoId, boolean= opt_autoplay) ⇒ string` An auxiliary method that builds URL of the flash movie to be embedded, out of the youtube video id.
| `getVideoId() ⇒ string` Gets the Youtube video id.

Static Method Summary
| `buildUrl(string videoId) ⇒ string` The opposite of {@code goog.ui.media.Youtube.newInstance}: it takes a videoId and returns a youtube URL.
| `getThumbnailUrl(string youtubeId) ⇒ string` 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 ?
| `newInstance(string youtubeUrl, string= opt_caption, string= opt_description) ⇒ ?goog.ui.media.YoutubeModel` A auxiliary static method that parses a youtube URL, extracting the ID of the video, and builds a YoutubeModel.