UNPKG

yirtc-sdk-web

Version:

基于WebRTC的实时音视频SDK

48 lines (47 loc) 1.25 kB
/** * 适配器工厂 * 用于创建不同类型的适配器实例 */ import { SignalingInterface, SignalingConfig } from './signaling/interface'; import { RTCInterface } from './rtc/interface'; import { MediaInterface } from './media/interface'; /** * 信令适配器类型 */ export declare enum SignalingType { WEBSOCKET = "websocket", SOCKET_IO = "socket.io", CUSTOM = "custom" } /** * 平台类型 */ export declare enum PlatformType { WEB = "web", ANDROID = "android", IOS = "ios" } /** * 适配器工厂类 */ export declare class AdapterFactory { /** * 创建信令适配器 * @param type 信令适配器类型 * @param config 信令配置 * @returns SignalingInterface */ static createSignalingAdapter(type: SignalingType, config: SignalingConfig): SignalingInterface; /** * 创建RTC适配器 * @param platform 平台类型 * @returns RTCInterface */ static createRTCAdapter(platform: PlatformType): RTCInterface; /** * 创建媒体适配器 * @param platform 平台类型 * @returns MediaInterface */ static createMediaAdapter(platform: PlatformType): MediaInterface; }