@werk1/w1-system-videoblock
Version:
Universal video player supporting YouTube, Vimeo, HLS, DASH with coordination and GSAP integration for W1 System
17 lines (16 loc) • 697 B
TypeScript
import React from "react";
import type { W1VideoPlayerState } from "../../../types";
interface UseVideoEventsProps {
videoRef: React.RefObject<HTMLVideoElement | null>;
isClient: boolean;
src: string;
updateState: (updates: Partial<W1VideoPlayerState>) => void;
onReady?: (video: HTMLVideoElement) => void;
onError?: (error: MediaError | null) => void;
onProgress?: (progress: number) => void;
onTimeUpdate?: (currentTime: number) => void;
}
export declare const useVideoEvents: ({ videoRef, isClient, src, updateState, onReady, onError, onProgress, onTimeUpdate }: UseVideoEventsProps) => {
playPromiseRef: React.RefObject<Promise<void> | null>;
};
export {};