Home

# Class goog.ui.media.MediaRenderer

Base class of all media renderers. Provides the common renderer functionality of medias. The current common functionality shared by Medias is to have an outer frame that gets highlighted on mouse hover. TODO(user): implement more common UI behavior, as needed. NOTE(user): I am not enjoying how the subclasses are changing their state through setState() ... maybe provide abstract methods like goog.ui.media.MediaRenderer.prototype.preview = goog.abstractMethod; goog.ui.media.MediaRenderer.prototype.play = goog.abstractMethod; goog.ui.media.MediaRenderer.prototype.minimize = goog.abstractMethod; goog.ui.media.MediaRenderer.prototype.maximize = goog.abstractMethod; and call them on this parent class setState ?

extends goog.ui.ControlRenderer

Instance Method Summary
| `createDom(?goog.ui.Control control) ⇒ ?Element` Builds the common DOM structure of medias. Builds an outer div, and appends a child div with the {@code goog.ui.Control.getContent} content. Marks the caption with a {@code this.getClassClass()} + '-caption' css flag, so that specific renderers can hide/show the caption as desired.

`getThumbnailCssName(number index) ⇒ string`

Returns a renamable CSS class name for a numbered thumbnail. The default implementation generates the class names goog-ui-media-thumbnail0, goog-ui-media-thumbnail1, and the generic goog-ui-media-thumbnailn. Subclasses can override this method when their media requires additional specific class names (Applications are supposed to know how many thumbnails media will have).