Class StatusApi

java.lang.Object
uk.co.caprica.vlcj.player.base.StatusApi

public final class StatusApi extends Object
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 Type
    Method
    Description
    boolean
    Can the current media be paused?
    boolean
    Is the current media playable?
    boolean
    Is the media player playing?
    boolean
    Is the current media seekable?
    long
    Get the length of the current media item.
    float
    Get the current play-back position.
    boolean
    Is the current program scrambled?
    float
    Get the current video play rate.
    Get the media player current state.
    long
    Get the current play-back time.
    int
    Get the number of video outputs for the media player.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • isPlayable

      public boolean isPlayable()
      Is the current media playable?
      Returns:
      true if the current media is playable, otherwise false
    • isPlaying

      public boolean isPlaying()
      Is the media player playing?
      Returns:
      true if the media player is playing, otherwise false
    • isSeekable

      public boolean isSeekable()
      Is the current media seekable?
      Returns:
      true if the current media is seekable, otherwise false
    • canPause

      public boolean canPause()
      Can the current media be paused?
      Returns:
      true if the current media can be paused, otherwise false
    • programScrambled

      public boolean programScrambled()
      Is the current program scrambled?
      Returns:
      true if the current program is scrambled, otherwise false
    • 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

      public State state()
      Get the media player current state.

      It is recommended to listen to events instead of using this.

      Returns:
      state current media player state