public interface Player
Modifier and Type | Interface and Description |
---|---|
static class |
Player.State |
Modifier and Type | Method and Description |
---|---|
void |
addListener(PlayerListener listener) |
void |
close()
Close the opened file.
|
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
|
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 |
setListener(PlayerListener listener) |
void |
setUserData(java.lang.Object data)
Sets the object to store in this object user's data
|
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. void setWindowId(@Nullable java.lang.Object windowId)
windowId
- The window id pointer to use. void close()
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 setListener(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