public interface Player
Modifier and Type | Interface | Description |
---|---|---|
static class |
Player.State |
Modifier and Type | Method | Description |
---|---|---|
void |
addListener(PlayerListener listener) |
|
void |
close() |
Close the opened file.
|
java.lang.Object |
createWindowId() |
Create a window id to be used to display video if any.
|
Core |
getCore() |
Returns the
Core object managing this player's call, if any. |
int |
getCurrentPosition() |
Get the current position in the opened file.
|
int |
getDuration() |
Get the duration of the opened file.
|
boolean |
getIsVideoAvailable() |
Returns whether the file has video and if it can be displayed.
|
long |
getNativePointer() |
Gets the native pointer used by this class to make native method calls.
|
Player.State |
getState() |
Get the current state of a player.
|
java.lang.Object |
getUserData() |
Gets the object stored in this object user's data
|
float |
getVolumeGain() |
Get the volume gain of the player.
|
int |
open(java.lang.String filename) |
Open a file for playing.
|
int |
pause() |
Pause the playing of a file.
|
void |
removeListener(PlayerListener listener) |
|
int |
seek(int timeMs) |
Seek in an opened file.
|
void |
setUserData(java.lang.Object data) |
Sets the object to store in this object user's data
|
void |
setVolumeGain(float gain) |
Set the volume gain of the player.
|
void |
setWindowId(java.lang.Object windowId) |
Sets a window id to be used to display video if any.
|
int |
start() |
Start playing a file that has been opened with
open(java.lang.String) . |
java.lang.String |
toString() |
int getCurrentPosition()
int getDuration()
boolean getIsVideoAvailable()
Player.State getState()
Player.State
of the player. float getVolumeGain()
void setVolumeGain(float gain)
gain
- Percentage of the gain. Valid values are in [ 0.0 : 1.0 ]. void setWindowId(@Nullable java.lang.Object windowId)
windowId
- The window id pointer to use. void close()
@Nullable java.lang.Object createWindowId()
int open(@NonNull java.lang.String filename)
filename
- The path to the file to open int pause()
int seek(int timeMs)
timeMs
- The time we want to go to in the file (in milliseconds). int start()
void addListener(PlayerListener listener)
void removeListener(PlayerListener listener)
void setUserData(java.lang.Object data)
data
- the object to storejava.lang.Object getUserData()
long getNativePointer()
java.lang.String toString()
toString
in class java.lang.Object