Class minplayer.players.youtube
Extends
minplayer.players.base.
The YouTube media player.
Defined in: minplayer.players.youtube.js.
Constructor Attributes | Constructor Name and Description |
---|---|
minplayer.players.youtube(context, options, queue)
|
Field Attributes | Field Name and Description |
---|---|
Reset the constructor.
|
|
The quality of the YouTube stream.
|
- Fields borrowed from class minplayer.players.base:
- mediaFile
- Fields borrowed from class minplayer.display:
- onResize
- Fields borrowed from class minplayer.plugin:
- active, context, lock, name, options, pluginReady, queue, triggered
Method Attributes | Method Name and Description |
---|---|
<static> |
minplayer.players.youtube.canPlay(file)
|
create()
|
|
getBytesLoaded(callback)
|
|
getBytesStart(callback)
|
|
getBytesTotal(callback)
|
|
getCurrentTime(callback)
|
|
getDuration(callback)
|
|
<static> |
minplayer.players.youtube.getImage(file, type, callback)
Returns a preview image for this media player.
|
<static> |
minplayer.players.youtube.getMediaId(file)
Return the ID for a provided media file.
|
<static> |
minplayer.players.youtube.getPriority(file)
|
getVolume(callback)
|
|
Determines if the player should show the controller.
|
|
hasPlayLoader(preview)
Determines if the player should show the playloader.
|
|
load(file)
|
|
onPlayerStateChange(event)
Called when the player state changes.
|
|
onQualityChange(newQuality)
Called when the player quality changes.
|
|
onReady(event)
Called when an error occurs.
|
|
pause()
|
|
play()
|
|
Checks to see if this player can be found.
|
|
seek(pos)
|
|
setPlayerState(playerState)
Translates the player state for the YouTube API player.
|
|
setVolume(vol)
|
|
stop()
|
- Methods borrowed from class minplayer.players.base:
- addPlayer, clear, destroy, getElements, getPlayer, getValue, isReady, onComplete, onError, onLoaded, onPaused, onPlaying, onWaiting, reset, seekRelative, setVolumeRelative
- Methods borrowed from class minplayer.display:
- fullscreen, fullScreenElement, getDisplay, getScaledRect, hide, isFullScreen, onFocus, toggleFullScreen
- Methods borrowed from class minplayer.plugin:
- addPlugin, bind, checkQueue, get, isValid, poll, ready, trigger, unbind
Class Detail
minplayer.players.youtube(context, options, queue)
- Parameters:
- {object} context
- The jQuery context.
- {object} options
- This components options.
- {object} queue
- The event queue to pass events around.
Field Detail
constructor
Reset the constructor.
quality
The quality of the YouTube stream.
Method Detail
<static>
{boolean}
minplayer.players.youtube.canPlay(file)
- Parameters:
- file
- Returns:
- {boolean} If this player can play this media type.
- See:
- minplayer.players.base#canPlay
construct()
- See:
- minplayer.plugin.construct
{object}
create()
- Returns:
- {object} The media player entity.
getBytesLoaded(callback)
- Parameters:
- callback
- See:
- minplayer.players.base#getBytesLoaded.
getBytesStart(callback)
- Parameters:
- callback
- See:
- minplayer.players.base#getBytesStart.
getBytesTotal(callback)
- Parameters:
- callback
- See:
- minplayer.players.base#getBytesTotal.
getCurrentTime(callback)
- Parameters:
- callback
getDuration(callback)
- Parameters:
- callback
- See:
- minplayer.players.base#getDuration.
<static>
minplayer.players.youtube.getImage(file, type, callback)
Returns a preview image for this media player.
- Parameters:
- {object} file
- A minplayer.file object.
- {string} type
- The type of image.
- {function} callback
- Called when the image is retrieved.
<static>
{string}
minplayer.players.youtube.getMediaId(file)
Return the ID for a provided media file.
- Parameters:
- {object} file
- A minplayer.file object.
- Returns:
- {string} The ID for the provided media.
<static>
{number}
minplayer.players.youtube.getPriority(file)
- Parameters:
- {object} file
- A minplayer.file object.
- Returns:
- {number} The priority of this media player.
- See:
- minplayer.players.base#getPriority
getVolume(callback)
- Parameters:
- callback
{bool}
hasController()
Determines if the player should show the controller.
- Returns:
- {bool} If this player implements its own playLoader.
{bool}
hasPlayLoader(preview)
Determines if the player should show the playloader.
- Parameters:
- {string} preview
- The preview image.
- Returns:
- {bool} If this player implements its own playLoader.
{boolean}
load(file)
- Parameters:
- file
- Returns:
- {boolean} If this action was performed.
onPlayerStateChange(event)
Called when the player state changes.
- Parameters:
- {object} event
- A JavaScript Event.
onQualityChange(newQuality)
Called when the player quality changes.
- Parameters:
- {string} newQuality
- The new quality for the change.
onReady(event)
Called when an error occurs.
- Parameters:
- {string} event
- The onReady event that was triggered.
{boolean}
pause()
- Returns:
- {boolean} If this action was performed.
{boolean}
play()
- Returns:
- {boolean} If this action was performed.
{bool}
playerFound()
Checks to see if this player can be found.
- Returns:
- {bool} TRUE - Player is found, FALSE - otherwise.
{boolean}
seek(pos)
- Parameters:
- pos
- Returns:
- {boolean} If this action was performed.
setPlayerState(playerState)
Translates the player state for the YouTube API player.
- Parameters:
- {number} playerState
- The YouTube player state.
{boolean}
setVolume(vol)
- Parameters:
- vol
- Returns:
- {boolean} If this action was performed.
{boolean}
stop()
- Returns:
- {boolean} If this action was performed.