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
eventManager_ :shaka.util.EventManager
Type:
mediaElement_ :HTMLMediaElement
Type:
playerInterface_ :shaka.text.NativeChaptersManager.PlayerInterface_
Type:
trackNodes_ :Map<string, {node: !HTMLTrackElement, key: string}>
The managed
Type:
- Map<string, {node: !HTMLTrackElement, key: string}>
updateId_ :number
Incremented on every update, so that a slow update does not overwrite
the result of a newer one.
Type:
- number
Methods
createTrackNode_(language, chaptersnon-null) → {HTMLTrackElement}
Parameters:
| Name | Type | Description |
|---|---|---|
language |
string | |
chapters |
Array<shaka.extern.Chapter> |
Returns:
- Type
- HTMLTrackElement
isManagedTrack(textTracknon-null) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
textTrack |
TextTrack |
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.
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>>}