siteKiosk.activityTracker



Example:

// Report user as active
siteKiosk.activityTracker.reportUserActivity();

// Check if user is active
console.log("User is active: " + siteKiosk.activityTracker.getIsActive());
// Expected: "User is active: true"

Edit this snippet on JSFiddle

Methods

  • Gets the time in seconds after which a user is considered idle.

    Returns number

  • Whether the user is active.

    Returns boolean

  • Whether the user is idle.

    Returns boolean

  • Sets the user to the idle state, performs a logout when needed.

    Returns void

  • Sets the user to the active state.

    Returns void

  • Sets the time after which a user is considered idle.

    Parameters

    • idleTimeoutInSeconds: number

      The idle timeout in seconds.

    Returns void

Events

  • Registers a callback which will be triggered when the active status changed.

    Parameters

    • callback: ((isActive: boolean) => void)

      The callback which will be triggered when the active status changed.

        • (isActive: boolean): void
        • Parameters

          • isActive: boolean

          Returns void

    Returns EventSubscription

  • Registers a callback which will be triggered when the idle status changed.

    Parameters

    • callback: ((isIdle: boolean) => void)

      The callback which will be triggered when the idle status changed.

        • (isIdle: boolean): void
        • Parameters

          • isIdle: boolean

          Returns void

    Returns EventSubscription

Generated using TypeDoc