Zamok Kiosk API
    Preparing search index...
    claimAudioFocus: (
        payload: AudioFocusClaimInput,
    ) => {
        payload: {
            claimedAt: number;
            label: string;
            moduleName: string;
            ownerId: string;
            priorityGroup: AudioFocusPriorityGroup;
            reason?: string;
            resources: AudioResource[];
        };
        type: "AUDIO_FOCUS/CLAIM";
    } = ...

    Claims one or more shared audio resources for a module.

    Type Declaration

      • (
            payload: AudioFocusClaimInput,
        ): {
            payload: {
                claimedAt: number;
                label: string;
                moduleName: string;
                ownerId: string;
                priorityGroup: AudioFocusPriorityGroup;
                reason?: string;
                resources: AudioResource[];
            };
            type: "AUDIO_FOCUS/CLAIM";
        }
      • Parameters

        • payload: AudioFocusClaimInput

        Returns {
            payload: {
                claimedAt: number;
                label: string;
                moduleName: string;
                ownerId: string;
                priorityGroup: AudioFocusPriorityGroup;
                reason?: string;
                resources: AudioResource[];
            };
            type: "AUDIO_FOCUS/CLAIM";
        }

    Use this when a feature has started actively using the microphone, speakers, or both. The payload must provide a stable ownerId, a human-readable label, and the correct priorityGroup so other modules can determine whether they should pause. This action automatically stamps the claim with claimedAt for tie-breaking between claims in the same priority group.

    claimAudioFocus({
    ownerId: 'voip-twilio:call',
    moduleName: 'module-voip-twilio',
    label: 'Phone call',
    resources: ['microphone', 'speaker'],
    priorityGroup: 'call',
    reason: 'VoIP call active',
    });