/**
 * Optional hooks a page can give a video player (Rangook lessons: resume where
 * the learner stopped, save progress, jump to a step). Players without a real
 * timeline (embeds) ignore them.
 */
export interface PlaybackControl {
    /** Jump to this many seconds and play. */
    seek(seconds: number): void;
}

export interface PlaybackHooks {
    /** Start here (seconds) instead of 0. Read once, when the player is created. */
    startAt?: number;
    /** Playback time, as the player reports it (several times a second while playing). */
    onTime?: (seconds: number) => void;
    onPause?: (seconds: number) => void;
    onEnded?: (seconds: number) => void;
    /** The player is ready to be controlled. */
    onReady?: (control: PlaybackControl) => void;
}
