Class: shaka.text.Cue

Constructor

(export) new Cue(startTime, endTime, payload)

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

Members

(export, static) direction :string

Type:
  • string
Properties:
Name Value Type Description
HORIZONTAL_LEFT_TO_RIGHT ltr string
HORIZONTAL_RIGHT_TO_LEFT rtl string
Source:

(export, static) displayAlign :string

Vertical alignments of the cues within their extents. 'BEFORE' means displaying at the top of the captions container box, 'CENTER' means in the middle, 'BOTTOM' means at the bottom.
Type:
  • string
Properties:
Name Value Type Description
BEFORE before string
CENTER center string
AFTER after string
Source:

(export, static) fontStyle :string

Type:
  • string
Properties:
Name Value Type Description
NORMAL normal string
ITALIC italic string
OBLIQUE oblique string
Source:

(export, 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
Source:

(export, static) lineAlign :string

Type:
  • string
Properties:
Name Value Type Description
CENTER center string
START start string
END end string
Source:

(export, static) lineInterpretation :number

Type:
  • number
Properties:
Name Value Type Description
LINE_NUMBER 0 number
PERCENTAGE 1 number
Source:

(export, static) positionAlign :string

Type:
  • string
Properties:
Name Value Type Description
LEFT line-left string
RIGHT line-right string
CENTER center string
AUTO auto string
Source:

(export, static) textAlign :string

Type:
  • string
Properties:
Name Value Type Description
LEFT left string
RIGHT right string
CENTER center string
START start string
END end string
Source:

(export, static) textDecoration :string

Type:
  • string
Properties:
Name Value Type Description
UNDERLINE underline string
LINE_THROUGH lineThrough string
OVERLINE overline string
Source:

(export, static) writingMode :string

Type:
  • string
Properties:
Name Value Type Description
HORIZONTAL_TOP_TO_BOTTOM horizontal-tb string
VERTICAL_LEFT_TO_RIGHT vertical-lr string
VERTICAL_RIGHT_TO_LEFT vertical-rl string
Source:

(export, non-null) backgroundColor :string

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

(export, non-null) color :string

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

(export) direction :shaka.text.Cue.direction

Text direction of the cue.
Type:
Implements:
Source:

(export) displayAlign :shaka.text.Cue.displayAlign

Set the captions at the bottom of the text container by default.
Type:
Implements:
Source:

(export) endTime :number

The end time of the cue in seconds, relative to the start of the presentation.
Type:
  • number
Implements:
Source:

(export, non-null) fontFamily :string

Text font family.
Type:
  • string
Implements:
Source:

(export) fontSize :string

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

(export) fontStyle :shaka.text.Cue.fontStyle

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

(export) fontWeight :shaka.text.Cue.fontWeight

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

(export, non-null) id :string

Id of the cue.
Type:
  • string
Implements:
Source:

(export, nullable) line :number

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

(export) lineAlign :shaka.text.Cue.lineAlign

Line Alignment is set to start by default.
Type:
Implements:
Source:

(export) lineHeight :string

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

(export) lineInterpretation :shaka.text.Cue.lineInterpretation

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

(export, non-null) payload :string

The text payload of the cue.
Type:
  • string
Implements:
Source:

(export, nullable) position :number

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

(export) positionAlign :shaka.text.Cue.positionAlign

Position alignment of the cue.
Type:
Implements:
Source:

(export) region :shaka.extern.CueRegion

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

(export) size :number

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

(export) startTime :number

The start time of the cue in seconds, relative to the start of the presentation.
Type:
  • number
Implements:
Source:

(export) textAlign :shaka.text.Cue.textAlign

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

(export, non-null) textDecoration :Array.<!shaka.text.Cue.textDecoration>

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

(export) wrapLine :boolean

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

(export) writingMode :shaka.text.Cue.writingMode

Text writing mode of the cue.
Type:
Implements:
Source: