Hierarchy

  • TextTrack
    • SubtitleTrack

Properties

activeCues: TextTrackCueList

Returns the text track cues from the text track list of cues that are currently active (i.e. that start before the current playback position and end after it), as a TextTrackCueList object.

cues: TextTrackCueList

Returns the text track list of cues, as a TextTrackCueList object.

enabled?: boolean
forced?: boolean
id: string

Returns the ID of the given track.

For in-band tracks, this is the ID that can be used with a fragment if the format supports media fragment syntax, and that can be used with the getTrackById() method.

For TextTrack objects corresponding to track elements, this is the ID of the track element.

inBandMetadataTrackDispatchType: string

Returns the text track in-band metadata track dispatch type string.

kind: TextTrackKind

Returns the text track kind string.

label: string

Returns the text track label, if there is one, or the empty string otherwise (indicating that a custom label probably needs to be generated from the other attributes of the object if the object is exposed to the user).

language: string

Returns the text track language string.

mode: TextTrackMode

Returns the text track mode, represented by a string from the following list:

Can be set, to change the mode.

oncuechange: ((this, ev) => any)

Type declaration

    • (this, ev): any
    • Parameters

      • this: TextTrack
      • ev: Event

      Returns any

Methods

  • Adds the given cue to textTrack's text track list of cues.

    Parameters

    • cue: TextTrackCue

    Returns void

  • Type Parameters

    • K extends "cuechange"

    Parameters

    • type: K
    • listener: ((this, ev) => any)
        • (this, ev): any
        • Parameters

          • this: TextTrack
          • ev: TextTrackEventMap[K]

          Returns any

    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    Parameters

    • event: Event

    Returns boolean

  • Removes the given cue from textTrack's text track list of cues.

    Parameters

    • cue: TextTrackCue

    Returns void

  • Type Parameters

    • K extends "cuechange"

    Parameters

    • type: K
    • listener: ((this, ev) => any)
        • (this, ev): any
        • Parameters

          • this: TextTrack
          • ev: TextTrackEventMap[K]

          Returns any

    • Optional options: boolean | EventListenerOptions

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • Optional options: boolean | EventListenerOptions

    Returns void

Generated using TypeDoc