Class WebVtt

java.lang.Object
org.wicketstuff.html5.media.webvtt.WebVtt

public class WebVtt extends Object
A WebVTT document

Further information:
https://developer.mozilla.org/en-US/docs/Web/API/Web_Video_Text_Tracks_Format#Cue_Settings
http://dev.w3.org/html5/webvtt/
http://www.jwplayer.com/html5/webvtt/
Author:
Tobias Soloschenko
  • Constructor Details

    • WebVtt

      public WebVtt()
  • Method Details

    • getDescription

      public String getDescription()
      Gets the description shown beside WEBVTT

      Note: A " - " is prefixed to the description and all \n's are replaced with " "
      Returns:
      the description the description
    • setDescription

      public WebVtt setDescription(String description)
      Gets the description shown beside WEBVTT

      Note: A " - " is prefixed to the description and all \n's are replaced with " "
      Parameters:
      description - the description to be shown
      Returns:
      the vtt to perform further operations
    • getNote

      public String getNote()
      Gets the document note
      Returns:
      the document note
    • setNote

      public WebVtt setNote(String note)
      Sets the document note
      Parameters:
      note - the note to be shown in the document
      Returns:
      the vtt to perform further operations
    • addCue

      public void addCue(VttCue vttCue)
      Adds a cue
      Parameters:
      vttCue - the cue to be added
    • removeCue

      public void removeCue(VttCue vttCue)
      Removes a cue
      Parameters:
      vttCue - the cue to be removed
    • removeCue

      public void removeCue(int index)
      Removes a cue based on its index
      Parameters:
      index - the index of the cue to be removed
    • addRegion

      public void addRegion(VttRegion vttRegion)
      Adds a region
      Parameters:
      vttRegion - the region to be added
    • removeRegion

      public void removeRegion(VttRegion vttRegion)
      Removes a region
      Parameters:
      vttRegion - the region to be removed
    • removeRegion

      public void removeRegion(int index)
      Removes a region based on the given index
      Parameters:
      index - the index of the region to be removed
    • create

      public String create()
      Creates the WebVTT document
      Returns:
      the WebVTT document as string