declare global { interface Window { onYouTubeIframeAPIReady?: () => void; } } interface Opts { rootContentId?: string; assetType?: string; } declare class YouTubeClip { player: YT.Player | null; readonly playerPlaceholder: HTMLElement; readonly videoId: string | null; private lastQuarter; private loops; private progressInterval; private mediaTracker; private fireUnloadEvent; private opts; constructor(placeholder: HTMLElement, opts?: Opts); init(): void; unload(): void; /** * onPlayerStateChange * Handles events fired by Youtube based on user interactions */ private onPlayerStateChange; /** * startTimeUpdateTracking * Starts an interval timer to repeatedly check the user's progress whilst the video is playing * */ private startTimeUpdateTracking; /** * stopTimeUpdateTracking * Stop the interval that is used for time update tracking */ private stopTimeUpdateTracking; /** * fireEvent * Dispatch a custom event with tracking data */ private fireEvent; private checkLoop; /** * destroy * A tear down function */ destroy(): void; static init(rootElement?: Document | HTMLElement, opts?: Opts): YouTubeClip[]; } export default YouTubeClip;