/* * @Date: 2020-07-01 09:20:05 * @LastEditors: GWK * @LastEditTime: 2020-07-22 19:26:50 * @FilePath: /Web_SDK/src/wx/globals.d.ts */ declare var wx: any; declare namespace wxOptions { export interface OctopusRTC { userId: string; appId?: string; logLevel?: number; mode?: "octopus" | "zego" | "auto"; env?: "test" | "production"; userName?: string; mediaType?: 0 | 1 | 2; } // octopusClient export interface octopusConfig { LOGURL: string; VENDORURL: string; CENTERURL: string; APPID: string; SDKVERSION: any; OS: string; ipInfo?: any; } export interface octopusClient extends OctopusRTC { octopusConfig?: octopusConfig; // emit: any } // signal connect export interface Signal extends octopusClient { token: string; emit?: any; roomId: string; octopusConfig?: octopusConfig; onKickOut?: () => void; onDisconnect?: () => void; onStreamUpdated?: () => void; onPublishStateUpdate?: () => void; onPlayStateUpdate?: () => void; } } declare namespace wxExportsData { export interface loginSuccessResult { streamId?: string; userId?: string; roomId?: string; } export interface errorMsg { code?: number; msg?: string; } } declare namespace wxSignalingRetFormat { export interface streamInfo { streamId?: string; userId?: string; roomId?: string; } export interface joinRoom { role: 1 | 2; mediaType: 0 | 1 | 2; success: (streamList: streamInfo[]) => void; error?: (err: exportsData.errorMsg) => void; } } declare namespace wxSignalingResponse { interface message { code: number; msg: any; s: number; cmd?: string; } export interface receiveData { data: string } }