Viktorani API - v0.0.8
    Preparing search index...

    Interface UseBuzzerResult

    Return value of useBuzzer.

    interface UseBuzzerResult {
        adjudicate: (buzzId: string, decision: GmDecision) => Promise<void>;
        buzzes: BuzzEvent[];
        clearBuzzes: (questionId: string) => Promise<void>;
        displayBuzzes: BuzzEvent[];
        handleIncomingBuzz: (
            payload: {
                playerId: string;
                playerName: string;
                teamId: string | null;
                timestamp: number;
            },
        ) => Promise<void>;
        isLocked: boolean;
        toggleLock: () => Promise<void>;
    }
    Index

    Properties

    adjudicate: (buzzId: string, decision: GmDecision) => Promise<void>

    Record the GM's ruling on a specific buzz. On 'Correct', awards points (if scoring is enabled) and optionally auto-locks.

    buzzes: BuzzEvent[]

    All buzz events for the current question, sorted by timestamp ascending.

    clearBuzzes: (questionId: string) => Promise<void>

    Delete all buzz records for a question (e.g. when moving to the next question).

    displayBuzzes: BuzzEvent[]

    Filtered subset for display — respects game.buzzDeduplication. In 'firstOnly' mode, only the first buzz per player is shown.

    handleIncomingBuzz: (
        payload: {
            playerId: string;
            playerName: string;
            teamId: string | null;
            timestamp: number;
        },
    ) => Promise<void>

    Record an incoming buzz from the transport layer. Call this from the GM's transport event handler when a BUZZ event arrives.

    isLocked: boolean

    Whether the buzzer is currently locked (mirrors game.buzzerLocked).

    toggleLock: () => Promise<void>

    Toggle the buzzer lock state and broadcast the change to players.