# AFK Module - User inactivity

## Description

The AFK (away from keyboard) module is used for controlling the behaviour of user inactivity. It is located in Arcware's WebSDK Player and thus tracked and controlled in the browser.

Nevertheless, there are three locations from where the WebSDK player can source the AFK settings.

1. Property settings directly in frontend&#x20;
2. Project settings on platform
3. ShareID from platform

If there are no settings in any of the three locations, then no user inactivity is tracked and if someone leaves the stream open in the browser it will continue running until it hits the limit of "**maximum instance run-time**".&#x20;

{% hint style="warning" %}
Regardless of the settings of AFK module, if the "**maximum instance run-time**" kicks in, the session will be forcefully disconnected from the platform side. Please see the section on "maximum instance run-time"
{% endhint %}

## Properties

<figure><img src="https://451842398-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxeRHVvCMHTEw8OnxbYIg%2Fuploads%2F2Mu73CJKjXHWGyzQLU7S%2Fimage.png?alt=media&#x26;token=9245ff44-2180-4c54-a153-23082ec17a51" alt=""><figcaption></figcaption></figure>

* Overwrite afk-module (Only for options in project settings and ShareID)
* Enable timeouts
  * **AFK Timeout**
  * **Countdown**

The "overwrite afk-module" option governs if the settings made in either project settings or share ID should overwrite the settings made in frontend, regardless if they are event present there or not. Whereas the ShareID would on top overwrite the values set in project settings.

{% hint style="info" %}
**Priority =>** ShareID Settings -> Project Settings -> Frontend Settings&#x20;

if none are present, no user inactivity is tracked
{% endhint %}

The "Enable timeouts" will tell the frontend module if user inactivity should be tracked or not. This way one can forcefully disable / enable tracking of user inactivity on frontend, regardless of all the settings made there. If "Enable timeouts" is set to true, then frontend will track user inactivity in two stages: AFK timeout and Countdown.

**Enable Timeouts** (Editing the timeout values is possible if the 'Overwrite afk-module' is enabled)&#x20;

* **AFK Timeout** - Seconds of inactivity until countdown is shown.
* **Countdown** - Timer that gets shown as overlay to call for action after inactivity.

  If the timer expires without action the stream gets closedseconds that the user will see)&#x20;

The total time from the last user action to session closure is the sum of both AFK timeout and Countdown, measured in seconds.

## Defaults

When working with the WebSDK, no defaults are set for the AFK module. The frontend developer is responsible on their own to set up values.

When previewing the project via the Arcware platform or with a ShareID link, if no custom AFK values are set, then the defaults AFK values are imposed by Arcware. The AFK module is active with following default values:

* AFK Timeout: 600
* Countdown: 10

{% hint style="info" %}
Recommendation: Enable the AFK-module in project settings and control the behaviour for user inactivity in accordance with your needs.
{% endhint %}

Default Arcware Cloud AFK window inactivity is detected. Can be customized using the WebSDK for custom integration.

<figure><img src="https://451842398-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxeRHVvCMHTEw8OnxbYIg%2Fuploads%2FBzbJBUgilJHa0sYuh6t8%2F2025-05-31_17h29_09.png?alt=media&#x26;token=bedd09e8-6167-4dde-8d7b-5ddcab0b9cad" alt=""><figcaption></figcaption></figure>
