Class Index | File Index

Classes


Class minplayer.plugin

The base class for all plugins.
Defined in: minplayer.plugin.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
minplayer.plugin(name, context, options, queue)
Field Summary
Field Attributes Field Name and Description
 
Keep track of the context.
 
Create a queue lock.
 
The name of this plugin.
 
The options for this plugin.
 
The ready flag.
 
The event queue.
 
Keep track of already triggered events.
Method Summary
Method Attributes Method Name and Description
 
addPlugin(name, plugin)
Adds a new plugin to this player.
 
bind(type, data, fn)
Bind to a media event.
 
Check the queue and execute it.
 
The constructor which is called once the context is set.
 
create(name, base, context)
Creates a new plugin within this context.
 
Destructor.
 
get(plugin, callback)
Gets a plugin by name and calls callback when it is ready.
 
Returns if this component is valid.
 
poll(callback, interval)
Create a polling timer.
 
Plugins should call this method when they are ready.
 
trigger(type, data)
Trigger a media event.
 
unbind(type, fn)
Unbind a media event.
Class Detail
minplayer.plugin(name, context, options, queue)
Parameters:
{string} name
The name of this plugin.
{object} context
The jQuery context.
{object} options
This components options.
{object} queue
The event queue to pass events around.
Field Detail
context
Keep track of the context.

lock
Create a queue lock.

name
The name of this plugin.

options
The options for this plugin.

pluginReady
The ready flag.

queue
The event queue.

triggered
Keep track of already triggered events.
Method Detail
addPlugin(name, plugin)
Adds a new plugin to this player.
Parameters:
{string} name
The name of this plugin.
{object} plugin
A new plugin object, derived from media.plugin.

{object} bind(type, data, fn)
Bind to a media event.
Parameters:
{string} type
The event type.
{object} data
The data to bind with the event.
{function} fn
The callback function.
Returns:
{object} The plugin object.

checkQueue()
Check the queue and execute it.

construct()
The constructor which is called once the context is set. Any class deriving from the plugin class should place all context dependant functionality within this function instead of the standard constructor function since it is called on object derivation as well as object creation.

{object} create(name, base, context)
Creates a new plugin within this context.
Parameters:
{string} name
The name of the plugin you wish to create.
{object} base
The base object for this plugin.
{object} context
The context which you would like to create.
Returns:
{object} The new plugin object.

destroy()
Destructor.

{object} get(plugin, callback)
Gets a plugin by name and calls callback when it is ready.
Parameters:
{string} plugin
The plugin of the plugin.
{function} callback
Called when the plugin is ready.
Returns:
{object} The plugin if no callback is provided.

{boolean} isValid()
Returns if this component is valid.
Returns:
{boolean} TRUE if the plugin display is valid.

poll(callback, interval)
Create a polling timer.
Parameters:
{function} callback
The function to call when you poll.
{integer} interval
The interval you would like to poll.

ready()
Plugins should call this method when they are ready.

{object} trigger(type, data)
Trigger a media event.
Parameters:
{string} type
The event type.
{object} data
The event data object.
Returns:
{object} The plugin object.

{object} unbind(type, fn)
Unbind a media event.
Parameters:
{string} type
The event type.
{function} fn
The callback function.
Returns:
{object} The plugin object.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Mar 23 2012 10:16:35 GMT-0700 (PDT)