Global

Members


activeCues :TextTrackCueList

The list text track cues that are currently active for this TextTrack.

Type:
Source:
tracks/text-track.js

cues :TextTrackCueList

The text track cue list for this TextTrack.

Type:
Source:
tracks/text-track.js

<readonly> default :boolean

If this track was set to be on or off by default. Cannot be changed after creation.

Type:
  • boolean
Source:
tracks/text-track.js

enabled :boolean

If this AudioTrack is enabled or not. When setting this will fire AudioTrack#enabledchange if the state of enabled is changed.

Type:
  • boolean
Source:
tracks/audio-track.js

<readonly> id :string

The id of this track. Cannot be changed after creation.

Type:
  • string
Source:
tracks/track.js

<readonly> kind :string

The kind of track that this is. Cannot be changed after creation.

Type:
  • string
Source:
tracks/track.js

<readonly> label :string

The label of this track. Cannot be changed after creation.

Type:
  • string
Source:
tracks/track.js

<readonly> language :string

The two letter language code for this track. Cannot be changed after creation.

Type:
  • string
Source:
tracks/track.js

length :number

The current number of Tracks in the this Trackist.

Type:
  • number
Source:
tracks/track-list.js

length :number

The current number of Tracks in the this Trackist.

Type:
  • number
Source:
tracks/html-track-element-list.js

length :number

The current number of TextTrackCues in the TextTrackCueList.

Type:
  • number
Source:
tracks/text-track-cue-list.js

mode :string

Set the mode of this TextTrack to a valid TextTrack~Mode. Will not be set if setting to an invalid mode.

Type:
  • string
Source:
tracks/text-track.js

<constant> NONE :HTMLTrackElement~ReadyState

Type:
  • HTMLTrackElement~ReadyState
Source:
tracks/html-track-element.js

readyState :HTMLTrackElement~ReadyState

The current ready state of the track element.

Type:
  • HTMLTrackElement~ReadyState
Source:
tracks/html-track-element.js

selected :boolean

If this VideoTrack is selected or not. When setting this will fire VideoTrack#selectedchange if the state of selected changed.

Type:
  • boolean
Source:
tracks/video-track.js

track :TextTrack

The underlying TextTrack object.

Type:
Source:
tracks/html-track-element.js

Methods


createTrackHelper(self, kind [, label] [, language] [, options])

A function used by Tech to create a new TextTrack.

Parameters:
Name Type Argument Default Description
self Tech

An instance of the Tech class.

kind string

TextTrack kind (subtitles, captions, descriptions, chapters, or metadata)

label string <optional>

Label to identify the text track

language string <optional>

Two letter language abbreviation

options Object <optional>
{}

An object with additional text track options

Source:
tech/tech.js
Returns:

The text track that was created.

Type
TextTrack

currentSrc()

Get the current source

Source:
tech/flash.js
Returns:

The current source

Type
Tech~SourceObject

emulateTextTracks()

Emulate texttracks

Source:
tech/tech.js

module:computed-style(el, prop)

A safe getComputedStyle with an IE8 fallback.

This is needed because in Firefox, if the player is loaded in an iframe with display:none, then getComputedStyle returns null, so, we do a null-check to make sure that the player doesn't break in these cases.

Parameters:
Name Type Description
el Element

The element you want the computed style of

prop string

The property name you want

Source:
utils/computed-style.js
See:

module:merge-options(sources)

Deep-merge one or more options objects, recursively merging only plain object properties.

Parameters:
Name Type Description
sources Array.<Object>

One or more objects to merge into a new object.

Source:
utils/merge-options.js
Returns:

A new object that is the merged result of all sources.

Type
Object

tryUpdateStyle(el, style, rule)

Try to update the style of a DOM element. Some style changes will throw an error, particularly in IE8. Those should be noops.

Parameters:
Name Type Description
el Element

The DOM element to be styled.

style string

The CSS property on the element that should be styled.

rule string

The style rule that should be applied to the property.

Source:
tracks/text-track-display.js

Type Definitions


TextTrackCue

Type:
  • Object
Properties:
Name Type Description
id string

The unique id for this text track cue

startTime number

The start time for this text track cue

endTime number

The end time for this text track cue

pauseOnExit boolean

Pause when the end time is reached if true.

Source:
tracks/text-track-cue-list.js
See: