Class Index | File Index

Classes


Class minplayer.players.base


Extends minplayer.display.
The base media player class where all media players derive from.
Defined in: minplayer.players.base.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
minplayer.players.base(context, options, ready)
Field Summary
Field Attributes Field Name and Description
 
Reset the constructor.
 
The currently loaded media file.
 
The ready pointer to be called when the player is ready.
Method Summary
Method Attributes Method Name and Description
<static>  
minplayer.players.base.canPlay(file)
Determine if we can play the media file.
 
Clears all the intervals.
 
 
Creates the media player and inserts it in the DOM.
 
getBytesLoaded(callback)
Return the bytes of media loaded.
 
getBytesStart(callback)
Return the start bytes for the loaded media.
 
getBytesTotal(callback)
Return the total amount of bytes.
 
getCurrentTime(callback)
Get the current time for the media being played.
 
getDuration(callback)
Return the duration of the loaded media.
 
Returns the media player object.
<static>  
minplayer.players.base.getMediaId(file)
Returns the ID for the media being played.
<static>  
minplayer.players.base.getPriority()
Get the priority of this media player.
 
getVolume(callback)
Get the volume from the loaded media.
 
Determines if the player should show the playloader.
 
 
load(file)
Loads a new media player.
 
Should be called when the media is complete.
 
Should be called when the media is done loading.
 
Should be called when the media is paused.
 
Should be called when the media is playing.
 
Called when the player is ready to recieve events and commands.
 
Should be called when the player is waiting.
 
Pause the loaded media file.
 
play()
Play the loaded media file.
 
Returns if the media player is already within the DOM.
 
Resets all variables.
 
seek(pos)
Seek the loaded media.
 
setVolume(vol)
Set the volume of the loaded minplayer.
 
stop()
Stop the loaded media file.
Methods borrowed from class minplayer.display:
bind, getElements, getScaledRect, isValid, onResize, trigger
Methods borrowed from class minplayer.plugin:
addPlugin, destroy, eachPlugin, getPlugin, loadPlugins, setPlayer
Class Detail
minplayer.players.base(context, options, ready)
Parameters:
{object} context
The jQuery context.
{object} options
This components options.
{function} ready
The callback function when the player is ready.
Field Detail
constructor
Reset the constructor.

mediaFile
The currently loaded media file.

readyCallback
The ready pointer to be called when the player is ready.
Method Detail
<static> {boolean} minplayer.players.base.canPlay(file)
Determine if we can play the media file.
Parameters:
{object} file
A minplayer.file object.
Returns:
{boolean} If this player can play this media type.

clearIntervals()
Clears all the intervals.

construct()
See:
minplayer.plugin.construct

{object} create()
Creates the media player and inserts it in the DOM.
Returns:
{object} The media player entity.

{int} getBytesLoaded(callback)
Return the bytes of media loaded.
Parameters:
{function} callback
Called when the bytes loaded is determined.
Returns:
{int} The amount of bytes loaded.

{int} getBytesStart(callback)
Return the start bytes for the loaded media.
Parameters:
{function} callback
Called when the start bytes is determined.
Returns:
{int} The bytes that were started.

{int} getBytesTotal(callback)
Return the total amount of bytes.
Parameters:
{function} callback
Called when the bytes total is determined.
Returns:
{int} The total amount of bytes for this media.

{number} getCurrentTime(callback)
Get the current time for the media being played.
Parameters:
{function} callback
Called when the time is determined.
Returns:
{number} The volume of the media; 0 to 1.

{number} getDuration(callback)
Return the duration of the loaded media.
Parameters:
{function} callback
Called when the duration is determined.
Returns:
{number} The duration of the loaded media.

{object} getMedia()
Returns the media player object.
Returns:
{object} The media player object.

<static> {string} minplayer.players.base.getMediaId(file)
Returns the ID for the media being played.
Parameters:
{object} file
A minplayer.file object.
Returns:
{string} The ID for the provided media.

<static> {number} minplayer.players.base.getPriority()
Get the priority of this media player.
Returns:
{number} The priority of this media player.

{number} getVolume(callback)
Get the volume from the loaded media.
Parameters:
{function} callback
Called when the volume is determined.
Returns:
{number} The volume of the media; 0 to 1.

{bool} hasPlayLoader()
Determines if the player should show the playloader.
Returns:
{bool} If this player implements its own playLoader.

{boolean} isReady()
Returns:
{boolean} Checks to see if the Flash is ready.
See:
minplayer.players.base#isReady

load(file)
Loads a new media player.
Parameters:
{object} file
A minplayer.file object.

onComplete()
Should be called when the media is complete.

onLoaded()
Should be called when the media is done loading.

onPaused()
Should be called when the media is paused.

onPlaying()
Should be called when the media is playing.

onReady()
Called when the player is ready to recieve events and commands.

onWaiting()
Should be called when the player is waiting.

pause()
Pause the loaded media file.

play()
Play the loaded media file.

{boolean} playerFound()
Returns if the media player is already within the DOM.
Returns:
{boolean} TRUE - if the player is in the DOM, FALSE otherwise.

reset()
Resets all variables.

seek(pos)
Seek the loaded media.
Parameters:
{number} pos
The position to seek the minplayer. 0 to 1.

setVolume(vol)
Set the volume of the loaded minplayer.
Parameters:
{number} vol
The volume to set the media. 0 to 1.

stop()
Stop the loaded media file.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Feb 10 2012 02:13:36 GMT+0100 (CET)