public class SimpleMediaPlayer extends JMEItem implements ISimpleMediaPlayer, IInitable, uk.co.caprica.vlcj.player.direct.RenderCallback, uk.co.caprica.vlcj.player.direct.BufferFormatCallback
com.jme3.scene.Spatial.CullHintINestable.IChildrenChangedListener| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CACHABLE_TYPE
The Constant CACHABLE_TYPE.
|
uk.co.caprica.vlcj.player.direct.DirectMediaPlayer |
mediaPlayer
The media player.
|
static java.util.ArrayList<SimpleMediaPlayer> |
mediaPlayers
The media players.
|
KEY_JMEITEMDATA| Constructor and Description |
|---|
SimpleMediaPlayer(java.lang.String name,
java.util.UUID uuid)
Instantiates a new simple media player.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMediaPlayerEventListener(uk.co.caprica.vlcj.player.MediaPlayerEventAdapter mediaPlayerEventAdapter)
Adds the media player event listener.
|
void |
destroy()
Destroy.
|
void |
display(uk.co.caprica.vlcj.player.direct.DirectMediaPlayer mediaPlayer,
com.sun.jna.Memory[] nativeBuffers,
uk.co.caprica.vlcj.player.direct.BufferFormat bufferFormat) |
uk.co.caprica.vlcj.player.direct.BufferFormat |
getBufferFormat(int sourceWidth,
int sourceHeight) |
float |
getHeight()
Gets the height.
|
com.jme3.scene.Spatial |
getManipulableSpatial()
Gets the manipulable spatial.
|
float |
getPosition()
Gets the position.
|
boolean |
getRepeat()
Gets the repeat.
|
float |
getWidth()
Gets the width.
|
void |
initializeGeometry(com.jme3.asset.AssetManager assetManager)
Initialize geometry.
|
boolean |
isPlaying()
Checks if is playing.
|
void |
pause()
Pause.
|
void |
play()
Play.
|
void |
setActionOnVideoEndListener(IActionOnVideoEndListener actionOnVideoEndListener)
Sets the action on video end listener.
|
void |
setLocalResource(java.io.File file,
boolean autostart)
Sets the local resource.
|
void |
setLocalResource(java.lang.String localPath,
boolean autostart)
Sets the local resource.
|
void |
setPosition(float pos)
Sets the position.
|
void |
setRemoteResource(java.lang.String remotePath,
boolean autostart)
Sets the remote resource.
|
void |
setRepeat(boolean repeat)
Sets the repeat.
|
void |
setSize(float width,
float height)
Sets the size.
|
void |
setVisible(boolean isVisible)
Sets the visible.
|
void |
stop()
Stop.
|
void |
unpause()
Unpause.
|
addItem, addItemListener, behaviourAdded, centerItem, convertWorldVelocityToLocalVelocity, deRegisterChildrenChangedListener, getBehaviours, getBehaviours, getChildItems, getChildrenCount, getItemChildren, getItemListeners, getItemName, getMultiTouchDispatcher, getName, getParentItem, getRelativeLocation, getRelativeLocationOfWorldLocation, getRelativeRotation, getRelativeScale, getUUID, getWorldLocation, getWorldLocation, getWorldRotationDegrees, getZOrder, getZOrderManager, hasChildren, isVisible, registerChildrenChangedListener, removeAllItems, removeItem, removeItemListener, setInteractionEnabled, setItemListeners, setItemName, setParentItem, setRelativeLocation, setRelativeRotation, setRelativeScale, setWorldLocation, setZOrder, toStringattachChild, attachChildAt, childChange, clone, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, read, setLodLevel, setMaterial, setModelBound, swapChildren, updateGeometricState, updateLogicalState, updateModelBound, writeaddControl, addLight, breadthFirstTraversal, center, checkCulling, clone, getControl, getControl, getCullHint, getLastFrustumIntersection, getLocalCullHint, getLocalLightList, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, localToWorld, lookAt, matches, move, move, removeControl, removeControl, removeFromParent, removeLight, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setCullHint, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setQueueBucket, setShadowMode, setUserData, worldToLocalequals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddItemListener, behaviourAdded, centerItem, convertWorldVelocityToLocalVelocity, getBehaviours, getBehaviours, getItemListeners, getMultiTouchDispatcher, getName, getParentItem, getRelativeLocation, getRelativeLocationOfWorldLocation, getRelativeRotation, getRelativeScale, getUUID, getWorldLocation, getWorldLocation, getWorldRotationDegrees, getZOrder, getZOrderManager, isVisible, removeItemListener, setInteractionEnabled, setItemListeners, setParentItem, setRelativeLocation, setRelativeRotation, setRelativeScale, setWorldLocation, setZOrderaddItem, deRegisterChildrenChangedListener, getChildItems, getChildrenCount, hasChildren, registerChildrenChangedListener, removeAllItems, removeItempublic static final java.lang.String CACHABLE_TYPE
public static java.util.ArrayList<SimpleMediaPlayer> mediaPlayers
public uk.co.caprica.vlcj.player.direct.DirectMediaPlayer mediaPlayer
public SimpleMediaPlayer(java.lang.String name,
java.util.UUID uuid)
name - the nameuuid - the uuidpublic void addMediaPlayerEventListener(uk.co.caprica.vlcj.player.MediaPlayerEventAdapter mediaPlayerEventAdapter)
ISimpleMediaPlayeraddMediaPlayerEventListener in interface ISimpleMediaPlayermediaPlayerEventAdapter - the media player event adapterpublic void destroy()
ISimpleMediaPlayerdestroy in interface ISimpleMediaPlayerpublic void display(uk.co.caprica.vlcj.player.direct.DirectMediaPlayer mediaPlayer,
com.sun.jna.Memory[] nativeBuffers,
uk.co.caprica.vlcj.player.direct.BufferFormat bufferFormat)
display in interface uk.co.caprica.vlcj.player.direct.RenderCallbackpublic uk.co.caprica.vlcj.player.direct.BufferFormat getBufferFormat(int sourceWidth,
int sourceHeight)
getBufferFormat in interface uk.co.caprica.vlcj.player.direct.BufferFormatCallbackpublic float getHeight()
ISimpleMediaPlayergetHeight in interface ISimpleMediaPlayerpublic com.jme3.scene.Spatial getManipulableSpatial()
IItemgetManipulableSpatial in interface IItempublic float getPosition()
ISimpleMediaPlayergetPosition in interface ISimpleMediaPlayerpublic boolean getRepeat()
ISimpleMediaPlayergetRepeat in interface ISimpleMediaPlayerpublic float getWidth()
ISimpleMediaPlayergetWidth in interface ISimpleMediaPlayerpublic void initializeGeometry(com.jme3.asset.AssetManager assetManager)
IInitableinitializeGeometry in interface IInitableassetManager - the asset managerpublic boolean isPlaying()
ISimpleMediaPlayerisPlaying in interface ISimpleMediaPlayerpublic void pause()
ISimpleMediaPlayerpause in interface ISimpleMediaPlayerpublic void play()
ISimpleMediaPlayerplay in interface ISimpleMediaPlayerpublic void setActionOnVideoEndListener(IActionOnVideoEndListener actionOnVideoEndListener)
ISimpleMediaPlayersetActionOnVideoEndListener in interface ISimpleMediaPlayeractionOnVideoEndListener - the new action on video end listenerpublic void setLocalResource(java.io.File file,
boolean autostart)
ISimpleMediaPlayersetLocalResource in interface ISimpleMediaPlayerfile - the fileautostart - the autostartpublic void setLocalResource(java.lang.String localPath,
boolean autostart)
ISimpleMediaPlayersetLocalResource in interface ISimpleMediaPlayerlocalPath - the local pathautostart - the autostartpublic void setPosition(float pos)
ISimpleMediaPlayersetPosition in interface ISimpleMediaPlayerpos - the new positionpublic void setRemoteResource(java.lang.String remotePath,
boolean autostart)
ISimpleMediaPlayersetRemoteResource in interface ISimpleMediaPlayerremotePath - the remote pathautostart - the autostartpublic void setRepeat(boolean repeat)
ISimpleMediaPlayersetRepeat in interface ISimpleMediaPlayerrepeat - the new repeatpublic void setSize(float width,
float height)
ISimpleMediaPlayersetSize in interface ISimpleMediaPlayerwidth - the widthheight - the heightpublic void setVisible(boolean isVisible)
IItemsetVisible in interface IItemsetVisible in class JMEItemisVisible - the new visiblepublic void stop()
public void unpause()
ISimpleMediaPlayerunpause in interface ISimpleMediaPlayer