Namespace: SpawnDev.SpawnJS.JSObjects
Inherits: SpawnJSObject, IEnumerable<TextTrackCue>
Source: JSObjects/TextTrackCueList.cs
MDN Reference: TextTrackCueList on MDN
The TextTrackCueList interface of the WebVTT API is an array-like object that represents a dynamically updating list of TextTrackCue objects. An instance of this type is obtained from TextTrack.cues in order to get all the cues in the TextTrack object. This interface has no constructor. https://developer.mozilla.org/en-US/docs/Web/API/TextTrackCueList
| Property | Type | Access | Description |
|---|---|---|---|
Length |
int |
get | An unsigned long that is the number of cues in the list. |
| Method | Return Type | Description |
|---|---|---|
GetEnumerator() |
IEnumerator<TextTrackCue> |
|
GetCueById(string id) |
TextTrackCue? |
Returns the first TextTrackCue object with the identifier passed to it. |
SpawnDev.SpawnJS Mapping Note: The JavaScript examples below show the standard Web API usage. In SpawnDev.SpawnJS, the same API is available with C# conventions:
- Properties and methods use PascalCase (e.g.,
readyStatebecomesReadyState)- Events use ActionEvent with
+=/-=(e.g.,addEventListener("click", fn)becomesOnClick += handler)- Async methods return
Task<T>instead ofPromise<T>- Objects should be disposed with
usingstatements- Access via
JS.Get<TextTrackCueList>(...)or constructornew TextTrackCueList(...)
const video = document.getElementById("video");
video.onplay = () => {
console.log(video.textTracks[0].cues);
};