Type definition

This page lists all the type definitions of the iOS API.

AgoraEduContextRoomType

The classroom type.

Enumerator

oneToOne
One-to-one Classroom
small
Small Classroom
lecture
Lecture Hall

AgoraEduContextVideoRenderMode

Video rendering mode.

Enumerator

hidden
Hidden mode. This mode ensures the window is filled. The SDK uniformly scales the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents.
fit
Fit mode. This mode ensures that all video content is displayed. The SDK uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to the disparity in the aspect ratio are filled with black.

AgoraEduContextVideoSourceType

The video source type.

Enumerator

none
No video
camera
Video captured by the camera
screen
Video of the shared screen

AgoraEduContextMediaStreamType

The stream type.

Enumerator

none
The stream contains neither audio nor video.
audio
Audio-only stream.
video
Video-only stream.
both
The stream contains both audio and video.

AgoraEduContextMediaSourceState

The media source state.

Enumerator

error
An error occurs in the media source.
close
The media source is off.
open
The media source is on.

AgoraEduContextDeviceState

The device state.

Enumerator

error
An error occurs in the device.
close
The device is off.
open
The device is on.

AgoraEduContextUserLeaveReason

The reason why the user leaves the room.

Enumerator

normal
The user leaves the room normally.
kickOut
The user is kicked out of the room.

AgoraEduContextClassState

The class state.

Enumerator

before
The class has not been started.
during
The class is in progress.
after
The class has ended.

AgoraEduContextConnectionState

The connection state between the local client and the Agora server.

Enumerator

disconnected
The local client disconnects from the Agora server.
connecting
The local client is connecting to the Agora server.
connected
The local client is connected to the Agora server.
reconnecting
The local client is reconnecting to the Agora server.
aborted
The connection is aborted.

AgoraEduContextUserRole

The user role.

Enumerator

teacher
Teacher
student
Student
assistant
Teaching assistant (TA)

AgoraEduContextStreamInfo

The stream information.


            
            
            

Attributes

streamUuid
The stream ID, String.
streamName
The stream name, String.
streamType
The stream type. See AgoraEduContextMediaStreamType.
videoSourceType
The video source type. See AgoraEduContextVideoSourceType.
audioSourceType
The audio source type. See AgoraEduContextAudioSourceType.
videoSourceState
The video source state. See AgoraEduContextMediaSourceState.
audioSourceState
The audio source status. See AgoraEduContextMediaSourceState.
owner
The owner of the stream. See AgoraEduContextUserInfo.

AgoraEduContextUserInfo

The basic user information.


            
            
            

Attributes

userUuid
The user ID, String.
userName
The user name,String.
role
The user role. See AgoraEduContextUserRole.
rewardCount
The number of rewards that the user receives, Int16.

AgoraEduContextClassInfo

The classroom information.


            
            
            

Attributes

state
The class state. See AgoraEduContextClassState.
startTime
The class start time, Int64.
duration
The class duration, Int64.
closeDelay
How long the class can last after it ends, Int64.

AgoraEduContextVideoStreamConfig

Video configurations.


            
            
            

Attributes

dimensionWidth
The video width (pixel) in Int. The default value is 320.
dimensionHeight
The video height (pixel) in Int. The default value is 240.
frameRate
The frame rate (fps) in Int. The default value is 15.
bitrate
The bitrate (Kbps) in Int. The default value is 200.
isMirror
Whether the video is mirrored. Bool. The default value is NO.

AgoraEduContextError

Error.


            
            
            

Attributes

code
The error code, Int.
message
The error message, String.

AgoraEduContextSubRoomInfo

The information about a sub-room.


            
            
            

Attributes

subRoomUuid
The sub-room ID.
subRoomName
The sub-room name.

AgoraEduContextSubRoomCreateConfig

The configuration of creating a sub-room.


            
            
            

Attributes

subRoomName
The sub-room name.
invitationUserList
The list of user IDs who are invited to join the sub-room. This parameter can be null.
subRoomProperties
The custom properties of the sub-room. This parameter can be null.

FcrAudioRawDataConfig

Configuration of the audio data.


            
             

Attributes

sampleRate
The sample rate of the audio data. You can set it as 8000, 16000, 32000, 44100 or 48000. The default value is 48000.
samplesPerChannel
The number of samples per channel of the audio data. The default value is 1024.
channels
The number of channels. The default value is 1.
mode
The operation mode to the audio data: FcrMediaRawDataOperationMode.

FcrAudioRawData

The raw audio data.


            
             

Attributes

samplesPerChannel
The number of samples per channel.
bytesPerSample
The number of bytes per sample.
channels
The number of channels.
sampleRate
The sample rate.
buffer
Pointer to the audio data. The length of the buffer (in bytes) = (samplesPerChannel * channels * bytesPerSample).
timestamp
The timestamp (ms).

FcrMediaPacketStats

Statistics of the media packet.

@objcMembers public class FcrMediaPacketStats: NSObject {
    public let lastMileDelay: Int
    public let txPacketLossRate: Int
    public let rxPacketLossRate: Int
    
    public init(lastMileDelay: Int,
                txPacketLossRate: Int,
                rxPacketLossRate: Int) {
        self.lastMileDelay = lastMileDelay
        self.txPacketLossRate = txPacketLossRate
        self.rxPacketLossRate = rxPacketLossRate
    }
}
Since
v2.8.60

Attributes

lastMileDelay
The client-to-server delay (milliseconds).
txPacketLossRate
The packet loss rate (%) from the client to the Agora server.
rxPacketLossRate
The packet loss rate (%) from the Agora server to the client.

FcrPerformanceInfo

The performance information.

@objcMembers public class FcrPerformanceInfo: NSObject {
    public let cpuTotalUsage: Double
    public let cpuAppUsage: Double
    public let memoryAppUsageRatio: Double
    public let memoryTotalUsageRatio: Double
    public let memoryAppUsageInKbytes: Int
   
    public init(cpuTotalUsage: Double,
                cpuAppUsage: Double,
                memoryAppUsageRatio: Double,
                memoryTotalUsageRatio: Double,
                memoryAppUsageInKbytes: Int) {
        self.cpuTotalUsage = cpuTotalUsage
        self.cpuAppUsage = cpuAppUsage
        self.memoryAppUsageRatio = memoryAppUsageRatio
        self.memoryTotalUsageRatio = memoryTotalUsageRatio
        self.memoryAppUsageInKbytes = memoryAppUsageInKbytes
    }
}
Since
v2.8.60

Attributes

cpuTotalUsage
The system CPU usage (%).
cpuAppUsage
The app CPU usage (%).
memoryAppUsageRatio
The memory ratio occupied by the app (%).
memoryTotalUsageRatio
The memory ratio occupied by the system (%).
memoryAppUsageInKbytes
The memory size occupied by the app (KB).

FcrAudioRawDataPosition

The position of the audio data in the pipeline.

Enumerator

record
2: After recording.
beforeMixed
8: Before audio data from multiple audio streams is mixed for playback.
mixed
4: After remote audio and local audio is mixed.