UNPKG

agora-edu-core

Version:

Core APIs for building an online classroom

489 lines (488 loc) 8.41 kB
import type { AgoraRteAudioSourceType, AgoraRteMediaPublishState, AgoraRteMediaSourceState, AgoraRteVideoSourceType } from 'agora-rte-sdk'; /** * 房间连接状态 */ /** @en * Room connection state */ export declare enum ClassroomState { /** * 未连接 */ /** @en * Not connected */ Idle = 0, /** * 正在连接 */ /** @en * Connecting */ Connecting = 1, /** * 已连接 */ /** @en * Connected */ Connected = 2, /** * 正在重练 */ /** @en * Reconnecting */ Reconnecting = 3, /** * 连接出错 */ /** @en * Error occurred while connecting */ Error = 4 } /** * 房间类型 */ /** @en * Edu room type enum */ export declare enum EduRoomTypeEnum { /** * 一对一 */ /** @en * One to one classroom */ Room1v1Class = 0, /** * 小班课 */ /** @en * Small classroom */ RoomSmallClass = 4, /** * 大班课 */ /** @en * Lecture hall */ RoomBigClass = 2, /** * 自习室 */ /** @en * Study room */ RoomStudy = 7, /** * @internal */ /** @en * * @internal */ RoomGroup = 101, /** * 监考场景 */ /** @en * Cloud examination room */ RoomProctor = 6, /** * 云课堂 */ /** @en * Cloud class room */ CloudClass = 10 } /** * 角色类型 */ /** @en * Edu role type enum */ export declare enum EduRoleTypeEnum { /** * 空 */ /** @en * None */ none = -1, /** * 观众(录制) */ /** @en * Invisible(Recorder) */ invisible = 0, /** * 老师 */ /** @en * Teacher */ teacher = 1, /** * 学生 */ /** @en * Student */ student = 2, /** * 助教 */ /** @en * Assistant */ assistant = 3, /** * 监课 */ /** @en * Observer */ observer = 4 } /** * 房间 Session 信息。 */ /** @en * Represents the information of an education session. */ export interface EduSessionInfo { /** * 房间 UUID */ /** @en * The UUID of the room. */ roomUuid: string; /** * 房间名 */ /** @en * The name of the room. */ roomName: string; /** * 房间类型 */ /** @en * The type of the room. */ roomType: EduRoomTypeEnum; /** * The UUID of the user. */ /** @en * The UUID of the user. */ userUuid: string; /** * 用户名 */ /** @en * The name of the user. */ userName: string; /** * 用户角色 */ /** @en * The role of the user. */ role: EduRoleTypeEnum; /** * 鉴权令牌 */ /** @en * The token for authentication. */ token: string; /** * 自定义属性 */ /** @en * Flexible properties. */ flexProperties: any; /** * 房间时长 */ /** @en * The duration of the room. */ duration: number; /** * 房间开始时间 */ /** @en * The start time of the room. */ startTime?: number; /** * 房间模板 */ /** @en * Room template */ roomTemplate?: string; } /** * 教育事件类型 */ /** @en * Edu event type */ export declare enum AgoraEduEventType { classroomEvents = "classroom-events" } /** * 教室事件 */ /** @en * Classroom Events */ export declare enum AgoraEduClassroomEvent { /** * 进入教室成功 */ /** @en * Joined the classroom */ Ready = 1, /** * 教室销毁 */ /** @en * Classroom is destroyed */ Destroyed = 2, /** * 进入教室失败 */ /** @en * Failed to join the classroom */ FailedToJoin = 3, /** * 被踢出教室 */ /** @en * Kicked out of the classroom by teacher */ KickOut = 101, /** * 老师允许学生打开麦克风 */ /** @en * The teacher allowed the students to turn on the microphone */ TeacherTurnOnMyMic = 102, /** * 老师不允许学生打开麦克风 */ /** @en * The teacher disallowed the students to turn on the microphone */ TeacherTurnOffMyMic = 103, /** * 当前用户上台 */ /** @en * The current user has became on stage */ UserAcceptToStage = 106, /** * 当前用户下台 */ /** @en * The current user has left stage */ UserLeaveStage = 107, /** * 用户收到奖励 */ /** @en * Users receive rewards */ RewardReceived = 108, /** * 老师允许学生打开摄像头 */ /** @en * The teacher allowed the students to turn on the camera */ TeacherTurnOnMyCam = 109, /** * 老师不允许学生打开摄像头 */ /** @en * The teacher disallowed the students to turn on the camera */ TeacherTurnOffMyCam = 110, /** * 摄像头被拔出 */ /** @en * Camera pulled out */ CurrentCamUnplugged = 111, /** * 麦克风被拔出 */ /** @en * Microphone pulled out */ CurrentMicUnplugged = 112, /** * 扬声器被拔出 */ /** @en * Speaker pulled out */ CurrentSpeakerUnplugged = 113, /** * 用户未授权屏幕共享 */ /** @en * The user does not authorize screen sharing */ CaptureScreenPermissionDenied = 114, /** * 用户收到奖励(通过批量接口) */ /** @en * Users receive rewards(through batched API) */ BatchRewardReceived = 117, /** * 被邀请至小组 */ /** @en * Being invited to the group */ InvitedToGroup = 118, /** * 用户被移动至小组 */ /** @en * User moved to other group */ MoveToOtherGroup = 119, /** * 当前用户加入分组 */ /** @en * Current user joined to the group */ JoinSubRoom = 120, /** * 用户离开分组 */ /** @en * Current user left the group */ LeaveSubRoom = 121, /** * 用户接收小组邀请 */ /** @en * Users receive group invitations */ AcceptedToGroup = 122, /** * 用户加入小组通知 */ /** @en * Notification of a user joining a group */ UserJoinGroup = 123, /** * 用户离开小组通知 */ /** @en * Notification of a user leaving a group */ UserLeaveGroup = 124, /** * 用户拒绝小组邀请 */ /** @en * User rejected invitation from joining group */ RejectedToGroup = 125, /** * RTC 连接状态变更 */ /** @en * The state of RTC channel is changed */ RTCStateChanged = 201, /** * 房间连接状态变更 */ /** @en * The state of the classroom connection is changed */ ClassStateChanged = 202 } export declare enum AgoraCommandEnum { UserRewardChanged = 1101 } /** * 业务流状态 */ export interface AgoraStreamStates { /** * 视频设备类型 */ /** @en * Video device type */ videoSourceType: AgoraRteVideoSourceType; /** * 音频设备类型 */ /** @en * Audio device type */ audioSourceType: AgoraRteAudioSourceType; /** * 视频轨道发布状态 */ /** @en * Publish state of video track */ videoState: AgoraRteMediaPublishState; /** * 音频轨道发布状态 */ /** @en * Publish state of audio track */ audioState: AgoraRteMediaPublishState; /** * 视频设备开关状态 */ /** @en * State of video device */ videoSourceState: AgoraRteMediaSourceState; /** * 音频设备开关状态 */ /** @en * State of audio device */ audioSourceState: AgoraRteMediaSourceState; } export { AgoraCloudProxyType } from 'agora-rte-sdk'; export type { AgoraCloudProxyObserver } from 'agora-rte-sdk';