Class YtMooDebugPlayer
Version
1.0.
Extends
YtMooPlayer.
The debugging version of the YtMooPlayer.
Defined in: <YtMooPlayer.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
The YtMooDebugPlayer is the debug version of the YtMooPlayer.
|
| Field Attributes | Field Name and Description |
|---|---|
|
All events which should be debugged
with this debug player.
|
|
|
The key which preceeds
all console log messages for this debug player.
|
- Fields borrowed from class YtMooPlayer:
- options.autoStart, options.height, options.loading_check_interval, options.videoId, options.width
| Method Attributes | Method Name and Description |
|---|---|
|
initialize(target, options)
Initialize method for the new instance of the YtMooDebugPlayer.
|
|
|
log()
Logs all arguments to that function directly to the console.log, but uses
the defined options.debugKey as first argument.
|
- Methods borrowed from class YtMooPlayer:
- cue, getBytesLoaded, getBytesTotal, getCurrentPercent, getCurrentTime, getDuration, getPercentLoaded, getState, getStateId, getVideoEmbedCode, loadVideo, pause, play, playVideo, stop
- Events borrowed from class YtMooPlayer:
- onBuffered, onBuffering, onCueing, onEnded, onLoading, onPaused, onPlay, onReady, onStateChange, onUnstarted
Class Detail
YtMooDebugPlayer()
The YtMooDebugPlayer is the debug version of the YtMooPlayer.
It extends the YtMooPlayer and has two extra options. 1. {String} debugKey 2.
{Array} debugEvents Array of Eventnames
As soon as one of the debugEvents get's triggered, a
console.log(debugKey,arguments) will be called. So this class is nice for
debugging YtMooPlayer.
Author: DracoBlue JanS@DracoBlue.de.
Author: DracoBlue JanS@DracoBlue.de.
var myplayer = new YtMooDebugPlayer( 'player_div', // use #player_div as container
{
'videoId': 'AJSWEHNCBDE' // load YT-Video with that id
'debugKey': 'MyLittleDBGPlayer'
}
);
myplayer.play(); // start the video
// This will result in console-Messages in FireBug
// MyLittleDBGPlayer: ['onPlay']
// ...
// MyLittleDBGPlayer: ['onEnded']
Field Detail
{String[]}
options.debugEvents
All events which should be debugged
with this debug player.
{String}
options.debugKey
The key which preceeds
all console log messages for this debug player.
- Default Value:
- YtMooDebugPlayer
Method Detail
initialize(target, options)
Initialize method for the new instance of the YtMooDebugPlayer.
- Parameters:
- {String} target
- The identifier of the target object for the player.
- {Object} options
- The options for the player.
log()
Logs all arguments to that function directly to the console.log, but uses
the defined options.debugKey as first argument.