rx-player
Version:
Canal+ HTML5 Video Player
29 lines • 1.15 kB
TypeScript
import type { IBufferedChunkSnapshot } from "../../../core/segment_sinks/segment_sinks_store";
export interface ISegmentSinkGrapUpdateData {
currentTime: number;
inventory: IBufferedChunkSnapshot[];
width: number;
height: number;
minimumPosition: number | undefined;
maximumPosition: number | undefined;
}
export default class SegmentSinkGraph {
/** Link buffered Representation's uniqueId to their corresponding color. */
private readonly _colorMap;
/** Current amount of colors chosen to represent the various Representation. */
private _currNbColors;
/** Canvas that will contain the buffer graph itself. */
private readonly _canvasElt;
private readonly _canvasCtxt;
constructor(canvasElt: HTMLCanvasElement);
clear(): void;
update(data: ISegmentSinkGrapUpdateData): void;
/**
* Paint a given range in the canvas
* @param {Object} rangeScaled - Buffered segment information with added
* "scaling" information to know where it fits in the canvas.
*/
private _paintRange;
private _getColorForRepresentation;
}
//# sourceMappingURL=buffer_graph.d.ts.map