Skip to content

Missing SourceBuffer.textTrack in lib.dom.d.ts #21256

Closed
@jon-valliere

Description

@jon-valliere

Using TypeScript Version 2.6.1
Using Visual Studio Code Version 1.19.2 for MacOS

SourceBuffer has a property called textTrack which returns TextTrackList. TextTrackList is properly defined and is referenced in MediaSource, but is missing from SourceBuffer.

See https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/textTracks

Therefore, textTrack needs to be added to the signature as follows.

interface SourceBuffer extends EventTarget {
    appendWindowEnd: number;
    appendWindowStart: number;
    readonly audioTracks: AudioTrackList;
    readonly buffered: TimeRanges;
    mode: AppendMode;
    timestampOffset: number;
    readonly updating: boolean;
    readonly videoTracks: VideoTrackList;
    readonly textTracks: TextTrackList;
    abort(): void;
    appendBuffer(data: ArrayBuffer | ArrayBufferView): void;
    appendStream(stream: MSStream, maxSize?: number): void;
    remove(start: number, end: number): void;
}

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions