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

    Interface CustomLayoutInfo

    Information passed to custom layout handlers.

    Contains all the data needed to calculate tile positions for a custom layout.

    const customLayout: CustomLayoutHandler = (info) => {
    const { availableWidth, availableHeight, participants, dominantSpeaker } = info;
    const positions: Record<string, TilePosition> = {};

    // Implement your custom positioning logic here
    positions['local'] = { left: 0, top: 0, width: 200, height: 150 };

    return positions;
    };
    interface CustomLayoutInfo {
        availableHeight: number;
        availableWidth: number;
        dominantSpeaker: string | null;
        gap: number;
        isLocalDominant: boolean;
        layout: string;
        padding: number;
        participants: Participant[];
        styles: VideoGridStyles;
        totalCount: number;
    }
    Index

    Properties

    availableHeight: number

    Container height minus padding (pixels)

    availableWidth: number

    Container width minus padding (pixels)

    dominantSpeaker: string | null

    User ID of the dominant speaker, or null

    gap: number

    Gap between tiles (pixels)

    isLocalDominant: boolean

    Whether the local user is the dominant speaker

    layout: string

    The layout mode being rendered

    padding: number

    Padding from container edges (pixels)

    participants: Participant[]

    Array of remote participants

    The merged styles configuration

    totalCount: number

    Total number of tiles (participants + 1 for local)