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; /** * Fires when the mouse leaves the marker area */ onMarkerMouseLeave$: Observable; /** * Fires when the marker area is clicked */ onMarkerClick$: Observable; /** * Fires after VTT file defined in the config is loaded */ onVttLoaded$: Observable; /** * 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; }