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
 
Say that we are active.
 
Keep track of the context.
 
Create a queue lock.
 
The name of this plugin.
 
The ready flag.
 
The event queue.
 
Keep track of already triggered events.
 
The universally unique ID for this plugin.
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.
 
checkQueue(plugin)
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.
 
defaultOptions(options)
Get the default options for this plugin.
 
Destructor.
 
get(plugin, callback)
Gets a plugin by name and calls callback when it is ready.
 
Initialize function for the plugin.
 
isEvent(name, type)
Determine if an event is of a certain type.
 
Returns if this component is valid.
 
onAdded(plugin)
Allows a plugin to do something when it is added to another plugin.
 
poll(name, callback, interval)
Create a polling timer.
 
Plugins should call this method when they are ready.
 
trigger(type, data, noqueue)
Trigger a media event.
 
ubind(type, data, fn)
Unbind then Bind
 
unbind(type)
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
active
Say that we are active.

context
Keep track of the context.

lock
Create a queue lock.

name
The name of this plugin.

pluginReady
The ready flag.

queue
The event queue.

triggered
Keep track of already triggered events.

uuid
The universally unique ID for this plugin.
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(plugin)
Check the queue and execute it.
Parameters:
{object} plugin
The plugin object to check the queue against.

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.

defaultOptions(options)
Get the default options for this plugin.
Parameters:
{object} options
The default options for this plugin.

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.

initialize()
Initialize function for the plugin.

{boolean} isEvent(name, type)
Determine if an event is of a certain type.
Parameters:
{string} name
The full name of the event.
{string} type
The type of the event.
Returns:
{boolean} If this named event is of type.

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

onAdded(plugin)
Allows a plugin to do something when it is added to another plugin.
Parameters:
{object} plugin
The plugin that this plugin was added to.

{string} poll(name, callback, interval)
Create a polling timer.
Parameters:
{string} name
The name of the timer.
{function} callback
The function to call when you poll.
{integer} interval
The interval you would like to poll.
Returns:
{string} The setTimeout ID.

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

{object} trigger(type, data, noqueue)
Trigger a media event.
Parameters:
{string} type
The event type.
{object} data
The event data object.
{boolean} noqueue
If this trigger should not be queued.
Returns:
{object} The plugin object.

{object} ubind(type, data, fn)
Unbind then Bind
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.

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

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Dec 04 2013 21:13:26 GMT-0600 (CST)