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

    Interface UseAdditionalCamerasOptions

    Options for the useAdditionalCameras hook

    interface UseAdditionalCamerasOptions {
        enabled?: boolean;
        generateRoomToken: () => Promise<string>;
        onError?: (error: Error, cameraId: string) => void;
        ownerUserId: string;
        region?: string;
        roomName: string;
    }
    Index

    Properties

    enabled?: boolean

    Whether the hook is enabled (e.g., only when in a room)

    generateRoomToken: () => Promise<string>

    Async function that returns a room token for the ghost client

    onError?: (error: Error, cameraId: string) => void

    Callback when an error occurs

    ownerUserId: string

    The owner's userId (used to build ghost camera userIds)

    region?: string

    Signaling-region pin for the ghost clients (e.g. 'us-east-2').

    Defaults to the surrounding HiyveProvider's region — ghost cameras must join the SAME stack as the main client. Without a pin the ghost client latency-probes for the closest region, which selects a stack by proximity rather than by environment: from a production session it can land on a dev stack whose JWT secrets can't verify the session's room token, and every /token mint 500s. Only pass this when using the hook outside a HiyveProvider.

    roomName: string

    The room name to join ghost cameras into