fleeta-components
Version:
A comprehensive React component library for fleet management applications
51 lines • 2.62 kB
TypeScript
/**
* VideoPlayer 관련 커스텀 훅들
* VideoPlayer 컴포넌트에서 사용하는 모든 훅들을 정의합니다.
*/
import type { VideoState } from './types';
/**
* VideoPlayer 초기화 옵션 인터페이스
*/
interface VideoStateInitOptions {
initialHorizontalFlip?: boolean;
initialVerticalFlip?: boolean;
showMap?: boolean;
showEventComponent?: boolean;
}
/**
* VideoPlayer의 상태 관리 훅
* 비디오 플레이어의 모든 상태를 관리합니다.
*/
export declare function useVideoState(options: VideoStateInitOptions): readonly [VideoState, import("react").Dispatch<import("react").SetStateAction<VideoState>>];
/**
* MP4 메타데이터 파싱 훅
* MP4 파일에서 GPS 및 센서 데이터를 파싱합니다.
*/
export declare function useMP4MetadataParsing(enableMetadataParsing: boolean, videoUrl: string | null, setVideoState: React.Dispatch<React.SetStateAction<VideoState>>): void;
/**
* 비디오 URL 변경 및 자동 재생 훅
* 비디오 URL이 변경될 때의 처리를 담당합니다.
*/
export declare function useVideoUrlChange(videoUrl: string | null, autoPlay: boolean, videoRef: React.RefObject<HTMLVideoElement>, videoState: VideoState, setVideoState: React.Dispatch<React.SetStateAction<VideoState>>, onPlay?: () => void): void;
/**
* 비디오 이벤트 리스너 훅
* 비디오 엘리먼트의 모든 이벤트를 처리합니다.
*/
export declare function useVideoEventListeners(videoRef: React.RefObject<HTMLVideoElement>, setVideoState: React.Dispatch<React.SetStateAction<VideoState>>, onTimeUpdate?: (currentTime: number) => void, onDurationChange?: (duration: number) => void, onPlay?: () => void, onPause?: () => void, onEnded?: () => void, onError?: (error: string) => void): void;
/**
* 컨트롤 가시성 관리 훅
* 비디오 컨트롤의 자동 숨김/표시를 관리합니다.
*/
export declare function useControlsVisibility(videoUrl: string | null, setVideoState: React.Dispatch<React.SetStateAction<VideoState>>): void;
/**
* 음소거 상태 동기화 훅
* 비디오 엘리먼트의 음소거 상태를 컴포넌트 상태와 동기화합니다.
*/
export declare function useMutedSync(videoRef: React.RefObject<HTMLVideoElement>, muted: boolean, videoUrl: string | null): void;
/**
* showMap, showEventComponent props 동기화 훅
* 외부 props 변경 시 내부 상태를 동기화합니다.
*/
export declare function usePropsSync(showMap: boolean, showEventComponent: boolean, setVideoState: React.Dispatch<React.SetStateAction<VideoState>>): void;
export {};
//# sourceMappingURL=hooks.d.ts.map