类型定义
本页列出 iOS API 所有的类型定义。
AgoraEduContextRoomType
房间类型。
枚举值
- oneToOne
- 一对一互动教学
- small
- 在线互动小班课
- lecture
- 互动直播大班课
AgoraEduContextVideoRenderMode
视频渲染模式。
枚举值
- hidden
- Hidden 模式。优先保证视窗被填满。视频尺寸等比缩放,直至整个视窗被视频填满。如果视频长宽与显示窗口不同,多出的视频将被截掉。
- fit
- Fit 模式。优先保证视频内容全部显示。视频尺寸等比缩放,直至视频窗口的一边与视窗边框对齐。如果视频长宽与显示窗口不同,视窗上未被填满的区域将被涂黑。
AgoraEduContextVideoSourceType
视频源类型。
枚举值
- none
- 无视频
- camera
- 摄像头采集的视频
- screen
- 屏幕共享的视频
AgoraEduContextAudioSourceType
音频源类型。
枚举值
- none
- 无音频
- camera
- 麦克风采集的音频
AgoraEduContextMediaStreamType
媒体流类型。
枚举值
- none
- 既无音频也无视频
- audio
- 纯音频流
- video
- 纯视频流
- both
- 音视频流
AgoraEduContextVideoStreamSubscribeLevel
视频流的分辨率高低。
枚举值
- low
- 分辨率低的视频流
- high
- 分辨率高的视频流
AgoraEduContextDeviceType
设备类型。
枚举值
- camera
- 摄像头
- mic
- 麦克风
- speaker
- 扬声器
AgoraEduContextMediaSourceState
媒体源状态。
枚举值
- error
- 媒体源错误
- close
- 媒体源关闭
- open
- 媒体源开启
AgoraEduContextDeviceState
设备状态
枚举值
- error
- 设备错误
- close
- 设备关闭
- open
- 设备开启
AgoraEduContextUserLeaveReason
用户离开房间原因。
枚举值
- normal
- 用户正常离开房间。
- kickOut
- 用户被踢出房间。
AgoraEduContextClassState
课堂状态。
枚举值
- before
- 课堂还未开始。
- during
- 课堂进行中。
- after
- 课堂已结束。
AgoraEduContextConnectionState
本地客户端与声网服务器的连接状态。
枚举值
- disconnected
- 连接已断开。
- connecting
- 连接中。
- connected
- 已连接。
- reconnecting
- 重连中。
- aborted
- 被踢出。
AgoraEduContextUserRole
用户角色。
枚举值
- teacher
- 老师
- student
- 学生
- assistant
- 助教
AgoraEduContextNetworkQuality
网络质量。
枚举值
- unknown
- 未知
- good
- 良好
- medium
- 中等
- bad
- 差
AgoraEduContextSystemDevice
系统设备。
枚举值
- frontCamera
- 前置摄像头
- backCamera
- 后置摄像头
- mic
- 麦克风
- speaker
- 扬声器
FcrMediaRawDataOperationMode
对媒体原始数据的操作权限。
枚举值
- readOnly
- 只读模式
FcrAudioRawDataPosition
音频管线节点。
枚举值
- record
2
:录制后- beforeMixed
8
:多条远端音频流被混合成一路音频流前- mixed
4
:所有远端与本地音频流都已混合成一路音频流
FcrRecordingState
录制状态。
枚举值
- stopped
- 不在录制中
- starting
- 录制启动中
- started
- 正在录制中
AgoraEduContextRenderConfig
AgoraEduContextStreamInfo
流信息。
属性
- streamUuid
- 流 ID,String 型。
- streamName
- 流名称,String 型。
- streamType
- 流类型,详见 AgoraEduContextMediaStreamType。
- videoSourceType
- 视频源类型,详见 AgoraEduContextVideoSourceType。
- audioSourceType
- 音频源类型,详见 AgoraEduContextAudioSourceType。
- videoSourceState
- 视频源状态,详见 AgoraEduContextMediaSourceState。
- audioSourceState
- 音频源状态,详见 AgoraEduContextMediaSourceState。
- owner
- 流所属的用户,详见 AgoraEduContextUserInfo。
AgoraEduContextUserInfo
用户基础信息。
属性
- userUuid
- 用户 ID,String 型。
- userName
- 用户名称,String 型。
- role
- 用户角色,详见 AgoraEduContextUserRole。
- rewardCount
- 收到的奖励次数,Int16 型。
AgoraEduContextDeviceInfo
AgoraEduContextRoomInfo
AgoraEduContextClassInfo
课堂信息。
属性
- state
- 课堂状态,详见 AgoraEduContextClassState。
- startTime
- 课堂开始时间,Int64 型。
- duration
- 课堂时长,Int64 型。
- closeDelay
- 拖堂时长,Int64 型。
AgoraEduContextVideoStreamConfig
视频流配置。
属性
- dimensionWidth
- 视频宽,Int 型,单位为 pixel,默认值为 320。
- dimensionHeight
- 视频高,Int 型,单位为 pixel,默认值为 240。
- frameRate
- 视频帧率,Int 型,单位为 fps,默认值为 15。
- bitRate
- 视频码率,Int 型,单位为 Kbps,默认值为 200。
- isMirror
- 视频是否镜像,Bool 型,默认值为 NO。
AgoraEduContextError
错误。
属性
- code
- 错误码,Int 型。
- message
- 错误信息,String 型。
AgoraEduContextGroupInfo
分组信息。
属性
- state
- 是否开启分组讨论。
AgoraEduContextSubRoomInfo
子房间信息。
属性
- subRoomUuid
- 子房间 ID。
- subRoomName
- 子房间名称。
AgoraEduContextSubRoomCreateConfig
子房间创建配置。
属性
- subRoomName
- 子房间名称。
- invitationUserList
- 邀请加入子房间的用户 ID 列表。可为空。
- subRoomProperties
- 子房间自定义属性,可为空。
FcrAudioRawDataConfig
需要回调出的音频数据配置。
属性
- sampleRate
- 采样率,可设为 8000,16000,32000,44100 或 48000。默认值 48000。
- samplesPerChannel
- 每次回调时每个声道的样本点个数。默认值 1024。
- channels
- 单声道或双声道。默认值 1。
- mode
- 对音频数据的操作权限,详见 FcrMediaRawDataOperationMode。默认值 read only。
FcrAudioRawData
音频数据。
属性
- samplesPerChannel
- 每个声道的采样点数。
- bytesPerSample
- 每个样本的字节数,2 字节。
- channels
- 声道数。
- sampleRate
- 采样率。
- buffer
- 指向音频数据内存的指针。buffer 的长度(字节) = (samplesPerChannel * channels * bytesPerSample)
- timestamp
- 时间戳,单位毫秒。
FcrSnapshotInfo
截图信息。
参数
- roomUuid
- 房间 ID。
- streamUuid
- 流 ID
- filePath
- 截图保存地址。
- width
- 图片宽度。
- height
- 图片高度。