Hiyve Components - v1.0.0
    Preparing search index...

    Interface HiyveProviderProps

    Options for creating a HiyveStore instance

    interface HiyveProviderProps {
        children: ReactNode;
        cloudBaseUrl?: string;
        cloudEnvironment?: CloudEnvironment;
        cloudToken?: string;
        connectOptions?: { audioDeviceId?: string; videoDeviceId?: string };
        generateCloudToken?: (
            params: GenerateCloudTokenParams,
        ) => Promise<string | CloudTokenResponse>;
        generateRoomToken?: () => Promise<string>;
        localVideoElementId?: string;
        onError?: (error: Error) => void;
        persistDeviceChanges?: boolean;
        presence?: boolean | { intervalMs?: number };
    }

    Hierarchy (View Summary)

    Index

    Properties

    children: ReactNode
    cloudBaseUrl?: string

    Override the cloud API base URL

    cloudEnvironment?: CloudEnvironment

    Cloud environment: 'production' (default) or 'development'

    cloudToken?: string

    Static cloud token (ct_xxx). Use generateCloudToken instead for auto-refresh.

    connectOptions?: { audioDeviceId?: string; videoDeviceId?: string }

    Initial device IDs to use when connecting

    generateCloudToken?: (
        params: GenerateCloudTokenParams,
    ) => Promise<string | CloudTokenResponse>

    Async function that returns a cloud token. The SDK passes { userId } so the callback can forward it to the backend.

    generateRoomToken?: () => Promise<string>

    Async function that returns a Hiyve room token. Defaults to POSTing to /api/generate-room-token.

    localVideoElementId?: string

    ID of the HTML video element for local video preview (default: 'local-video')

    onError?: (error: Error) => void

    Callback invoked when a client error occurs

    persistDeviceChanges?: boolean

    Persist device changes to localStorage (default: false)

    presence?: boolean | { intervalMs?: number }

    Enable automatic presence heartbeat. When true, the CloudClient signals the server that the current user is online. Heartbeat starts when the user authenticates and stops on unmount or logout.