Skip to main content

Script

Properties#

hub#

An EventEmitter that your code can subscribe to. Emits the following events:

NameDescription
markerupdateFired when the active marker changes. Callback receives the index of the previously active marker.
hub: StrictEventEmitter<EventEmitter, {
"markerupdate": number;
}>;

loadTasks#

loadTasks: Promise<unknown>[];

markerIndex#

Index of the active marker.

markerIndex: number;

markerName#

Name of the active marker.

markerName: string;

markers#

The array of markers, in the form [name, startTime, endTime].

markers: [string, number, number][];

playback#

The underlying Playback instance.

playback: Playback;

Methods#

constructor()#

constructor(markers: Array<[string, string | number] | [string, string | number, string | number]>);

back()#

Seek playback to the previous marker.

back(): void;

forward()#

Advance playback to the next marker.

forward(): void;

markerByName()#

markerByName(name: string): [string, number, number];

markerNumberOf()#

Returns the first index of a marker named name. Throws an error if no marker named name exists.

markerNumberOf(name: string): number;

parseEnd()#

If end is a string, returns the ending time of the marker with that name. Otherwise, returns end.

parseEnd(end: number | string): number;

parseStart()#

If start is a string, returns the starting time of the marker with that name. Otherwise, returns start.

parseStart(start: number | string): number;