|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 |
createVideoPeer(java.io.InputStream stream,
java.lang.String mimeType)
Create a video component |
static VideoComponent |
createVideoPeer(java.lang.String url)
Create a video component |
abstract int |
getMediaDuration()
Returns the duration in milliseconds |
abstract int |
getMediaTimeMS()
Return the duration of the media in milliseconds |
int |
getMediaTimeSeconds()
Return the duration of the media |
boolean |
hasNativeFullscreenPlayer()
Some platforms might allow invoking the native video player for this file type |
abstract boolean |
isFullScreen()
Indicates the fullscreen mode |
abstract boolean |
isPlaying()
Indicates if the media is currently in the playing state |
void |
playInNativePlayer()
This method will only work if hasNativeFullscreenPlayer returns true |
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 |
setMediaTimeMS(int now)
"Jump" to a point in time within the media in milliseconds |
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()
Stop media playback |
Methods inherited from class java.lang.Object |
---|
equals, 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 createVideoPeer(java.lang.String url) throws java.io.IOException
url
- the platform specific location for the sound
java.io.IOException
- if the allocation failspublic static VideoComponent createVideoPeer(java.io.InputStream stream, java.lang.String mimeType) throws java.io.IOException
stream
- the stream containing the media datamimeType
- the type of the data in the stream
java.io.IOException
- if the allocation failspublic abstract void start()
public abstract void stop()
public abstract void setLoopCount(int count)
count
- the number of times the media should looppublic int getMediaTimeSeconds()
public int setMediaTimeSeconds(int now)
now
- the point in time to "Jump" to
public abstract int getMediaTimeMS()
public abstract int setMediaTimeMS(int now)
now
- the point in time to "Jump" to
public abstract int getMediaDuration()
public abstract boolean isPlaying()
public abstract void setFullScreen(boolean fullscreen)
fullscreen
- true for fullscreen modepublic abstract boolean isFullScreen()
public boolean hasNativeFullscreenPlayer()
public void playInNativePlayer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |