Class VttCue
java.lang.Object
org.wicketstuff.html5.media.webvtt.VttCue
A cue block containing the translations
Base on the browser cues can be styled with CSS. So you only have to include a CSS file into the HTML page the video is embedded.
Further information:
http://tiffanybbrown.com/2013/12/14/subtitles-and-captions-with-webvtt/
Base on the browser cues can be styled with CSS. So you only have to include a CSS file into the HTML page the video is embedded.
Further information:
http://tiffanybbrown.com/2013/12/14/subtitles-and-captions-with-webvtt/
- Author:
- Tobias Soloschenko
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the alignment of the textgetCueId()Gets the cue idgetLine()Gets the position the text will appear verticallygetNote()Gets the note of the cueGets the position of the textGets the region applied to the cueGets the representation as buildergetSize()Gets the size (width of the text area)Gets the start timeGets the stop timegetText()Gets the text contentGets the vertical behaviorGets the voice span applied to the cuesetAlignment(VttCue.Alignment alignment) Sets the alignment of the textSets the position the text will appear vertically (number, percentage e.g. 20% or 10)Sets the note of the cuesetPosition(String position) Sets the position the text will appear horizontally (percentage e.g. 20%)Sets the region applied to the cueSets the size (width of the text area)setVertical(VttCue.Vertical vertical) Sets the text to be displayed vertically rather than horizontally, such as in some Asian languagessetVoiceSpan(String voiceSpan) Sets a voice span applied to the cue
-
Constructor Details
-
VttCue
Creates a cue with the required arguments- Parameters:
cueId- the id of the cuestartTime- the start time of the cuestopTime- the end time of the cuetext- the text of the cue
-
-
Method Details
-
getLine
Gets the position the text will appear vertically- Returns:
- the position the text will appear vertically
-
setLine
Sets the position the text will appear vertically (number, percentage e.g. 20% or 10)- Parameters:
line- the position the text will appear vertically- Returns:
- the cue to perform further operations
-
getPosition
Gets the position of the text- Returns:
- the position of the text
-
setPosition
Sets the position the text will appear horizontally (percentage e.g. 20%)- Parameters:
position- the position of the text- Returns:
- the cue to perform further operations
-
getSize
Gets the size (width of the text area)- Returns:
- the size (width of the text area)
-
setSize
Sets the size (width of the text area)- Parameters:
size- the size of the text area (percentage e.g. 40%)- Returns:
- the cue to perform further operations
-
getAlignment
Gets the alignment of the text- Returns:
- the alignment of the text
-
setAlignment
Sets the alignment of the text- Parameters:
alignment- the alignment of the text- Returns:
- the cue to perform further operations
-
getVertical
Gets the vertical behavior- Returns:
- the vertical behavior
-
setVertical
Sets the text to be displayed vertically rather than horizontally, such as in some Asian languages- Parameters:
vertical- the vertical behavior- Returns:
- the cue to perform further operations
-
getVoiceSpan
Gets the voice span applied to the cue- Returns:
- the voice span applied to the cue
-
setVoiceSpan
Sets a voice span applied to the cue- Parameters:
voiceSpan- the voice span applied to the cue- Returns:
- the cue to perform further operations
-
getRegion
Gets the region applied to the cue- Returns:
- the region applied to the cue
-
setRegion
Sets the region applied to the cue- Parameters:
vttRegion- the region applied to the cue- Returns:
- the cue to perform further operations
-
getNote
Gets the note of the cue- Returns:
- the note of the cue
-
setNote
Sets the note of the cue- Parameters:
note- the note to be set to the cue- Returns:
- the cue to perform further operations
-
getCueId
Gets the cue id- Returns:
- the cue id
-
getStartTime
Gets the start time- Returns:
- the start time
-
getStopTime
Gets the stop time- Returns:
- the stop time
-
getText
Gets the text content- Returns:
- the content as String
-
getRepresentation
Gets the representation as builder- Returns:
- thre representation as builder
-