UNPKG

agora-classroom-sdk

Version:

For publishing npm package agora-classroom-sdk (Web & Electron). Get more information from https://docs.agora.io

108 lines (107 loc) 3.6 kB
import { AgoraEduClassroomEvent, ConversionOption, EduRoleTypeEnum, EduRoomTypeEnum, EduRtcConfig, Platform, AgoraCloudProxyType } from 'agora-edu-core'; import { AGMediaOptions, AgoraLatencyLevel, AGVideoEncoderConfiguration } from 'agora-rte-sdk'; import { IBaseProcessor, IExtension } from 'agora-rte-extension'; import { CloudDriveResourceConvertProgress } from '../stores/common/cloud-drive/type'; import { FcrMultiThemeMode, AgoraWidgetBase } from 'agora-common-libs'; export declare type AgoraRegion = Uppercase<AgoraRegionString>; export declare const regionMap: { readonly AP: "sg"; readonly CN: "cn-hz"; readonly EU: "gb-lon"; readonly NA: "us-sv"; }; export declare type AgoraRegionString = 'cn' | 'ap' | 'na' | 'eu'; export declare type ListenerCallback = (evt: AgoraEduClassroomEvent, ...args: unknown[]) => void; export declare enum WindowID { Main = "main", VideoGallery = "video-gallery" } export declare type LanguageEnum = 'en' | 'zh'; export declare type TranslateEnum = '' | 'auto' | 'zh-CHS' | 'en' | 'ja' | 'ko' | 'fr' | 'es' | 'pt' | 'it' | 'ru' | 'vi' | 'de' | 'ar'; export declare type ConfigParams = { appId: string; region?: string; }; export declare type LaunchMediaOptions = AGMediaOptions & { lowStreamCameraEncoderConfiguration?: AGVideoEncoderConfiguration; }; export declare type ConvertMediaOptionsConfig = EduRtcConfig & { defaultLowStreamCameraEncoderConfigurations?: AGVideoEncoderConfiguration; }; /** * LaunchOption 接口 */ export declare 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; courseWareList: CourseWareList; recordUrl?: string; widgets?: { [key: string]: typeof AgoraWidgetBase; }; userFlexProperties?: { [key: string]: unknown; }; mediaOptions?: LaunchMediaOptions; latencyLevel?: AgoraLatencyLevel; platform?: Platform; recordOptions?: BoardWindowAnimationOptions; recordRetryTimeout?: number; uiMode?: FcrMultiThemeMode; shareUrl?: string; virtualBackgroundImages?: string[]; virtualBackgroundVideos?: string[]; webrtcExtensionBaseUrl?: string; rtcCloudProxyType?: AgoraCloudProxyType; rtmCloudProxyEnabled?: boolean; }; /** * 运行窗口选项 */ export declare type LaunchWindowOption = { windowID: WindowID; language: LanguageEnum; args: any; roomType: EduRoomTypeEnum; uiMode: FcrMultiThemeMode; }; export declare type CourseWareItem = { resourceName: string; resourceUuid: string; ext: string; url?: string; size: number; updateTime: number; taskUuid?: string; taskProgress?: CloudDriveResourceConvertProgress; conversion?: ConversionOption; initOpen?: boolean; }; export declare type CourseWareList = CourseWareItem[]; export declare type BoardWindowAnimationOptions = { minFPS?: number; maxFPS?: number; resolution?: number; autoResolution?: boolean; autoFPS?: boolean; maxResolutionLevel?: number; forceCanvas?: boolean; }; export declare type ExtensionInitializer = { createInstance: () => IExtension<IBaseProcessor>; createProcessor: (extension: IExtension<IBaseProcessor>) => Promise<IBaseProcessor>; }; export declare type ProcessorInitializer<T extends IBaseProcessor> = { name: string; createProcessor: () => Promise<T>; };