Class WebVtt
java.lang.Object
org.wicketstuff.html5.media.webvtt.WebVtt
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/
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a cuevoidAdds a regioncreate()Creates the WebVTT documentGets the description shown beside WEBVTT
Note: A " - " is prefixed to the description and all \n's are replaced with " "getNote()Gets the document notevoidremoveCue(int index) Removes a cue based on its indexvoidRemoves a cuevoidremoveRegion(int index) Removes a region based on the given indexvoidremoveRegion(VttRegion vttRegion) Removes a regionsetDescription(String description) Gets the description shown beside WEBVTT
Note: A " - " is prefixed to the description and all \n's are replaced with " "Sets the document note
-
Constructor Details
-
WebVtt
public WebVtt()
-
-
Method Details
-
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
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
Gets the document note- Returns:
- the document note
-
setNote
Sets the document note- Parameters:
note- the note to be shown in the document- Returns:
- the vtt to perform further operations
-
addCue
Adds a cue- Parameters:
vttCue- the cue to be added
-
removeCue
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
Adds a region- Parameters:
vttRegion- the region to be added
-
removeRegion
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
Creates the WebVTT document- Returns:
- the WebVTT document as string
-