Class: shaka.text.NativeChaptersManager

Constructor

new NativeChaptersManager(mediaElementnon-null, playernon-null, playerInterface)

Parameters:
Name Type Description
mediaElement HTMLMediaElement
player shaka.util.FakeEventTarget
playerInterface shaka.text.NativeChaptersManager.PlayerInterface_
Implements:
Source:

Members

trackNodes_ :Map<string, {node: !HTMLTrackElement, key: string}>

The managed elements and the chapters they hold, by language.
Type:
  • Map<string, {node: !HTMLTrackElement, key: string}>
Source:

updateId_ :number

Incremented on every update, so that a slow update does not overwrite the result of a newer one.
Type:
  • number
Source:

Methods

createTrackNode_(language, chaptersnon-null) → {HTMLTrackElement}

Parameters:
Name Type Description
language string
chapters Array<shaka.extern.Chapter>
Source:
Returns:
Type
HTMLTrackElement

isManagedTrack(textTracknon-null) → {boolean}

Parameters:
Name Type Description
textTrack TextTrack
Source:
Returns:
True if the track was created by this manager.
Type
boolean

release()

Request that this object release all internal references.
Implements:
Source:

update() → {Promise}

Brings the native tracks in line with the player's chapters.
Source:
Returns:
Type
Promise

Type Definitions

PlayerInterface_

getChapterLanguages returns the normalized languages of the player's chapter streams, and getChapters the chapters of those streams in a language.
Type:
  • {getChapterLanguages: function(): !Array<string>, getChapters: function(string): !Promise<!Array<shaka.extern.Chapter>>}
Source: