Skip to main content
Android
iOS
Web
Electron

Configure Flexible Classroom

This page introduces how to enable and configure Flexible Classroom in Agora Console.

Prerequisites

In order to follow this procedure you must have:

  • An Agora account and project.

  • The whiteboard feature in Flexible Classroom requires third-party cloud storage. Currently, Flexible Classroom supports Amazon S3.

Enable Flexible Classroom

Follow these steps to enable the Flexible Classroom service in Agora Console:

  1. Log into Agora Console and navigate to the Project Management page.

  2. On the Project Management page, find the project for which you want to enable the Flexible Classroom service, and click Edit.

  3. Under Extensions, find Flexible Classroom and click Enable.

  4. Read the pop-up prompt carefully, and click Enable.

  5. After you successfully enable the Flexible Classroom service, the status changes to Enabled:

Configure the whiteboard feature

If you want to upload PPT, Word, or PDF files to a Flexible Classroom and display these files on the whiteboard, you need to configure the whiteboard feature in Agora Console. Before configuring the whiteboard feature, ensure that you have enabled a third-party cloud storage service. Currently, Agora only supports Amazon S3.

To configure the whiteboard feature, take the following steps:

  1. On the Flexible Classroom configuration page in Agora Console, find the whiteboard module:

    configure-whiteboard-feature

  2. To use PPT, Word, PDF and other courseware, you need to enable advanced services. Go to Configuration under Advanced Services to enable and configure the document-to-webpage, document-to-picture, and screenshot services for Smart Classroom. For details, see Enable whiteboard server-side features.

  3. Configure a third-party cloud storage service for storing files uploaded in a classroom. Fill in the following information:

    • region: The location of the data center you specified when creating a bucket in Amazon S3.
    • endpoint: The domain name used to access the Amazon S3 service, such as s3.us-east-2.amazonaws.com.
    • Bucket: The bucket name in Amazon S3.
    • folder: The domain name used to access the Amazon S3 service, such as whiteboard.
    • accessKey: The Access Key provided by Amazon S3, which is used to identify visitors.
    • secretKey: The Secret Key provided by Amazon S3, which is used to authenticate signatures.

    For further information on how to obtain these parameters, see the Amazon S3 document.

Configure classroom storage and recording

To setup and configure storage and recording in for your classrooms:

  1. Setup third-party cloud storage

    1. On the Flexible Classroom configuration page, find the whiteboard module, as shown in the following figure:

    2. Enable the advanced services. See Enable whiteboard server-side features.

    3. Configure a third-party cloud storage service for storing files uploaded in a classroom. Fill in the following information:

      • region: The location of the data center you specified when creating a bucket in Amazon S3.
      • endpoint: The domain name used to access the Amazon S3 service, such as s3.us-east-2.amazonaws.com.
      • Bucket: The bucket name in Amazon S3.
      • folder: The domain name used to access the Amazon S3 service, such as whiteboard.
      • accessKey: The Access Key provided by Amazon S3, which is used to identify visitors.
      • secretKey: The Secret Key provided by Amazon S3, which is used to authenticate signatures.
      For how to get these information, see the document of Amazon S3.
  2. Configure your classroom

    1. Find the cloud recording module on the Flexible Classroom configuration page in Agora Console:

      Information
      The recording config can be set to default. Set the storage config to customized; otherwise, the recording cannot be stored in your OSS account.
    2. Configure storage

      Pass in the storageConfig JSON object for storing recorded files. Use the following fields to specify the url and storage location of the recording file.

      • endpoint: (required) String. The full path composed of the Bucket name and the access domain name. For example, if your Bucket name is "agora-recording", and the OSS access domain name is "oss-cn-shanghai.aliyuncs.com", then the endpoint field is set to https:// agora-recording.oss-cn-shanghai.aliyuncs.com

      • fileNamePrefix: (Optional) JSONArray. An array of strings that specifies the storage location of the recording file in the third-party cloud storage. The prefix length, including slashes, cannot exceed 128 characters. The string supports 26 uppercase and lowercase English letters az, AZ, and 10 numbers 0-9. Slashes, underscores, brackets, and other symbol characters are not allowed. You can use variables to specify a dynamic path. When you initiate recording, Flexible Classroom will replace variables with real values.

      Sample storageConfig:


      _12
      {
      _12
      "vendor": 2,
      _12
      "region": 3,
      _12
      "bucket": "xxxxx",
      _12
      "accessKey": "xxxxxxf",
      _12
      "secretKey": "xxxxx",
      _12
      "endpoint": "https://agora-recording.oss-cn-shanghai.aliyuncs.com",
      _12
      "fileNamePrefix": [
      _12
      "scenario",
      _12
      "recording"
      _12
      ]
      _12
      }

      To set the path dynamically, you can use these two types of variables:

      Type Variable Description
      Fixed Variables ${appId} App ID
      ${roomUuid} The Uuid of the class to be recorded
      Date variables ${yyyy} Year
      ${MM} Month
      ${dd} Day
      ${yyyyMMdd}${yyyyMM}${yyyy-dd}${MM_dd} Date variables can be combined into different formats

      For example, you set fileNamePrefix field as follows:


      _7
      "fileNamePrefix": [
      _7
      "scenario",
      _7
      "recording",
      _7
      "${appId}",
      _7
      "${yyyyMM}",
      _7
      "${roomUuid}"
      _7
      ]

      The recording storage path will be similar to /scenario/recording/<appID>/202303/<roomUUiD>/filename.mp4.

      For complete parameter descriptions, see storageConfig.

    3. Configure recording.

      By default, you record teacher audio and video in composite recording mode. Your recorded files are stored in Agora's Amazon S3 account. To change the default behavior, Pass in the recordingConfig JSON object:


      _5
      {
      _5
      "maxIdleTime": 30,
      _5
      "streamTypes": 2,
      _5
      "channelType": 0
      _5
      }

      For parameter descriptions, see recordingConfig.

Configure Chat

To enable and configure Chat:

  1. In Agora Console, navigate to Project Management.

  2. Click Config next to the project for which you want to enable Chat.

  3. In the Features section of the Edit Project page, click Enable/Configure next to Chat.

  4. Select the data center location.

    Agora generates the Chat-related AppKey, OrgName, AppName, and API access information.

  5. In the Features section of the Edit Project page, click Config next to Flexible Classroom.

  6. In the Chat section, complete the required fields:

    • API host: The REST API access address generated when enabling Chat.
    • orgName: The unique identifier of the enterprise generated when enabling Chat.
    • superAdmin: The super administrator username prefix. Only numbers and letters are supported. Agora uses ${superAdmin}-${timestamp} as the super administrator to create a chat room.
    • appName: The unique name of the app generated when enabling Chat.
    • appKey: The unique identifier of the app generated when enabling Chat.

Considerations

AWS S3 account configuration

To ensure that Agora can access files in your third-party cloud storage space, you should enable public access or higher permissions for third-party storage spaces.

Configure your AWS S3 account as follows:

  • Bucket policy


    _13
    {
    _13
    "Version":"2012-10-17",
    _13
    "Id":"Policy1622700880591",
    _13
    "Statement":[
    _13
    {
    _13
    "Sid":"Stmt1622700872941",
    _13
    "Effect":"Allow",
    _13
    "Principal":"*",
    _13
    "Action":["s3:GetObject","s3:PutObject"],
    _13
    "Resource":"arn:aws-cn:s3:::agora-adc-artifacts/"
    _13
    }
    _13
    ]
    _13
    }

  • Cross-origin resource sharing


    _17
    [
    _17
    {
    _17
    "AllowedHeaders":[
    _17
    "*"
    _17
    ],
    _17
    "AllowedMethods":[
    _17
    "PUT",
    _17
    "GET"
    _17
    ],
    _17
    "AllowedOrigins":[
    _17
    "*"
    _17
    ],
    _17
    "ExposeHeaders":[
    _17
    _17
    ]
    _17
    }
    _17
    ]

Service limit

Flexible Classroom supports a maximum of 10,000 people online at the same time. If you need to extend your limit, contact technical support.

Next steps

After enabling the Flexible Classroom service, see how to quickly launch a classroom.

vundefined