java.lang.Object
uk.co.caprica.vlcj.player.base.StatusApi
Behaviour pertaining to the status of the media player.
It is recommended instead to rely on events to track the media player status.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanPause()Can the current media be paused?booleanIs the current media playable?booleanIs the media player playing?booleanIs the current media seekable?longlength()Get the length of the current media item.floatposition()Get the current play-back position.booleanIs the current program scrambled?floatrate()Get the current video play rate.state()Get the media player current state.longtime()Get the current play-back time.intGet the number of video outputs for the media player.
-
Method Details
-
isPlayable
public boolean isPlayable()Is the current media playable?- Returns:
trueif the current media is playable, otherwisefalse
-
isPlaying
public boolean isPlaying()Is the media player playing?- Returns:
trueif the media player is playing, otherwisefalse
-
isSeekable
public boolean isSeekable()Is the current media seekable?- Returns:
trueif the current media is seekable, otherwisefalse
-
canPause
public boolean canPause()Can the current media be paused?- Returns:
trueif the current media can be paused, otherwisefalse
-
programScrambled
public boolean programScrambled()Is the current program scrambled?- Returns:
trueif the current program is scrambled, otherwisefalse
-
length
public long length()Get the length of the current media item.- Returns:
- length, in milliseconds
-
time
public long time()Get the current play-back time.- Returns:
- current time, expressed as a number of milliseconds
-
position
public float position()Get the current play-back position.- Returns:
- current position, expressed as a percentage (e.g. 0.15 is returned for 15% complete)
-
rate
public float rate()Get the current video play rate.- Returns:
- rate, where 1.0 is normal speed, 0.5 is half speed, 2.0 is double speed and so on
-
videoOutputs
public int videoOutputs()Get the number of video outputs for the media player.- Returns:
- number of video outputs, may be zero
-
state
Get the media player current state.It is recommended to listen to events instead of using this.
- Returns:
- state current media player state
-