# ActiveFence Video Content Moderation (/en/realtime-media/marketplace/build/add-moderation-and-intelligence/activefence/web)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

[ActiveFence](https://www.activefence.com/) provides trust and safety solutions to protect online platforms and their users from malicious behavior and content. By integrating ActiveFence capabilities in your app, you can design the exact content moderation solution you need. Content moderation is powered by AI-driven automated detection for text, audio, image, and video content, enabling you to moderate, enforce policies, manage user flags, and send notifications across multiple abuse areas and languages.

      
  
      
  
      
    [ActiveFence](https://www.activefence.com/) provides trust and safety solutions to protect online platforms and their users from malicious behavior and content. The following figure shows the ActiveFence moderation workflow for channel content:

    ![ActiveFence workflow](https://assets-docs.agora.io/images/extensions-marketplace/active-fence.svg)

    ## Prerequisites [#prerequisites-2]

    * A [supported browser](../../reference/supported-platforms.mdx).
    * Implemented the [SDK quickstart](../../../video/quickstart.mdx).
    * Completed the ActiveFence account, API key, webhook, and workflow configuration described above.

    ## Integrate the extension [#integrate-the-extension-2]

    ### Set up an event listener to check status [#set-up-an-event-listener-to-check-status]

    ```javascript
    agoraEngine.on("image-moderation-connection-state-change", (cur, prev) => {
      console.log("AF status:", "prev", prev, "cur", cur);
    });
    ```

    ### Enable image moderation [#enable-image-moderation]

    If you use a string UID to join the channel and want to receive it in the webhook callback, pass the string UID as `extraInfo`.

    ```javascript
    agoraEngine
      .setImageModeration(true, "YourExtraInfo", { interval: 1000 })
      .then((e) => console.log("AF enabled", e));
    ```

    ### Show an alert when the current user is kicked [#show-an-alert-when-the-current-user-is-kicked]

    ```javascript
    agoraEngine.on("connection-state-change", (cur, prev, reason) => {
      console.log("connection:", "prev", prev, "cur", cur, "reason:", reason);
      if (reason === ConnectionDisconnectedReason.UID_BANNED) {
        if (confirm("You are kicked from this channel, reload?")) {
          window.location.reload();
        }
      }
    });
    ```

    ## Reference [#reference-2]

    * [ActiveFence sample web project](https://github.com/EkaanshArora/agora-activefence/)
    * [ActiveFence documentation](https://docs.activefence.com/#section/About-This-Guide)

    
  
      
  
      
  
