UNPKG

parevo-interactive-video

Version:

Framework-agnostic interactive video library with quiz overlays for React, Vue, and vanilla JS

34 lines (33 loc) 1.03 kB
import { InteractiveVideoOptions, InteractiveVideoInstance } from './types'; export declare class InteractiveVideo implements InteractiveVideoInstance { private container; private video; private overlay; private options; private answeredQuestions; private currentQuestion; private isQuizVisible; private eventHandlers; constructor(container: HTMLElement | string, options: InteractiveVideoOptions); private init; private createVideoElement; private createOverlay; private setupEventListeners; private handleTimeUpdate; private checkForQuestions; private showQuiz; private handleOptionClick; private handleAnswer; private hideQuiz; private handleVideoEnd; private handleError; private applyStyles; play(): void; pause(): void; currentTime(): number; currentTime(time: number): void; destroy(): void; on(event: string, callback: Function): void; off(event: string, callback: Function): void; private emit; }