UNPKG

fcr-core

Version:

Core APIs for building online scenes

43 lines (42 loc) 1.38 kB
import { AgoraRteEngine, AgoraRteScene, AgoraRteEntryRoomResponse } from '../imports'; import { FcrCoreServiceApi } from '../service/api'; import { FcrCoreEngineConfig } from '../type'; import { FcrChatConnection } from '../chat-connection/type'; import { FcrSharedCache } from './shared-cache'; import { FcrRoomType } from './type'; /** * 房间控制的创建参数 */ export interface RoomControlCreationParams { engine: AgoraRteEngine; scene: AgoraRteScene; apiService: FcrCoreServiceApi; config: FcrCoreEngineConfig; chatConnection: FcrChatConnection; sharedCache: FcrSharedCache; roomResponse: AgoraRteEntryRoomResponse; } /** * 房间控制工厂类 * 负责根据房间类型创建相应的房间控制实例 */ export declare class RoomControlFactory { /** * 创建房间控制实例 * @param params 创建参数 * @returns 房间控制实例 * @throws {FcrError} 当房间类型不支持时抛出错误 */ static create(params: RoomControlCreationParams): any; /** * 验证房间类型是否受支持 * @param roomType 房间类型 * @returns 是否支持 */ static isRoomTypeSupported(roomType: FcrRoomType): boolean; /** * 获取所有支持的房间类型 * @returns 支持的房间类型数组 */ static getSupportedRoomTypes(): FcrRoomType[]; }