Afk-module

Configuration

By default, the afk module is disabled when you implement this Web SDK Plugin. However, there are three ways to configure it:

  1. In your code

  2. In your project settings

  3. In the shareId

Note that if the afk module is configured in the shareId, it will override any settings configured in the project settings or front-end code. Similarly, if it is configured in the project settings, it will override any settings configured in the front-end code. And if it is configured in the front-end code, it will override the default settings.

// Default:
const afk = {
    enabled: false,
    warnTime: 600 * 1000, // 10 min
    errorTime: 60 * 1000, //  1 min
    actionTime: 10 * 1000 // 10 sec
}

We recommend using the project settings or the shareId setup to configure the plugin.

Project Settings

You can find these settings in the project settings or when setting up / editing the shareId.

Event-Listeners

To set up custom listeners for the AFK Events, you need to add them as follows:

import { WebRTCClient, events } from '@arcware/webrtc-plugin';

const client = new WebRTCClient( ... );


// events.EventTypes.AFK_Warn;
// events.EventTypes.AFK_Error;
// events.EventTypes.AFK_Action;
// events.EventTypes.AFK_Abort;

client.events.addListener(events.EventTypes.AFK_Warn, () => {
    // handle event
});

By default, the plugin will log some warnings to the console.

Last updated