public class MediaPlayer extends JMEContainer implements IMediaPlayer, IInitable, IItemCachable, IActionOnVideoEndListener
com.jme3.scene.Spatial.CullHint
INestable.IChildrenChangedListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CACHABLE_TYPE
The Constant CACHABLE_TYPE.
|
KEY_JMEITEMDATA
Constructor and Description |
---|
MediaPlayer(java.lang.String name,
java.util.UUID uuid)
Instantiates a new media player.
|
Modifier and Type | Method and Description |
---|---|
GalleryItemDatabaseFormat |
deconstruct(java.lang.String loc)
Deconstruct.
|
void |
destroy()
Destroy.
|
java.lang.String |
isCached()
Checks if is cached.
|
boolean |
isRepeated()
Checks if is repeated.
|
void |
onVideoEnd()
On video end.
|
void |
pause()
Pause.
|
static MediaPlayer |
reconstruct(GalleryItemDatabaseFormat galleryItem,
IStage stage,
java.lang.String loc)
Reconstruct.
|
void |
setBackgroundColour(com.jme3.math.ColorRGBA backgroundColour)
Sets the background colour.
|
void |
setBorderColour(com.jme3.math.ColorRGBA borderColour)
Sets the border colour.
|
void |
setCached(java.lang.String cached)
Sets the cached.
|
void |
setDeceleration(float deceleration)
Sets the deceleration.
|
void |
setLocalResource(java.io.File file,
boolean autostart,
boolean repeat,
IStage stage)
Sets the local resource.
|
void |
setLocalResource(java.lang.String localPath,
boolean autostart,
boolean repeat,
IStage stage)
Sets the local resource.
|
void |
setPosition(float pos)
Sets the position.
|
void |
setRemoteResource(java.lang.String remotePath,
boolean autostart,
boolean repeat,
IStage stage)
Sets the remote resource.
|
void |
setRepeated(boolean repeat)
Sets the repeated.
|
void |
setScaleLimits(float minScale,
float maxScale)
Sets the scale limits.
|
void |
setSize(float width,
float height)
Sets the size.
|
void |
setVisible(boolean isVisible)
Sets the visible.
|
getManipulableSpatial, initializeGeometry
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, toString
attachChild, 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, write
addControl, 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, worldToLocal
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addItemListener, behaviourAdded, centerItem, convertWorldVelocityToLocalVelocity, getBehaviours, getBehaviours, getItemListeners, getManipulableSpatial, getMultiTouchDispatcher, getName, getParentItem, getRelativeLocation, getRelativeLocationOfWorldLocation, getRelativeRotation, getRelativeScale, getUUID, getWorldLocation, getWorldLocation, getWorldRotationDegrees, getZOrder, getZOrderManager, isVisible, removeItemListener, setInteractionEnabled, setItemListeners, setParentItem, setRelativeLocation, setRelativeRotation, setRelativeScale, setWorldLocation, setZOrder
addItem, deRegisterChildrenChangedListener, getChildItems, getChildrenCount, hasChildren, registerChildrenChangedListener, removeAllItems, removeItem
initializeGeometry
public static final java.lang.String CACHABLE_TYPE
public MediaPlayer(java.lang.String name, java.util.UUID uuid)
name
- the nameuuid
- the uuidpublic static MediaPlayer reconstruct(GalleryItemDatabaseFormat galleryItem, IStage stage, java.lang.String loc)
galleryItem
- the gallery itemstage
- the stageloc
- the locpublic GalleryItemDatabaseFormat deconstruct(java.lang.String loc)
IItemCachable
deconstruct
in interface IItemCachable
loc
- the student idpublic void destroy()
IMediaPlayer
destroy
in interface IMediaPlayer
public java.lang.String isCached()
public boolean isRepeated()
IMediaPlayer
isRepeated
in interface IMediaPlayer
public void onVideoEnd()
IActionOnVideoEndListener
onVideoEnd
in interface IActionOnVideoEndListener
public void pause()
IMediaPlayer
pause
in interface IMediaPlayer
public void setBackgroundColour(com.jme3.math.ColorRGBA backgroundColour)
IMediaPlayer
setBackgroundColour
in interface IMediaPlayer
backgroundColour
- the new background colourpublic void setBorderColour(com.jme3.math.ColorRGBA borderColour)
IMediaPlayer
setBorderColour
in interface IMediaPlayer
borderColour
- the new border colourpublic void setCached(java.lang.String cached)
cached
- the new cachedpublic void setDeceleration(float deceleration)
IMediaPlayer
setDeceleration
in interface IMediaPlayer
deceleration
- the new decelerationpublic void setLocalResource(java.io.File file, boolean autostart, boolean repeat, IStage stage)
IMediaPlayer
setLocalResource
in interface IMediaPlayer
file
- the fileautostart
- the autostartrepeat
- the repeatstage
- the stagepublic void setLocalResource(java.lang.String localPath, boolean autostart, boolean repeat, IStage stage)
IMediaPlayer
setLocalResource
in interface IMediaPlayer
localPath
- the local pathautostart
- the autostartrepeat
- the repeatstage
- the stagepublic void setPosition(float pos)
IMediaPlayer
setPosition
in interface IMediaPlayer
pos
- the new positionpublic void setRemoteResource(java.lang.String remotePath, boolean autostart, boolean repeat, IStage stage)
IMediaPlayer
setRemoteResource
in interface IMediaPlayer
remotePath
- the remote pathautostart
- the autostartrepeat
- the repeatstage
- the stagepublic void setRepeated(boolean repeat)
IMediaPlayer
setRepeated
in interface IMediaPlayer
repeat
- the new repeatedpublic void setScaleLimits(float minScale, float maxScale)
IMediaPlayer
setScaleLimits
in interface IMediaPlayer
minScale
- the min scalemaxScale
- the max scalepublic void setSize(float width, float height)
IMediaPlayer
setSize
in interface IMediaPlayer
width
- the widthheight
- the heightpublic void setVisible(boolean isVisible)
IItem
setVisible
in interface IItem
setVisible
in class JMEItem
isVisible
- the new visible