public abstract class WCMediaPlayer extends Ref
Modifier and Type | Field and Description |
---|---|
protected static Logger |
log |
protected static int |
NETWORK_STATE_DECODE_ERROR |
protected static int |
NETWORK_STATE_EMPTY |
protected static int |
NETWORK_STATE_FORMAT_ERROR |
protected static int |
NETWORK_STATE_IDLE |
protected static int |
NETWORK_STATE_LOADED |
protected static int |
NETWORK_STATE_LOADING |
protected static int |
NETWORK_STATE_NETWORK_ERROR |
protected static int |
PRELOAD_AUTO |
protected static int |
PRELOAD_METADATA |
protected static int |
PRELOAD_NONE |
protected static int |
READY_STATE_HAVE_CURRENT_DATA |
protected static int |
READY_STATE_HAVE_ENOUGH_DATA |
protected static int |
READY_STATE_HAVE_FUTURE_DATA |
protected static int |
READY_STATE_HAVE_METADATA |
protected static int |
READY_STATE_HAVE_NOTHING |
protected static boolean |
verbose |
Modifier | Constructor and Description |
---|---|
protected |
WCMediaPlayer() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
cancelLoad() |
protected abstract void |
disposePlayer() |
protected abstract float |
getCurrentTime() |
protected int |
getNetworkState() |
protected int |
getPreload() |
protected boolean |
getPreservesPitch()
Obtains current "preserves pitch" value.
|
protected int |
getReadyState() |
protected boolean |
isPaused() |
protected boolean |
isSeeking() |
protected abstract void |
load(String url,
String userAgent)
Methods to implement
|
protected void |
notifyBufferChanged(float[] ranges,
int bytesLoaded)
ranges array contains pairs [start,end] of the buffered times |
protected void |
notifyDurationChanged(float newDuration) |
protected void |
notifyFinished() |
protected void |
notifyNetworkStateChanged(int networkState) |
protected void |
notifyNewFrame() |
protected void |
notifyPaused(boolean paused) |
protected void |
notifyReady(boolean hasVideo,
boolean hasAudio,
float duration)
got metadata
|
protected void |
notifyReadyStateChanged(int readyState) |
protected void |
notifySeeking(boolean seeking,
int readyState) |
protected void |
notifySizeChanged(int width,
int height) |
protected abstract void |
pause() |
protected abstract void |
play() |
protected abstract void |
prepareToPlay() |
protected abstract void |
renderCurrentFrame(WCGraphicsContext gc,
int x,
int y,
int w,
int h) |
protected abstract void |
seek(float time) |
protected abstract void |
setMute(boolean mute) |
protected abstract void |
setPreservesPitch(boolean preserve) |
protected abstract void |
setRate(float rate) |
protected abstract void |
setSize(int w,
int h) |
protected abstract void |
setVolume(float volume) |
protected static final Logger log
protected static final boolean verbose
protected static final int NETWORK_STATE_EMPTY
protected static final int NETWORK_STATE_IDLE
protected static final int NETWORK_STATE_LOADING
protected static final int NETWORK_STATE_LOADED
protected static final int NETWORK_STATE_FORMAT_ERROR
protected static final int NETWORK_STATE_NETWORK_ERROR
protected static final int NETWORK_STATE_DECODE_ERROR
protected static final int READY_STATE_HAVE_NOTHING
protected static final int READY_STATE_HAVE_METADATA
protected static final int READY_STATE_HAVE_CURRENT_DATA
protected static final int READY_STATE_HAVE_FUTURE_DATA
protected static final int READY_STATE_HAVE_ENOUGH_DATA
protected static final int PRELOAD_NONE
protected static final int PRELOAD_METADATA
protected static final int PRELOAD_AUTO
protected abstract void cancelLoad()
protected abstract void disposePlayer()
protected abstract void prepareToPlay()
protected abstract void play()
protected abstract void pause()
protected abstract float getCurrentTime()
protected abstract void seek(float time)
protected abstract void setRate(float rate)
protected abstract void setVolume(float volume)
protected abstract void setMute(boolean mute)
protected abstract void setSize(int w, int h)
protected abstract void setPreservesPitch(boolean preserve)
protected abstract void renderCurrentFrame(WCGraphicsContext gc, int x, int y, int w, int h)
protected boolean getPreservesPitch()
protected int getNetworkState()
protected int getReadyState()
protected int getPreload()
protected boolean isPaused()
protected boolean isSeeking()
protected void notifyNetworkStateChanged(int networkState)
protected void notifyReadyStateChanged(int readyState)
protected void notifyPaused(boolean paused)
protected void notifySeeking(boolean seeking, int readyState)
protected void notifyFinished()
protected void notifyReady(boolean hasVideo, boolean hasAudio, float duration)
protected void notifyDurationChanged(float newDuration)
protected void notifySizeChanged(int width, int height)
protected void notifyNewFrame()
protected void notifyBufferChanged(float[] ranges, int bytesLoaded)
ranges
array contains pairs [start,end] of the buffered timesCopyright © 2020. All rights reserved.