UNPKG

kd-deliver-api-3dcat

Version:

KD-DELIVER-API-3DCAT

62 lines (61 loc) 1.87 kB
/** * 引擎方法类 */ import { ResponseMessageInfo } from '../../../model/ResponseMessage'; declare class InitClientSocket { static ws: any; static websocketInstance: any; static websocketsucess: Boolean; static remoteClient: any; static removeStream: any; static removePlayDom: any; static receiveChannel: any; static promisePool: any; static setTimeoutWs: any; static poster: any; static launch: any; static connection: any; static livePlayer: any; static mode: any; /** * 初始化引擎 * @param renderId 渲染3D场景的 Dom节点id * @param address 连接地址 * @param appKey 应用Key * @param startType 1:普通连接 | 3:投屏连接 */ static init(param: { renderId: string; address: string; appKey: string; startType: number; toggleFullscreen?: boolean; fullscreenType?: number; mode?: string; startBitrate?: number; }): Promise<string>; static WebSocketInit(url: string, port: any, channel: string, session?: boolean): void; /** * webRtc关闭 */ static close(): Promise<string>; /** * 监听事件处理 * @param eventName 事件名称 * @param cb 事件回调 */ static customEventListener(eventName: string, cb: any): void; /** * 移除监听事件处理 * @param eventName 事件名称 */ static removeCustomEventlistener(eventName: string): void; } /** * 请求事件发送 * @param packageName 事件场景 * @param action 事件编码 * @param data 请求消息 */ declare const sendEvent: (packageName: string, action: string, data: string | number, rtc?: boolean) => Promise<ResponseMessageInfo>; export { InitClientSocket, sendEvent, };