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.
|
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
|
int |
start()
Start playing a file that has been opened with
open(java.lang.String) . |
int getCurrentPosition()
int getDuration()
Player.State getState()
void close()
int open(java.lang.String filename)
filename
- The path to the file to openint pause()
int seek(int timeMs)
timeMs
- The time we want to go to in the file (in milliseconds).int start()
open(java.lang.String)
.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()