VideoTrack

VideoTrack

The `VideoTrack` class represents an extended `Track` that targets a video stream in the source the track points to.

Constructor

# new VideoTrack()

Extends

Members

# (static) DEFAULT_STREAM_INDEX :Number

The default stream index for 'video'.
Type:
  • Number

# (static) STREAM_TYPE :String

The name of the stream type for this 'video' track.
Type:
  • String

# duration :Number

The duration in seconds of the track's source stream.
Type:
  • Number
Inherited From:

# isPrimary :Boolean

This property will be `true` if the track is the primary track in the source container.
Type:
  • Boolean
Inherited From:

# language :String

The language code for the track's source.
Type:
  • String
Inherited From:

# streamIndex :Number

The stream index for this track.
Type:
  • Number
Inherited From:

# (nullable) tags :Object

An object of known tags found in the track's source container format and stream.
Type:
  • Object
Inherited From:

# 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:

Methods

# (protected) _close(callback)

Implements the abstract `_close()` method for `nanoresource` Closes the resets internal state.
Parameters:
Name Type Description
callback function
Inherited From:

# (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:

# _validate(callback)

Internal validation for a video track.
Parameters:
Name Type Description
callback function
Overrides:

# 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:

# 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: