Constructor
# new Track(source, streamIndex, optsnullable)
        `Track` class constructor.
    
    
        Parameters:
        
    
    
    
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
source | 
            
            Source | ||||||||||
streamIndex | 
            
            Number | ||||||||||
opts | 
            
            Object | 
                
                
                    <nullable> | 
            
            
            
                Properties
  | 
        
- Source:
 
Extends
- nanoresource
 
Members
# (static) DEFAULT_STREAM_INDEX :Number
    Default stream index for a `Track`.
    
        Type: 
        
- Number
 
- Source:
 
# (static) STREAM_TYPE :String
    Computes the track type name for the class.
    
        Type: 
        
- String
 
- Source:
 
# duration :Number
    The duration in seconds of the track's source stream.
    
        Type: 
        
- Number
 
- Source:
 
# isPrimary :Boolean
    This property will be `true` if the track is the primary
track in the source container.
    
        Type: 
        
- Boolean
 
- Source:
 
# language :String
    The language code for the track's source.
    
        Type: 
        
- String
 
- Source:
 
# streamIndex :Number
    The stream index for this track.
    
        Type: 
        
- Number
 
- Source:
 
# (nullable) tags :Object
    An object of known tags found in the track's source
container format and stream.
    
        Type: 
        
- Object
 
- 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
 
- Source:
 
Methods
# (static) from(source, optsnullable) → {Track}
        Creates a new `Track` instance from input where
input may be another track, a `Source` instance or
some input for creating a `Source` instance, such as
URI string.
    
    
        Parameters:
        
    
    
    
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
source | 
            
            Source | String | ||||||||||
opts | 
            
            Object | Number | 
                
                
                    <nullable> | 
            
            
            
                Properties
  | 
        
- Source:
 
    Returns:
        
            
        
            
    
    - Type
 - Track
 
# (protected) _close(callback)
        Implements the abstract `_close()` method for `nanoresource`
Closes the resets internal state.
    
    
        Parameters:
        
    
    
    
| Name | Type | Description | 
|---|---|---|
callback | 
            
            function | 
- 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 | 
- 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 | 
- Source:
 
# ready(callback)
        Wait for track and track source to be ready (opened) calling
`callback()` when it is.
    
    
        Parameters:
        
    
    
    
| Name | Type | Description | 
|---|---|---|
callback | 
            
            function | 
- 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 | 
- Source: