Fishjam Mobile SDK - v0.24.0
    Preparing search index...
    useCallKitEvent: <T extends keyof CallKitAction>(
        action: T,
        callback: (event: CallKitAction[T]) => void,
    ) => void = ...

    A hook for listening to CallKit actions on iOS. Does nothing on other platforms. This hook allows you to respond to user interactions with the native iOS CallKit interface, such as muting/unmuting the call, putting the call on hold, or ending the call from the system's phone UI or lock screen controls.

    Type declaration

      • <T extends keyof CallKitAction>(
            action: T,
            callback: (event: CallKitAction[T]) => void,
        ): void
      • Type Parameters

        Parameters

        • action: T

          The CallKit action to listen for. Available actions:

          • 'started' - CallKit session has started
          • 'ended' - User ended the call from CallKit UI
          • 'failed' - CallKit session failed to start
          • 'muted' - User toggled mute from CallKit UI
          • 'held' - User toggled hold from CallKit UI
        • callback: (event: CallKitAction[T]) => void

          Function called when the specified action occurs.

        Returns void

    import { useCallKitEvent } from '@fishjam-cloud/react-native-client';

    // Listen for hold state changes
    useCallKitEvent('held', (isOnHold: boolean) => {
    console.log('Call hold state:', isOnHold);
    // Handle hold state in your app
    });