|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.lwuit.Component
com.sun.lwuit.PeerComponent
com.sun.lwuit.VideoComponent
public abstract class VideoComponent
Allows embedding a video into a LWUIT component, video creation/management is very platform specific and this component tries to abstract that logic as much as possible while maintaining portability.
Notice that unlike the previous implementation these implementations completely hide the underlying MMAPI (or other) interface. To access it directly you can extract the Player/VideoControl instance (if applicable in this implementation) by invoking getClientProperty("Player")/getClientProperty("VideoController"). This behavior is implementation specific and we encorage implementations to expose such features via the client property facility.
Field Summary |
---|
Fields inherited from class com.sun.lwuit.Component |
---|
BOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, LEFT, RIGHT, TOP |
Constructor Summary | |
---|---|
protected |
VideoComponent(java.lang.Object nativePeer)
This constructor is used internally by the LWUIT implementation class |
Method Summary | |
---|---|
static VideoComponent |
create(java.lang.Object videoInfo,
java.lang.String type)
Creates a new instance of the video component |
abstract int |
getMediaTimeSeconds()
Return the duration of the media |
abstract boolean |
isFullScreen()
Indicates the fullscreen mode |
abstract void |
setFullScreen(boolean fullscreen)
Toggles the fullscreen mode |
abstract void |
setLoopCount(int count)
Set the number of times the media should loop |
abstract int |
setMediaTimeSeconds(int now)
"Jump" to a point in time within the media |
protected void |
setNativePeer(java.lang.Object nativePeer)
Some devices might not allow extracting the native peer before the first initialization |
abstract void |
start()
Start media playback implicitly setting the component to visible |
abstract void |
stop()
Stope media playback |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected VideoComponent(java.lang.Object nativePeer)
nativePeer
- the native peerMethod Detail |
---|
protected void setNativePeer(java.lang.Object nativePeer)
nativePeer
- the native peerpublic static VideoComponent create(java.lang.Object videoInfo, java.lang.String type) throws java.io.IOException
videoInfo
- a platform specific video source identifier, a string with a video URL
is most common although some platforms might support an input stream or some other informationtype
- the video type if required by the native platform
java.io.IOException
public abstract void start()
public abstract void stop()
public abstract void setLoopCount(int count)
count
- the number of times the media should looppublic abstract int getMediaTimeSeconds()
public abstract int setMediaTimeSeconds(int now)
now
- the point in time to "Jump" to
public abstract void setFullScreen(boolean fullscreen)
fullscreen
- true for fullscreen modepublic abstract boolean isFullScreen()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |