|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.upm.dit.multimedia.piplayer.vlc4osgi.VLCPlayer
public class VLCPlayer
Implements COBRAPlayer for JVLC
| Constructor Summary | |
|---|---|
VLCPlayer(java.lang.String URL,
java.lang.String[] args)
Creates a player instance from a given url and arguments |
|
| Method Summary | |
|---|---|
void |
fullScreen()
Toggles the full screen function of the player. |
long |
getLength()
|
float |
getPosition()
|
long |
getTime()
|
java.lang.Object |
getUIComponent()
The visual component needs to be downcasted to specific GUI library. |
int |
getVolume()
|
boolean |
hasVisualComponent()
|
boolean |
isPlaying()
|
void |
mute()
Toggles the mute function of the player |
void |
pause()
Pauses the player |
void |
setPosition(float position)
Sets the current position in the media between 0 and 1 (%) |
void |
setTime(long time)
Sets the current time in the media in milliseconds |
void |
setVolume(int volume)
Sets the current volume in a scale between 0 and 100 |
void |
start()
Starts the player |
void |
stop()
Stops the player |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VLCPlayer(java.lang.String URL,
java.lang.String[] args)
URL - the url that points to the media fileargs - the arguments to be passed to the player| Method Detail |
|---|
public java.lang.Object getUIComponent()
throws VLCException
COBRAPlayer
getUIComponent in interface COBRAPlayerCanvas visual component if exists.
java.lang.Exception - if there is no available visual component
VLCExceptionpublic boolean hasVisualComponent()
hasVisualComponent in interface COBRAPlayer
public void pause()
throws VLCException
Pauses the player
pause in interface COBRAPlayerVLCException
public void start()
throws VLCException
Starts the player
start in interface COBRAPlayerVLCException
public void stop()
throws VLCException
Stops the player
stop in interface COBRAPlayerVLCException
public void fullScreen()
throws VLCException
fullScreen in interface COBRAPlayerVLCException
public long getLength()
throws VLCException
getLength in interface COBRAPlayerVLCException
public float getPosition()
throws VLCException
getPosition in interface COBRAPlayerVLCException
public long getTime()
throws VLCException
getTime in interface COBRAPlayerVLCException
public void setPosition(float position)
throws VLCException
COBRAPlayer
setPosition in interface COBRAPlayerVLCException
public void setTime(long time)
throws VLCException
COBRAPlayer
setTime in interface COBRAPlayerVLCException
public int getVolume()
throws java.lang.Exception
getVolume in interface COBRAPlayerjava.lang.Exception
public void mute()
throws java.lang.Exception
COBRAPlayer
mute in interface COBRAPlayerjava.lang.Exception
public void setVolume(int volume)
throws java.lang.Exception
COBRAPlayer
setVolume in interface COBRAPlayerjava.lang.Exceptionpublic boolean isPlaying()
isPlaying in interface COBRAPlayer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||