ActiveFence Video Content Moderation

Updated

Integrate and use the ActiveFence content moderation extension in your app.

ActiveFence 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.

Prerequisites

  • Flutter 2.0.0 or higher.
  • Dart 2.15.1 or higher.
  • A Flutter editor such as Android Studio, IntelliJ, or VS Code.
  • Implemented the SDK quickstart.

Integrate the extension

Initialize ContentInspectConfig

const contentInspectModule = ContentInspectModule(
  type: ContentInspectType.contentInspectModeration,
  interval: 5,
);
const contentInspectConfig = ContentInspectConfig(
  modules: [contentInspectModule],
  moduleCount: 1,
  extraInfo: 'YourExtraInfo',
);

Apply ContentInspectConfig

var returnVal = await agoraEngine.enableContentInspect(
  enabled: true,
  config: contentInspectConfig,
);

Catch banning events

agoraEngine.registerEventHandler(RtcEngineEventHandler(
  onConnectionStateChanged: (connection, state, reason) {
    if (
      state == ConnectionStateType.connectionStateFailed &&
      reason == ConnectionChangedReasonType.connectionChangedBannedByServer
    ) {
      debugPrint('Stream banned by the server');
    }
  },
));