@byomakase/omakase-player
Version:
## Omakase Player - Open source JavaScript framework for building frame accurate video experiences
39 lines (38 loc) • 1.32 kB
TypeScript
import { Observable } from 'rxjs';
import { MarkerAwareApi } from './marker-aware-api';
import { MarkerMouseEvent, MarkerVttCue } from '../types';
import { VttLoadOptions } from './vtt-aware-api';
import { MarkerApi } from './marker-api';
import { MarkerVttFile } from '../vtt';
export interface TimeRangeMarkerTrackApi extends MarkerAwareApi {
/**
* Fires when the mouse enters the marker area
*/
onMarkerMouseEnter$: Observable<MarkerMouseEvent>;
/**
* Fires when the mouse leaves the marker area
*/
onMarkerMouseLeave$: Observable<MarkerMouseEvent>;
/**
* Fires when the marker area is clicked
*/
onMarkerClick$: Observable<MarkerMouseEvent>;
/**
* Fires after VTT file defined in the config is loaded
*/
onVttLoaded$: Observable<MarkerVttFile | undefined>;
/**
* Destroy all markers in the marker track
*/
loadVtt(vttUrl: string, options: TimeRangeMarkerTrackVttLoadOptions): void;
}
export interface TimeRangeMarkerTrackVttLoadOptions extends VttLoadOptions {
/**
* Function to create markers from vtt cues
*
* @param marker marker vtt cue object
* @param index marker vtt cue index
* @returns marker object
*/
vttMarkerCreateFn?: (marker: MarkerVttCue, index: number) => MarkerApi;
}