export type AnyIteratorOrIterable = AsyncIterator | AsyncIterable | Iterator | Iterable; export type PlayerTaskState = { status: 'task'; task: Task; taskKey: number; onTaskCompleted: () => void; }; export type PlayerState = PlayerTaskState | { status: 'loading'; } | { status: 'paused'; } | { status: 'completed'; }; type UsePlayerStateOptions = { timeline?: AnyIteratorOrIterable | null; resumeAfterTask?: (task: Task) => boolean; onCompleted?: () => void; paused: boolean; loading: boolean; }; /** * What `TimelinePlayer` has to render. While paused or loading, the task that * was running when the interruption began stays; once the timeline moves on, * paused or loading replaces whatever comes next. * * Throws timeline errors, and if no timeline is set while not loading. */ export declare function usePlayerState({ timeline, resumeAfterTask, onCompleted, paused, loading, }: UsePlayerStateOptions): PlayerState; export {};