/** * useIngestEndpoints - React hook for gateway-based ingest endpoint resolution * Mirrors useViewerEndpoints from npm_player for consistency */ import { type IngestEndpoints, type IngestClientStatus } from "@livepeer-frameworks/streamcrafter-core"; export interface UseIngestEndpointsOptions { /** Gateway GraphQL URL */ gatewayUrl?: string; /** Stream key for ingest */ streamKey?: string; /** JWT auth token (optional) */ authToken?: string; /** Max retry attempts (default: 3) */ maxRetries?: number; /** Initial retry delay in ms (default: 1000) */ initialDelayMs?: number; /** Auto-resolve on mount (default: true) */ autoResolve?: boolean; } export interface UseIngestEndpointsResult { /** Resolved endpoints (null if not resolved) */ endpoints: IngestEndpoints | null; /** Current resolution status */ status: IngestClientStatus; /** Error message if status is 'error' */ error: string | null; /** Primary WHIP URL for streaming */ whipUrl: string | null; /** Primary RTMP URL */ rtmpUrl: string | null; /** Primary SRT URL */ srtUrl: string | null; /** Manually trigger resolution */ resolve: () => Promise; /** Reset state and clear endpoints */ reset: () => void; } export declare function useIngestEndpoints(options?: UseIngestEndpointsOptions): UseIngestEndpointsResult;