Class ChapterApi

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

public final class ChapterApi extends Object
Behaviour pertaining to chapters (e.g. for DVD or Bluray).
  • Method Details

    • count

      public int count()
      Get the chapter count.
      Returns:
      number of chapters, or -1 if no chapters
    • chapter

      public int chapter()
      Get the current chapter.
      Returns:
      chapter number, where zero is the first chatper, or -1 if no media
    • setChapter

      public void setChapter(int chapterNumber)
      Set the chapter.
      Parameters:
      chapterNumber - chapter number, where zero is the first chapter
    • next

      public void next()
      Jump to the next chapter.

      If the play-back is already at the last chapter, this will have no effect.

    • previous

      public void previous()
      Jump to the previous chapter.

      If the play-back is already at the first chapter, this will have no effect.

    • descriptions

      public List<ChapterDescription> descriptions(int title)
      Get the chapter descriptions for a title.

      The media must be playing before this information is available.

      Parameters:
      title - title number
      Returns:
      list of descriptions (which may be empty), or null if there is no such title
    • descriptions

      public List<ChapterDescription> descriptions()
      Get the chapter descriptions for the current title.

      The media must be playing before this information is available.

      Returns:
      collection of chapter descriptions, may be empty (but not null)
    • allDescriptions

      public List<List<ChapterDescription>> allDescriptions()
      Get all of the chapter descriptions for all available titles.

      The media must be playing before this information is available.

      Returns:
      a collection of chapter description lists, one list for each title (may be empty, but never null)