Constructor
new Cue(startTime, endTime, payload)
Parameters:
| Name | Type | Description | 
|---|---|---|
startTime | 
            
            number | |
endTime | 
            
            number | |
payload | 
            
            string | 
- Implements:
 - Source:
 
Members
defaultTextBackgroundColor :string
    Default text background color according to
https://w3c.github.io/webvtt/#default-text-background
    Type:
- string
 
Properties:
| Name | Value | Type | Description | 
|---|---|---|---|
bg_white | 
            
            
                #FFF | string | |
bg_lime | 
            
            
                #0F0 | string | |
bg_cyan | 
            
            
                #0FF | string | |
bg_red | 
            
            
                #F00 | string | |
bg_yellow | 
            
            
                #FF0 | string | |
bg_magenta | 
            
            
                #F0F | string | |
bg_blue | 
            
            
                #00F | string | |
bg_black | 
            
            
                #000 | string | 
- Source:
 
defaultTextColor :string
    Default text color according to
https://w3c.github.io/webvtt/#default-text-color
    Type:
- string
 
Properties:
| Name | Value | Type | Description | 
|---|---|---|---|
white | 
            
            
                #FFF | string | |
lime | 
            
            
                #0F0 | string | |
cyan | 
            
            
                #0FF | string | |
red | 
            
            
                #F00 | string | |
yellow | 
            
            
                #FF0 | string | |
magenta | 
            
            
                #F0F | string | |
blue | 
            
            
                #00F | string | |
black | 
            
            
                #000 | string | 
- Source:
 
direction :string
Type:
- string
 
Properties:
| Name | Value | Type | Description | 
|---|---|---|---|
HORIZONTAL_LEFT_TO_RIGHT | 
            
            
                ltr | string | |
HORIZONTAL_RIGHT_TO_LEFT | 
            
            
                rtl | string | 
- Source:
 
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, 'AFTER' means at the bottom.
    Type:
- string
 
Properties:
| Name | Value | Type | Description | 
|---|---|---|---|
BEFORE | 
            
            
                before | string | |
CENTER | 
            
            
                center | string | |
AFTER | 
            
            
                after | string | 
- Source:
 
fontStyle :string
Type:
- string
 
Properties:
| Name | Value | Type | Description | 
|---|---|---|---|
NORMAL | 
            
            
                normal | string | |
ITALIC | 
            
            
                italic | string | |
OBLIQUE | 
            
            
                oblique | string | 
- Source:
 
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:
 
lineAlign :string
Type:
- string
 
Properties:
| Name | Value | Type | Description | 
|---|---|---|---|
CENTER | 
            
            
                center | string | |
START | 
            
            
                start | string | |
END | 
            
            
                end | string | 
- Source:
 
lineInterpretation :number
Type:
- number
 
Properties:
| Name | Value | Type | Description | 
|---|---|---|---|
LINE_NUMBER | 
            
            
                0 | number | |
PERCENTAGE | 
            
            
                1 | number | 
- Source:
 
positionAlign :string
Type:
- string
 
Properties:
| Name | Value | Type | Description | 
|---|---|---|---|
LEFT | 
            
            
                line-left | string | |
RIGHT | 
            
            
                line-right | string | |
CENTER | 
            
            
                center | string | |
AUTO | 
            
            
                auto | string | 
- Source:
 
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:
 
textDecoration :string
Type:
- string
 
Properties:
| Name | Value | Type | Description | 
|---|---|---|---|
UNDERLINE | 
            
            
                underline | string | |
LINE_THROUGH | 
            
            
                lineThrough | string | |
OVERLINE | 
            
            
                overline | string | 
- Source:
 
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:
 
backgroundColor
- Source:
 
backgroundImage
- Source:
 
border
- Source:
 
cellResolution
- Source:
 
color
- Source:
 
direction
- Source:
 
displayAlign
    Set the captions at the bottom of the text container by default.
- Source:
 
endTime
- Source:
 
fontFamily
- Source:
 
fontSize
- Source:
 
fontStyle
- Source:
 
fontWeight
- Source:
 
id
- Source:
 
letterSpacing
- Source:
 
line
- Source:
 
lineBreak
- Source:
 
lineHeight
- Source:
 
lineInterpretation
- Source:
 
linePadding
- Source:
 
nestedCues
- Source:
 
opacity
- Source:
 
position
- Source:
 
positionAlign
- Source:
 
region
- Source:
 
size
- Source:
 
spacer
- Source:
 
startTime
- Source:
 
textAlign
- Source:
 
textDecoration
- Source:
 
textStrokeColor
- Source:
 
textStrokeWidth
- Source:
 
wrapLine
- Source:
 
writingMode
- Source:
 
Methods
equal(cue1non-null, cue2non-null) → {boolean}
    Check if two Cues have all the same values in all properties.
    Parameters:
| Name | Type | Description | 
|---|---|---|
cue1 | 
            
            shaka.text.Cue | |
cue2 | 
            
            shaka.text.Cue | 
- Source:
 
Returns:
- Type
 - boolean
 
lineBreak(start, end) → {shaka.text.Cue}
Parameters:
| Name | Type | Description | 
|---|---|---|
start | 
            
            number | |
end | 
            
            number | 
- Source:
 
Returns:
- Type
 - shaka.text.Cue
 
clone() → {shaka.text.Cue}
    Create a copy of the cue with the same properties.
- Source:
 
Returns:
- Type
 - shaka.text.Cue