Global

Members

# (constant) codes :Object

A mapping of ISO-639 (1, 2, 3) codes to names
Type:
  • Object

# (constant) DEFAULT_STREAM_INDEX

The default stream index of 'audio' streams.

# (constant) DEFAULT_STREAM_INDEX

The default stream index of 'subtitle' streams.

# (constant) DEFAULT_STREAM_INDEX

The default stream index of 'video' streams.

# (constant) SPECIAL_NO_LINGUISTIC_CONTENT :String

The 'zxx' special language code is intended for usage when language is not present at all such as the sound of an animal.
Type:
  • String

# (constant) SPECIAL_NO_MULTIPLE_LANGUAGES :String

The 'mul' special language code is intended for usage when multiple languages are present and a single language code is required.
Type:
  • String

# (constant) SPECIAL_UNCODED_LANGUAGES :String

The 'mis' special language code is intended for "miscellaneous" languages that are not yet identified in any ISO standard.
Type:
  • String

# (constant) SPECIAL_UNDETERMINED_LANGUAGE :String

The 'und' special language code is intended for cases where the language in the data has not yet been identified.
Type:
  • String

# (constant) STREAM_TYPE

The stream type (codec_type) for an `AudioTrack` track.

# (constant) STREAM_TYPE

The stream type (codec_type) for an `SubtitleTrack` track.

# (constant) STREAM_TYPE

The stream type (codec_type) for an `VideoTrack` track.

Methods

# lookup(filter, optsnullable) → {Array.<Object>}

Performs a look up for a set of ISO 639 Part 1, 2, & 3 codes. Results may include "scopes" and "types" as well including the language code and the human readable name. Callers can "filter" results by supplying a string that is compared to the code of each language code item, a regular expression that tests the name of a language code, or a `filter` object to filter on properties like `topic` and `type` in similar ways. Example: // the following will find entries with 'en' language code lookup('en') // [ { scope: null, code: 'en', name: 'English', type: null } ] // the following will find entries with name 'English' lookup('English') // [ { scope: 'individual', code: 'eng', name: 'English', type: 'living' }, ... ] // the following will find entries that contain the word 'English' lookup('*English*') // <24 entries> // the following will find entries that contain the word 'english' (case insensitive) lookup('*english*', true) // 24 entries
Parameters:
Name Type Attributes Description
filter Object | String
opts Object | Boolean <nullable>
Properties
Name Type Attributes Description
code Object | Boolean <nullable>
name Object | Boolean <nullable>
type Object | Boolean <nullable>
scope Object | Boolean <nullable>
insensitive Boolean <nullable>
Returns:
Type
Array.<Object>