Class minplayer.display
Extends
minplayer.plugin.
Base class used to provide the display and options for any component
deriving from this class. Components who derive are expected to provide
the elements that they define by implementing the getElements method.
Defined in: minplayer.display.js.
Constructor Attributes | Constructor Name and Description |
---|---|
minplayer.display(name, context, options, queue)
|
Field Attributes | Field Name and Description |
---|---|
Reset the constructor.
|
|
Called when the window resizes.
|
- Fields borrowed from class minplayer.plugin:
- active, context, lock, name, pluginReady, queue, triggered, uuid
Method Attributes | Method Name and Description |
---|---|
fullscreen(full)
Make this display element go fullscreen.
|
|
Gets the full screen element.
|
|
getDisplay(context, options)
Returns the display for this component.
|
|
Returns all the jQuery elements that this component uses.
|
|
getScaledRect(ratio, rect)
Returns a scaled rectangle provided a ratio and the container rect.
|
|
hide(element)
Wrapper around hide that will always not show.
|
|
Checks to see if we are in fullscreen mode.
|
|
onFocus(focus)
Determines if the player is in focus or not.
|
|
showThenHide(element, timeout, cb)
Called if you would like for your plugin to show then hide.
|
|
Toggle fullscreen.
|
- Methods borrowed from class minplayer.plugin:
- addPlugin, bind, checkQueue, create, defaultOptions, destroy, get, isEvent, isValid, onAdded, poll, ready, trigger, ubind, unbind
Class Detail
minplayer.display(name, context, options, queue)
- Parameters:
- {string} name
- The name of this plugin.
- {object} context
- The jQuery context this component resides.
- {object} options
- The options for this component.
- {object} queue
- The event queue to pass events around.
Field Detail
constructor
Reset the constructor.
onResize
Called when the window resizes.
Method Detail
construct()
- See:
- minplayer.plugin.construct
fullscreen(full)
Make this display element go fullscreen.
- Parameters:
- {boolean} full
- Tell the player to go into fullscreen or not.
{object}
fullScreenElement()
Gets the full screen element.
- Returns:
- {object} The display to be used for full screen support.
{object}
getDisplay(context, options)
Returns the display for this component.
- Parameters:
- {object} context
- The context which this display is within.
- {object} options
- The options to get the display.
- Returns:
- {object} The jQuery context for this display.
{object}
getElements()
Returns all the jQuery elements that this component uses.
- Returns:
- {object} An object which defines all the jQuery elements that this component uses.
{object}
getScaledRect(ratio, rect)
Returns a scaled rectangle provided a ratio and the container rect.
- Parameters:
- {number} ratio
- The width/height ratio of what is being scaled.
- {object} rect
- The bounding rectangle for scaling.
- Returns:
- {object} The Rectangle object of the scaled rectangle.
hide(element)
Wrapper around hide that will always not show.
- Parameters:
- {object} element
- The element you wish to hide.
initialize()
- See:
- minplayer.plugin.initialize
{boolean}
isFullScreen()
Checks to see if we are in fullscreen mode.
- Returns:
- {boolean} TRUE - fullscreen, FALSE - otherwise.
onFocus(focus)
Determines if the player is in focus or not.
- Parameters:
- {boolean} focus
- If the player is in focus.
showThenHide(element, timeout, cb)
Called if you would like for your plugin to show then hide.
- Parameters:
- {object} element
- The element you would like to hide or show.
- {number} timeout
- The timeout to hide and show.
- {function} cb
- Called when something happens.
toggleFullScreen()
Toggle fullscreen.