Hive
This page introduces how to use Hive Visual Moderation API in Agora SDK to empower your app with accurate content moderation for live video streams.
Hive Visual Moderation API and Agora SDK work together as follows:
- When
enableContentInspect
is called, Agora SDK takes screenshots of the local user's video and uploads the screenshots to the Agora server. - Agora server sends the screenshots to Hive Visual Moderation API.
- Hive returns the classification result of the local user's video to the callback URL specified in
enableContentInspect
.
Prerequisites
- Implement Get Started with Interactive Live Streaming.
- Activate Hive Visual Moderation API on Agora Console.
- Send an email to support@agora.io to configure Hive Visual Moderation API. See Hive configuration email.
Integrate Hive Visual Moderation API
1. Client-side: Enable content moderation
To use Hive Visual Moderation API in Agora SDK, you need to call the enableContentInspect
method.
You can use the following sample code:
2. Server-side: Receive HTTP response from Hive
After Agora server sends the screenshots to Hive, Hive returns the results to your callback URL in the form of an HTTP response. For full details, see Hive response formats.
Reference
Hive configuration email
Your email must include the following information:
Name | Description |
---|---|
AppId | Agora App ID |
desc | (Optional) Description of your project |
callback_url | Your callback URL to receive classification results from Hive |
moderation_upload_policy | Set it to one of the following: |
oss_vendor | (Optional) If moderation_upload_policy is not [""], set it to "aws" or "aliyun", and provide your OSS configuration (see below). |
OSS configuration
- If your OSS provider is AWS:
Key Description aws_oss_access_key_id AWS AccessKeyId aws_oss_access_key_secret AWS AccessKeySecret aws_oss_bucket_name AWS bucket name. See Bucket aws_oss_endpoint AWS endpoint. See Endpoint aws_oss_fileName_prefix Bucket folder path prefix delimited by "/" aws_oss_region AWS region. See Region - If your OSS provider is Aliyun:
Key Description aliyun_oss_access_key_id Aliyun AccessKeyId aliyun_oss_access_key_secre Aliyun AccessKeySecret aliyun_oss_bucket_name Aliyun OSS bucket name. See Bucket aliyun_oss_endpoint Aliyun endpoint. See Endpoint aliyun_oss_fileName_prefix Bucket folder path prefix delimited by "/"
The following is an example of the configuration e-mail: