Extends
Members
# (static) DEFAULT_STREAM_INDEX :Number
The default stream index for 'subtitle'.
Type:
- Number
- Source:
# (static) STREAM_TYPE :String
The name of the stream type for this subtitle track.
Type:
- String
- Source:
# duration :Number
The duration in seconds of the track's source stream.
Type:
- Number
- Inherited From:
- Source:
# isPrimary :Boolean
This property will be `true` if the track is the primary
track in the source container.
Type:
- Boolean
- Inherited From:
- Source:
# language :String
The language code for the track's source.
Type:
- String
- Inherited From:
- Source:
# streamIndex :Number
The stream index for this track.
Type:
- Number
- Inherited From:
- Source:
# (nullable) tags :Object
An object of known tags found in the track's source
container format and stream.
Type:
- Object
- Inherited From:
- Source:
# type :String
The track's source media type represented as a string (audio, video,
subtitle, etc).
The static class property `STREAM_TYPE` on the instance's class constructor
is used to determine the track type falling back to the class name,
lower cased, with the string `/track/i` removed.
Type:
- String
- Inherited From:
- Source:
Methods
# (protected) _close(callback)
Implements the abstract `_close()` method for `nanoresource`
Closes the resets internal state.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function |
- Inherited From:
- Source:
# (protected) _open(callback)
Implements the abstract `_open()` method for `nanoresource`
Opens the internal source stream, probes for stream information,
and initializes track state based on the stream index.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function |
- Inherited From:
- Source:
# (abstract, protected) _validate(callback)
Default abstract method implementation for `_validate()`
that does nothing but call `callback` on the next tick.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function |
- Inherited From:
- Source:
# ready(callback)
Wait for track and track source to be ready (opened) calling
`callback()` when it is.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function |
- Inherited From:
- Source:
# validate(callback)
Validates the track state properties calling `_validate(callback)`
for extending validation. Successful validation should not throw
an error.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function |
- Inherited From:
- Source: