For AI agents: see the complete documentation index at /llms.txt.
Proctor SDK
Updated
This page provides the API reference for the Agora Proctor SDK.
Agora Proctor SDK is currently not available for Android.
This TypeScript API reference covers the Agora Proctor SDK APIs for launching and managing Flexible Classroom proctoring scenarios.
AgoraProctorSDK
AgoraProctorSDK is the basic interface of the Agora Proctor SDK and provides the main methods for a flexible classroom in proctoring scenarios.
config
static config(config: ConfigParams): voidConfigures the Agora Proctor SDK.
Parameters
| Parameter | Description |
|---|---|
config | The configuration for the flexible classroom. See ConfigParams for details. |
launch
static launch(dom: HTMLElement, option: LaunchOption): () => voidLaunches a flexible classroom in a proctoring scenario.
Parameters
| Parameter | Description |
|---|---|
dom | The Document Object Model (DOM). See Document for details. |
option | The classroom launching configuration. See LaunchOption for details. |
Return value
Returns a function used to destroy the scene and recycle resources.
Type definitions
ConfigParams
The global SDK configuration, used in AgoraProctorSDK.config.
export type ConfigParams = {
appId: string;
region?: string;
};| Property | Description |
|---|---|
appId | The Agora App ID. See Get the Agora App ID. |
region | (Optional) The region where the classroom is. All clients must use the same region; otherwise, they may fail to communicate with each other. Supported regions are CN for Mainland China, NA for North America, EU for Europe, and AP for Asia Pacific. |
LaunchOption
The classroom launching configuration used in AgoraProctorSDK.launch.
export type LaunchOption = {
userUuid: string;
userName: string;
roomUuid: string;
roleType: EduRoleTypeEnum;
roomType: EduRoomTypeEnum;
roomName: string;
listener: ListenerCallback;
pretest: boolean;
rtmToken: string;
language: LanguageEnum;
startTime?: number;
duration: number;
widgets?: { [key: string]: typeof AgoraWidgetBase };
userFlexProperties?: { [key: string]: any };
mediaOptions?: LaunchMediaOptions;
latencyLevel?: 1 | 2;
uiMode?: FcrMultiThemeMode;
checkStudentScreenShareState?: boolean;
rtcCloudProxyType?: AgoraCloudProxyType;
rtmCloudProxyEnabled?: boolean;
};| Property | Description |
|---|---|
userUuid | The user ID. This is the globally unique identifier of a user. This value must be the same as the User ID that you use for generating a Signaling token. This value must be less than 64 bytes. Supported characters include lowercase and uppercase English letters, numbers, spaces, and the following symbols: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", and ",". |
userName | The user name for display in the classroom. This value must be less than 64 bytes. |
roomUuid | The room ID. This is the globally unique identifier of a classroom. This value must be less than 64 bytes. Supported characters include lowercase and uppercase English letters, numbers, spaces, and the symbols listed for userUuid. |
roleType | The user's role in the classroom. See EduRoleTypeEnum for details. |
roomType | The classroom type. See EduRoomTypeEnum for details. |
roomName | The room name for display in the classroom. The string length must be less than 64 bytes. |
listener | The state of classroom launching: ready means the classroom is ready, and destroyed means the classroom has been destroyed. |
pretest | Whether to enable the pre-class device test. If set to true, end users see a pop-up window to test their camera, microphone, and speaker before entering the classroom. |
rtmToken | The Signaling token used for authentication. See Secure authentication with tokens. |
language | The language on the classroom UI. See LanguageEnum for details. |
startTime | (Optional) The start time (ms) of the class, determined by the first user joining the classroom. |
duration | The duration (seconds) of the class, determined by the first user joining the classroom. The maximum value is 86,400. Agora recommends that you set this value to the actual class duration. |
widgets | (Optional) Extensive widgets that extend the classroom capabilities. See Embed a custom plugin. |
userFlexProperties | (Optional) User properties customized by the developer. |
mediaOptions | (Optional) Media options, including the media encryption configuration, camera video encoder configuration, and screen sharing video encoder configuration. See LaunchMediaOptions for details. |
latencyLevel | (Optional) The latency level of an audience member. This property does not apply to cohosting users. 1 means low latency, where the latency from the sender to the receiver is between 1500 ms and 2000 ms. 2 means ultra-low latency, where the latency from the sender to the receiver is between 400 ms and 800 ms. The default value is 2. |
uiMode | (Optional) The UI theme mode of the classroom. The default value is light, which means a light theme. See FcrMultiThemeMode for details. |
checkStudentScreenShareState | (Optional) Whether to kick students out of the classroom immediately when they stop screen sharing. |
rtcCloudProxyType | (Optional) The cloud proxy type for the RTC service. See AgoraCloudProxyType. |
rtmCloudProxyEnabled | (Optional) Whether to enable cloud proxy for the Signaling service. |
LaunchMediaOptions
export type LaunchMediaOptions = {
cameraEncoderConfiguration?: EduVideoEncoderConfiguration;
screenShareEncoderConfiguration?: EduVideoEncoderConfiguration;
encryptionConfig?: MediaEncryptionConfig;
channelProfile?: ChannelProfile;
web?: {
codec: SDK_CODEC;
mode: SDK_MODE;
};
};Media options, including the media encryption configuration, camera video encoder configuration, and screen sharing video encoder configuration. Set in LaunchOption.
| Property | Description |
|---|---|
cameraEncoderConfiguration | (Optional) The encoding configuration of the video stream captured by the camera. See EduVideoEncoderConfiguration for details. |
screenShareEncoderConfiguration | (Optional) The encoding configuration of the screen sharing stream. See EduVideoEncoderConfiguration for details. |
encryptionConfig | (Optional) The media stream encryption configuration. See MediaEncryptionConfig for details. |
channelProfile | The channel profile configuration. See ChannelProfile for details. |
web | The web configuration for browser codec format and channel mode. codec can be "vp9" for VP9 or "h264" for H.264. mode can be "rtc" for communication mode or "live" for live-streaming mode. |
EduVideoEncoderConfiguration
export interface EduVideoEncoderConfiguration {
width: number;
height: number;
frameRate: number;
bitrate: number;
}The video encoder configuration.
| Property | Description |
|---|---|
width | The width of the video frame in pixels. The default value is 320. |
height | The height of the video frame in pixels. The default value is 240. |
frameRate | The frame rate of the video in FPS. The default value is 15. |
bitrate | The bitrate of the video in Kbps. The default value is 200. |
MediaEncryptionConfig
export declare interface MediaEncryptionConfig {
mode: MediaEncryptionMode;
key: string;
}The media stream encryption configuration used in LaunchMediaOptions.
| Property | Description |
|---|---|
mode | The encryption mode. See MediaEncryptionMode. Teachers and students in the same classroom must use the same encryption mode and key. |
key | The encryption key. |
ChannelProfile
export enum ChannelProfile {
Communication = 0,
LiveBroadcasting = 1,
}The channel profiles, used in LaunchMediaOptions.
| Value | Description |
|---|---|
Communication | Communication mode, commonly used for one-to-one or one-to-many classrooms. |
LiveBroadcasting | Live-streaming mode. This option costs less than communication mode and has a higher latency. |
MediaEncryptionMode
export enum MediaEncryptionMode {
AES_128_XTS = 1,
AES_128_ECB = 2,
AES_256_XTS = 3,
AES_128_GCM = 5,
AES_256_GCM = 6,
}The media stream encryption mode, used in MediaEncryptionConfig.
| Value | Description |
|---|---|
AES_128_XTS | 1: 128-bit AES encryption, XTS mode. |
AES_128_ECB | 2: 128-bit AES encryption, ECB mode. |
AES_256_XTS | 3: 256-bit AES encryption, XTS mode. |
AES_128_GCM | 5: 128-bit AES encryption, GCM mode. |
AES_256_GCM | 6: 256-bit AES encryption, GCM mode. |
FcrMultiThemeMode
export enum FcrMultiThemeMode {
light = 'light',
dark = 'dark',
}The UI theme mode of the classroom, used in LaunchOption.
| Value | Description |
|---|---|
light | Light theme. |
dark | Dark theme. |
EduRoleTypeEnum
export enum EduRoleTypeEnum {
teacher = 1,
student = 2,
}The role of the user in the classroom, used in LaunchOption.
| Value | Description |
|---|---|
teacher | 1: Teacher or proctor. |
student | 2: Student or exam taker. |
EduRoomTypeEnum
export enum EduRoomTypeEnum {
RoomProctor = 6,
}The classroom type, used in LaunchOption.
| Value | Description |
|---|---|
RoomProctor | 6: A proctored exam. In proctoring scenarios, roomType can only be set to this value. |
LanguageEnum
export type LanguageEnum = 'en' | 'zh';The language on the UI, used in LaunchOption.
| Value | Description |
|---|---|
"en" | English. |
"zh" | Chinese. |
DeviceTypeEnum
export enum DeviceTypeEnum {
Main = 'main',
Sub = 'sub',
}Device types.
For more about main devices and secondary devices, see Proctor exams online.
| Value | Description |
|---|---|
Main | Main device. |
Sub | Secondary device. |
AgoraCloudProxyType
The cloud proxy type. Set in LaunchOption.
| Value | Description |
|---|---|
Automatic | 0: Automatic mode. In this mode, the SDK first attempts to connect directly to Agora SDRTN. If the attempt fails, the SDK automatically falls back to sending media over TLS 443. If you are unsure whether the end user's network environment has a firewall, Automatic mode is recommended. |
UDP | 1: UDP. |
TCP | 2: TCP. |
This TypeScript API reference covers the Agora Proctor SDK APIs for launching and managing Flexible Classroom proctoring scenarios.
AgoraProctorSDK
AgoraProctorSDK is the basic interface of the Agora Proctor SDK and provides the main methods for a flexible classroom in proctoring scenarios.
config
static config(config: ConfigParams): voidConfigures the Agora Proctor SDK.
Parameters
| Parameter | Description |
|---|---|
config | The configuration for the flexible classroom. See ConfigParams for details. |
launch
static launch(dom: HTMLElement, option: LaunchOption): () => voidLaunches a flexible classroom in a proctoring scenario.
Parameters
| Parameter | Description |
|---|---|
dom | The Document Object Model (DOM). See Document for details. |
option | The classroom launching configuration. See LaunchOption for details. |
Return value
Returns a function used to destroy the scene and recycle resources.
Type definitions
ConfigParams
The global SDK configuration, used in AgoraProctorSDK.config.
export type ConfigParams = {
appId: string;
region?: string;
};| Property | Description |
|---|---|
appId | The Agora App ID. See Get the Agora App ID. |
region | (Optional) The region where the classroom is. All clients must use the same region; otherwise, they may fail to communicate with each other. Supported regions are CN for Mainland China, NA for North America, EU for Europe, and AP for Asia Pacific. |
LaunchOption
The classroom launching configuration used in AgoraProctorSDK.launch.
export type LaunchOption = {
userUuid: string;
userName: string;
roomUuid: string;
roleType: EduRoleTypeEnum;
roomType: EduRoomTypeEnum;
roomName: string;
listener: ListenerCallback;
pretest: boolean;
rtmToken: string;
language: LanguageEnum;
startTime?: number;
duration: number;
widgets?: { [key: string]: typeof AgoraWidgetBase };
userFlexProperties?: { [key: string]: any };
mediaOptions?: LaunchMediaOptions;
latencyLevel?: 1 | 2;
uiMode?: FcrMultiThemeMode;
checkStudentScreenShareState?: boolean;
rtcCloudProxyType?: AgoraCloudProxyType;
rtmCloudProxyEnabled?: boolean;
};| Property | Description |
|---|---|
userUuid | The user ID. This is the globally unique identifier of a user. This value must be the same as the User ID that you use for generating a Signaling token. This value must be less than 64 bytes. Supported characters include lowercase and uppercase English letters, numbers, spaces, and the following symbols: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", and ",". |
userName | The user name for display in the classroom. This value must be less than 64 bytes. |
roomUuid | The room ID. This is the globally unique identifier of a classroom. This value must be less than 64 bytes. Supported characters include lowercase and uppercase English letters, numbers, spaces, and the symbols listed for userUuid. |
roleType | The user's role in the classroom. See EduRoleTypeEnum for details. |
roomType | The classroom type. See EduRoomTypeEnum for details. |
roomName | The room name for display in the classroom. The string length must be less than 64 bytes. |
listener | The state of classroom launching: ready means the classroom is ready, and destroyed means the classroom has been destroyed. |
pretest | Whether to enable the pre-class device test. If set to true, end users see a pop-up window to test their camera, microphone, and speaker before entering the classroom. |
rtmToken | The Signaling token used for authentication. See Secure authentication with tokens. |
language | The language on the classroom UI. See LanguageEnum for details. |
startTime | (Optional) The start time (ms) of the class, determined by the first user joining the classroom. |
duration | The duration (seconds) of the class, determined by the first user joining the classroom. The maximum value is 86,400. Agora recommends that you set this value to the actual class duration. |
widgets | (Optional) Extensive widgets that extend the classroom capabilities. See Embed a custom plugin. |
userFlexProperties | (Optional) User properties customized by the developer. |
mediaOptions | (Optional) Media options, including the media encryption configuration, camera video encoder configuration, and screen sharing video encoder configuration. See LaunchMediaOptions for details. |
latencyLevel | (Optional) The latency level of an audience member. This property does not apply to cohosting users. 1 means low latency, where the latency from the sender to the receiver is between 1500 ms and 2000 ms. 2 means ultra-low latency, where the latency from the sender to the receiver is between 400 ms and 800 ms. The default value is 2. |
uiMode | (Optional) The UI theme mode of the classroom. The default value is light, which means a light theme. See FcrMultiThemeMode for details. |
checkStudentScreenShareState | (Optional) Whether to kick students out of the classroom immediately when they stop screen sharing. |
rtcCloudProxyType | (Optional) The cloud proxy type for the RTC service. See AgoraCloudProxyType. |
rtmCloudProxyEnabled | (Optional) Whether to enable cloud proxy for the Signaling service. |
LaunchMediaOptions
export type LaunchMediaOptions = {
cameraEncoderConfiguration?: EduVideoEncoderConfiguration;
screenShareEncoderConfiguration?: EduVideoEncoderConfiguration;
encryptionConfig?: MediaEncryptionConfig;
channelProfile?: ChannelProfile;
web?: {
codec: SDK_CODEC;
mode: SDK_MODE;
};
};Media options, including the media encryption configuration, camera video encoder configuration, and screen sharing video encoder configuration. Set in LaunchOption.
| Property | Description |
|---|---|
cameraEncoderConfiguration | (Optional) The encoding configuration of the video stream captured by the camera. See EduVideoEncoderConfiguration for details. |
screenShareEncoderConfiguration | (Optional) The encoding configuration of the screen sharing stream. See EduVideoEncoderConfiguration for details. |
encryptionConfig | (Optional) The media stream encryption configuration. See MediaEncryptionConfig for details. |
channelProfile | The channel profile configuration. See ChannelProfile for details. |
web | The web configuration for browser codec format and channel mode. codec can be "vp9" for VP9 or "h264" for H.264. mode can be "rtc" for communication mode or "live" for live-streaming mode. |
EduVideoEncoderConfiguration
export interface EduVideoEncoderConfiguration {
width: number;
height: number;
frameRate: number;
bitrate: number;
}The video encoder configuration.
| Property | Description |
|---|---|
width | The width of the video frame in pixels. The default value is 320. |
height | The height of the video frame in pixels. The default value is 240. |
frameRate | The frame rate of the video in FPS. The default value is 15. |
bitrate | The bitrate of the video in Kbps. The default value is 200. |
MediaEncryptionConfig
export declare interface MediaEncryptionConfig {
mode: MediaEncryptionMode;
key: string;
}The media stream encryption configuration used in LaunchMediaOptions.
| Property | Description |
|---|---|
mode | The encryption mode. See MediaEncryptionMode. Teachers and students in the same classroom must use the same encryption mode and key. |
key | The encryption key. |
ChannelProfile
export enum ChannelProfile {
Communication = 0,
LiveBroadcasting = 1,
}The channel profiles, used in LaunchMediaOptions.
| Value | Description |
|---|---|
Communication | Communication mode, commonly used for one-to-one or one-to-many classrooms. |
LiveBroadcasting | Live-streaming mode. This option costs less than communication mode and has a higher latency. |
MediaEncryptionMode
export enum MediaEncryptionMode {
AES_128_XTS = 1,
AES_128_ECB = 2,
AES_256_XTS = 3,
AES_128_GCM = 5,
AES_256_GCM = 6,
}The media stream encryption mode, used in MediaEncryptionConfig.
| Value | Description |
|---|---|
AES_128_XTS | 1: 128-bit AES encryption, XTS mode. |
AES_128_ECB | 2: 128-bit AES encryption, ECB mode. |
AES_256_XTS | 3: 256-bit AES encryption, XTS mode. |
AES_128_GCM | 5: 128-bit AES encryption, GCM mode. |
AES_256_GCM | 6: 256-bit AES encryption, GCM mode. |
FcrMultiThemeMode
export enum FcrMultiThemeMode {
light = 'light',
dark = 'dark',
}The UI theme mode of the classroom, used in LaunchOption.
| Value | Description |
|---|---|
light | Light theme. |
dark | Dark theme. |
EduRoleTypeEnum
export enum EduRoleTypeEnum {
teacher = 1,
student = 2,
}The role of the user in the classroom, used in LaunchOption.
| Value | Description |
|---|---|
teacher | 1: Teacher or proctor. |
student | 2: Student or exam taker. |
EduRoomTypeEnum
export enum EduRoomTypeEnum {
RoomProctor = 6,
}The classroom type, used in LaunchOption.
| Value | Description |
|---|---|
RoomProctor | 6: A proctored exam. In proctoring scenarios, roomType can only be set to this value. |
LanguageEnum
export type LanguageEnum = 'en' | 'zh';The language on the UI, used in LaunchOption.
| Value | Description |
|---|---|
"en" | English. |
"zh" | Chinese. |
DeviceTypeEnum
export enum DeviceTypeEnum {
Main = 'main',
Sub = 'sub',
}Device types.
For more about main devices and secondary devices, see Proctor exams online.
| Value | Description |
|---|---|
Main | Main device. |
Sub | Secondary device. |
AgoraCloudProxyType
The cloud proxy type. Set in LaunchOption.
| Value | Description |
|---|---|
Automatic | 0: Automatic mode. In this mode, the SDK first attempts to connect directly to Agora SDRTN. If the attempt fails, the SDK automatically falls back to sending media over TLS 443. If you are unsure whether the end user's network environment has a firewall, Automatic mode is recommended. |
UDP | 1: UDP. |
TCP | 2: TCP. |
This Swift API reference covers the Agora Proctor SDK APIs for launching and managing Flexible Classroom proctoring scenarios on iOS.
AgoraProctorSDK
AgoraProctorSDK is the basic interface of the Agora Proctor SDK and provides the main methods for a flexible classroom in proctoring scenarios.
init
- (instancetype)init:(AgoraProctorLaunchConfig *)config
delegate:(id<AgoraProctorSDKDelegate> _Nullable)delegate;Initializes the AgoraProctorSDK instance.
Parameters
| Parameter | Description |
|---|---|
config | Configuration for a flexible classroom. See AgoraProctorLaunchConfig. |
delegate | (Optional) The event handler for the Agora Proctor SDK. See AgoraProctorSDKDelegate. |
launch
- (void)launch:(void (^)(void))success
failure:(void (^)(NSError *))failure;Launches a flexible classroom in a proctoring scenario.
Parameters
| Parameter | Description |
|---|---|
success | The callback triggered by a successful launch. |
failure | The callback triggered by a failed launch, which returns an error. |
version
- (NSString *)version;Gets the SDK version.
Returns
The SDK version.
AgoraProctorSDKDelegate
AgoraProctorSDKDelegate reports events related to SDK status to your app.
didExit
- (void)proctorSDK:(AgoraProctorSDK *)proctor
didExit:(AgoraProctorExitReason)reason;This callback is triggered when a user exits or is kicked from the room.
| Parameter | Description |
|---|---|
reason | The reason for the exit. See AgoraProctorExitReason. |
Objects
AgoraProctorLaunchConfig
@interface AgoraProctorLaunchConfig : NSObject
@property (nonatomic, copy) NSString *userName;
@property (nonatomic, copy) NSString *userUuid;
@property (nonatomic, assign) AgoraProctorUserRole userRole;
@property (nonatomic, copy) NSString *roomName;
@property (nonatomic, copy) NSString *roomUuid;
@property (nonatomic, copy) NSString *appId;
@property (nonatomic, copy) NSString *token;
@property (nonatomic, assign) AgoraProctorRegion region;
@property (nonatomic, strong, nullable) AgoraProctorMediaOptions *mediaOptions;
@property (nonatomic, copy, nullable) NSDictionary<NSString *, id> *userProperties;
@property (nonatomic, strong) NSDictionary<NSString *, AgoraWidgetConfig *> *widgets;
- (instancetype)initWithUserName:(NSString *)userName
userUuid:(NSString *)userUuid
userRole:(AgoraProctorUserRole)userRole
roomName:(NSString *)roomName
roomUuid:(NSString *)roomUuid
appId:(NSString *)appId
token:(NSString *)token;
- (instancetype)initWithUserName:(NSString *)userName
userUuid:(NSString *)userUuid
userRole:(AgoraProctorUserRole)userRole
roomName:(NSString *)roomName
roomUuid:(NSString *)roomUuid
appId:(NSString *)appId
token:(NSString *)token
region:(AgoraProctorRegion)region
mediaOptions:(AgoraProctorMediaOptions * _Nullable)mediaOptions
userProperties:(NSDictionary * _Nullable)userProperties;The classroom launching configuration used in launch.
| Property | Description |
|---|---|
userName | The user name for display in the classroom. This value must be less than 64 bytes. |
userUuid | The user ID. This is the globally unique identifier of a user. This value must be the same as the User ID that you use for generating a Signaling token. The string length must be less than 64 bytes. Supported characters include lowercase and uppercase English letters, numbers, spaces, and the symbols listed in the Web userUuid description. |
userRole | The user's role in the classroom. See AgoraProctorUserRole. |
roomName | The room name for display in the classroom. The string length must be less than 64 bytes. |
roomUuid | The room ID. This is the globally unique identifier of a classroom. This value must be less than 64 bytes. Supported characters include lowercase and uppercase English letters, numbers, spaces, and the symbols listed in the Web userUuid description. |
appId | The Agora App ID. See Get the Agora App ID. |
token | The Signaling token used for authentication. See Secure authentication with tokens. |
region | The region where the classrooms are. All clients must use the same region to communicate with each other. Supported regions are CN for Mainland China, NA for North America, EU for Europe, and AP for Asia Pacific. |
mediaOptions | Media options, including the media stream encryption configuration. See AgoraProctorMediaOptions. |
userProperties | User properties customized by the developer. |
widgets | Pass in widgetId and AgoraWidgetConfig. |
AgoraProctorMediaOptions
@interface AgoraProctorMediaOptions : NSObject
@property (nonatomic, strong, nullable) AgoraProctorMediaEncryptionConfig *encryptionConfig;
@property (nonatomic, strong, nullable) AgoraProctorVideoEncoderConfig *videoEncoderConfig;
@property (nonatomic, assign) AgoraProctorLatencyLevel latencyLevel;
- (instancetype)initWithEncryptionConfig:(AgoraProctorMediaEncryptionConfig * _Nullable)encryptionConfig
videoEncoderConfig:(AgoraProctorVideoEncoderConfig * _Nullable)videoEncoderConfig
latencyLevel:(AgoraProctorLatencyLevel)latencyLevel;Media options. Set in AgoraProctorLaunchConfig.
| Property | Description |
|---|---|
encryptionConfig | (Optional) The media stream encryption configuration. See AgoraProctorMediaEncryptionConfig. |
videoEncoderConfig | (Optional) The video encoder configuration. See AgoraProctorVideoEncoderConfig. |
latencyLevel | The latency level of an audience member. This property does not apply to cohosting users. The default value is low, which means low latency. See AgoraProctorLatencyLevel. |
AgoraProctorMediaEncryptionConfig
@interface AgoraProctorMediaEncryptionConfig : NSObject
@property (nonatomic, assign) AgoraProctorMediaEncryptionMode mode;
@property (nonatomic, copy) NSString *key;
- (instancetype)initWithMode:(AgoraProctorMediaEncryptionMode)mode
key:(NSString *)key;The media stream encryption configuration used in AgoraProctorMediaOptions.
| Property | Description |
|---|---|
mode | The encryption mode. See AgoraProctorMediaEncryptionMode. |
key | The encryption key. |
AgoraProctorVideoEncoderConfig
@interface AgoraProctorVideoEncoderConfig : NSObject
@property (nonatomic, assign) NSUInteger dimensionWidth;
@property (nonatomic, assign) NSUInteger dimensionHeight;
@property (nonatomic, assign) NSUInteger frameRate;
@property (nonatomic, assign) NSUInteger bitRate;
@property (nonatomic, assign) AgoraProctorMirrorMode mirrorMode;
- (instancetype)initWithDimensionWidth:(NSUInteger)dimensionWidth
dimensionHeight:(NSUInteger)dimensionHeight
frameRate:(NSUInteger)frameRate
bitRate:(NSUInteger)bitRate
mirrorMode:(AgoraProctorMirrorMode)mirrorMode;The video encoder configuration used in AgoraProctorMediaOptions.
| Property | Description |
|---|---|
dimensionWidth | The width of the video frame in pixels. The default value is 320. |
dimensionHeight | The height of the video frame in pixels. The default value is 240. |
frameRate | The frame rate of the video in FPS. The default value is 15. |
bitRate | The bitrate of the video in Kbps. The default value is 200. |
mirrorMode | Whether video mirror mode is enabled. The default value is AgoraProctorMirrorModeDisable, which means mirror mode is disabled. See AgoraProctorMirrorMode. |
Enums
AgoraProctorMirrorMode
Whether to enable mirror mode, used in AgoraProctorVideoEncoderConfig.
| Value | Description |
|---|---|
disabled | 0: Disable mirror mode. |
enabled | 1: Enable mirror mode. |
AgoraProctorRegion
The region where classrooms are, used in AgoraProctorLaunchConfig.
| Value | Description |
|---|---|
CN | 0: Mainland China. |
NA | 1: North America. |
EU | 2: Europe. |
AP | 3: Asia Pacific. |
AgoraProctorExitReason
The reason for exiting the Agora Proctor SDK, used in the didExit callback.
| Value | Description |
|---|---|
normal | User exits the room normally. |
kickOut | User is kicked out of the room. |
AgoraProctorLatencyLevel
The latency level of an audience member, used in AgoraProctorLaunchConfig.
| Value | Description |
|---|---|
low | 1: Low latency. The latency from the sender to the receiver is between 1500 ms and 2000 ms. |
ultraLow | 2: Ultra-low latency. The latency from the sender to the receiver is between 400 ms and 800 ms. |
AgoraProctorUserRole
The user role in the classroom, used in AgoraProctorLaunchConfig.
| Value | Description |
|---|---|
invalid | 0: Recording robot. |
teacher | 1: Teacher. |
student | 2: Student. |
assistant | 3: Assistant. |
observer | 4: Observer. |
AgoraProctorMediaEncryptionMode
The media stream encryption mode, used in AgoraProctorMediaEncryptionConfig.
| Value | Description |
|---|---|
None | 0: No encryption. |
AES128XTS | 1: 128-bit AES encryption, XTS mode. |
AES128ECB | 2: 128-bit AES encryption, ECB mode. |
AES256XTS | 3: 256-bit AES encryption, XTS mode. |
SM4128ECB | 4: 128-bit SM4 encryption, ECB mode. |
AES128GCM | 5: 128-bit AES encryption, GCM mode. |
AES256GCM | 6: 256-bit AES encryption, GCM mode. |
AES128GCM2 | 7: Enhanced 128-bit AES encryption, GCM mode. Compared with AES128GCM, this mode is more secure and requires setting a salt. |
AES256GCM2 | 8: Enhanced 256-bit AES encryption, GCM mode. Compared with AES256GCM, this mode is more secure and requires setting a salt. |
