-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueRevisitAn issue worth coming back toAn issue worth coming back to
Milestone
Description
According to the MediaSource Candidate Recommendation Spec, there are two SourceBuffer.appendBuffer()
method overloads.
MSDN only mentions the ArrayBuffer
overload, even though this is later contradicted in the example code, further down on the same page:
videoSource.appendBuffer(new Uint8Array(xhr.response));
(Uint8Array
indeed inherits from ArrayBufferView
, not ArrayBuffer
).
My tests show that Chrome 36 currently only works with ArrayBufferView
(as per the MSDN example code).
Anyway, long story short:
Here is the lib.d.ts
change request, as supported by the spec, MSDN example code and Chrome 36:
Existing:
interface SourceBuffer extends EventTarget {
updating: boolean;
appendWindowStart: number;
appendWindowEnd: number;
buffered: TimeRanges;
timestampOffset: number;
audioTracks: AudioTrackList;
appendBuffer(data: ArrayBuffer): void;
remove(start: number, end: number): void;
abort(): void;
appendStream(stream: MSStream, maxSize?: number): void;
}
Suggested:
interface SourceBuffer extends EventTarget {
updating: boolean;
appendWindowStart: number;
appendWindowEnd: number;
buffered: TimeRanges;
timestampOffset: number;
audioTracks: AudioTrackList;
appendBuffer(data: ArrayBuffer): void;
appendBuffer(data: ArrayBufferView): void;
remove(start: number, end: number): void;
abort(): void;
appendStream(stream: MSStream, maxSize?: number): void;
}
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueRevisitAn issue worth coming back toAn issue worth coming back to