Class: shaka.text.Cue

Constructor

new Cue(startTime, endTime, payloadnon-null)

Creates a Cue object.
Parameters:
Name Type Description
startTime number
endTime number
payload string
Implements:
Source:

Members

(static) displayAlign :string

Vertical alignments of the cues within their extents.
Type:
  • string
Properties:
Name Value Type Description
BEFORE before string
CENTER center string
AFTER after string
Implements:
Source:

(static) fontStyle :string

Text font style. Normal, italic or oblique.
Type:
  • string
Properties:
Name Value Type Description
NORMAL normal string
ITALIC italic string
OBLIQUE oblique string
Implements:
Source:

(static) fontWeight :number

In CSS font weight can be a number, where 400 is normal and 700 is bold. Use these values for the enum for consistency.
Type:
  • number
Properties:
Name Value Type Description
NORMAL 400 number
BOLD 700 number
Implements:
Source:

(static) lineAlign :string

Line alignment of the cue box.
Type:
  • string
Properties:
Name Value Type Description
CENTER center string
START start string
END end string
Implements:
Source:

(static) lineInterpretation :number

The way to interpret line field. (Either as an integer line number or percentage from the display box).
Type:
  • number
Properties:
Name Value Type Description
LINE_NUMBER 0 number
PERCENTAGE 1 number
Implements:
Source:

(static) positionAlign :string

Position alignment of the cue.
Type:
  • string
Properties:
Name Value Type Description
LEFT line-left string
RIGHT line-right string
CENTER center string
AUTO auto string
Implements:
Source:

(static) textAlign :string

Alignment of the text inside the cue box.
Type:
  • string
Properties:
Name Value Type Description
LEFT left string
RIGHT right string
CENTER center string
START start string
END end string
Implements:
Source:

(static) textDecoration :string

Text decoration. A combination of underline, overline and line through. Empty array means no decoration.
Type:
  • string
Properties:
Name Value Type Description
UNDERLINE underline string
LINE_THROUGH lineThrough string
OVERLINE overline string
Implements:
Source:

(static) writingDirection :number

Text writing direction of the cue.
Type:
  • number
Properties:
Name Value Type Description
HORIZONTAL_LEFT_TO_RIGHT 0 number
HORIZONTAL_RIGHT_TO_LEFT 1 number
VERTICAL_LEFT_TO_RIGHT 2 number
VERTICAL_RIGHT_TO_LEFT 3 number
Implements:
Source:

backgroundColor

Text background color represented by any string that would be accepted in CSS. E. g. '#FFFFFF' or 'white'.
Implements:
Source:

color

Text color represented by any string that would be accepted in CSS. E. g. '#FFFFFF' or 'white'.
Implements:
Source:

displayAlign

Vertical alignments of the cues within their extents.
Implements:
Source:

endTime

The end time of the cue in seconds and fractions of a second.
Implements:
Source:

fontFamily

Text font family.
Implements:
Source:

fontSize

Text font size in px or em (e.g. '100px'/'100em').
Implements:
Source:

fontStyle

Text font style. Normal, italic or oblique.
Implements:
Source:

fontWeight

Text font weight. Either normal or bold.
Implements:
Source:

id

Id of the cue.
Implements:
Source:

line

The offset from the display box in either number of lines or percentage depending on the value of lineInterpretation.
Implements:
Source:

lineAlign

Line alignment of the cue box.
Implements:
Source:

lineHeight

Separation between line areas inside the cue box in px or em (e.g. '100px'/'100em'). If not specified, should be no less than the largest font size applied to the text in the cue.
Implements:
Source:

lineInterpretation

The way to interpret line field. (Either as an integer line number or percentage from the display box).
Implements:
Source:

payload

The text payload of the cue.
Implements:
Source:

position

The indent (in percent) of the cue box in the direction defined by the writing direction.
Implements:
Source:

positionAlign

Position alignment of the cue.
Implements:
Source:

region

The region to render the cue into.
Implements:
Source:

size

Size of the cue box (in percents).
Implements:
Source:

startTime

The start time of the cue in seconds and fractions of a second.
Implements:
Source:

textAlign

Alignment of the text inside the cue box.
Implements:
Source:

textDecoration

Text decoration. A combination of underline, overline and line through. Empty array means no decoration.
Implements:
Source:

wrapLine

Whether or not line wrapping should be applied to the cue.
Implements:
Source:

writingDirection

Text writing direction of the cue.
Implements:
Source: