Constructor
new SsaTextParser()
- Implements:
- Source:
Members
lineParts_ :RegExp
Type:
- RegExp
- Source:
Example
Style: DefaultVCD,...
ssaContent_ :RegExp
Type:
- RegExp
- Source:
Example
[V4 Styles]\nFormat: Name\nStyle: DefaultVCD
timeFormat_ :RegExp
Type:
- RegExp
- Source:
Example
0:00:01.1 or 0:00:01.18 or 0:00:01.180
valuesFormat_ :RegExp
Type:
- RegExp
- Source:
Example
Style: DefaultVCD,...
Methods
addStyle_(cue, style)
Adds applicable style properties to a cue.
Parameters:
Name | Type | Description |
---|---|---|
cue |
shaka.extern.Cue | |
style |
Object |
- Source:
parseSsaColor_(colorString) → {string}
Parses a SSA color .
Parameters:
Name | Type | Description |
---|---|---|
colorString |
string |
- Source:
Returns:
- Type
- string
parseTime_(string) → {number}
Parses a SSA time from the given parser.
Parameters:
Name | Type | Description |
---|---|---|
string |
string |
- Source:
Returns:
- Type
- number
parseInit(datanon-null)
Parse an initialization segment. Some formats do not have init
segments so this won't always be called.
Parameters:
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data that makes up the init segment. |
- Implements:
- Source:
parseMedia(datanon-null, timeContext) → {Array.<!shaka.extern.Cue>}
Parse a media segment and return the cues that make up the segment.
Parameters:
Name | Type | Description |
---|---|---|
data |
Uint8Array | The next section of buffer. |
timeContext |
shaka.extern.TextParser.TimeContext | The time information that should be used to adjust the times values for each cue. |
- Implements:
- Source:
Returns:
- Type
- Array.<!shaka.extern.Cue>
setSequenceMode(sequenceMode)
Notifies the stream if the manifest is in sequence mode or not.
Parameters:
Name | Type | Description |
---|---|---|
sequenceMode |
boolean |
- Implements:
- Source: