|
@@ -81,8 +81,10 @@ declare module '@urtc/sdk-web' {
|
|
|
export * from '__@urtc/sdk-web/stream/local-stream';
|
|
export * from '__@urtc/sdk-web/stream/local-stream';
|
|
|
export * from '__@urtc/sdk-web/stream/remote-stream';
|
|
export * from '__@urtc/sdk-web/stream/remote-stream';
|
|
|
export * from '__@urtc/sdk-web/server';
|
|
export * from '__@urtc/sdk-web/server';
|
|
|
|
|
+ export * from '__@urtc/sdk-web/plugin';
|
|
|
export * from '__@urtc/sdk-web/version';
|
|
export * from '__@urtc/sdk-web/version';
|
|
|
/************** 4 plugin ****************/
|
|
/************** 4 plugin ****************/
|
|
|
|
|
+ export { Client };
|
|
|
export { LocalStream };
|
|
export { LocalStream };
|
|
|
export { RemoteStream } from '__@urtc/sdk-web/stream/remote-stream';
|
|
export { RemoteStream } from '__@urtc/sdk-web/stream/remote-stream';
|
|
|
}
|
|
}
|
|
@@ -94,11 +96,18 @@ declare module '__@urtc/sdk-web/client' {
|
|
|
import { RemoteStream } from '__@urtc/sdk-web/stream/remote-stream';
|
|
import { RemoteStream } from '__@urtc/sdk-web/stream/remote-stream';
|
|
|
import { User } from '__@urtc/sdk-web/user/user';
|
|
import { User } from '__@urtc/sdk-web/user/user';
|
|
|
import { JoinOptions, RoleType } from '__@urtc/sdk-web/types';
|
|
import { JoinOptions, RoleType } from '__@urtc/sdk-web/types';
|
|
|
|
|
+ import { ClientPlugin } from '__@urtc/sdk-web/plugin';
|
|
|
/**
|
|
/**
|
|
|
* URTC 客户端,可进行加入、离开房间,发布、订阅流等操作。
|
|
* URTC 客户端,可进行加入、离开房间,发布、订阅流等操作。
|
|
|
*/
|
|
*/
|
|
|
export class Client {
|
|
export class Client {
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * 加载 Client 插件,使用插件功能
|
|
|
|
|
+ * @param plugin - 插件
|
|
|
|
|
+ * @param options - 插件初始化参数
|
|
|
|
|
+ */
|
|
|
|
|
+ static use(plugin: ClientPlugin, options?: any): void;
|
|
|
|
|
+ /**
|
|
|
* 获取远端用户信息
|
|
* 获取远端用户信息
|
|
|
* @example
|
|
* @example
|
|
|
* ```js
|
|
* ```js
|
|
@@ -268,10 +277,11 @@ declare module '__@urtc/sdk-web/client' {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
declare module '__@urtc/sdk-web/stream/local-stream' {
|
|
declare module '__@urtc/sdk-web/stream/local-stream' {
|
|
|
- import { Stream, StreamPlugin } from '__@urtc/sdk-web/stream/stream';
|
|
|
|
|
|
|
+ import { Stream } from '__@urtc/sdk-web/stream/stream';
|
|
|
import { PlayOptions } from '__@urtc/sdk-web/types';
|
|
import { PlayOptions } from '__@urtc/sdk-web/types';
|
|
|
import { SwitchDeviceType } from '__@urtc/sdk-web/stream/types';
|
|
import { SwitchDeviceType } from '__@urtc/sdk-web/stream/types';
|
|
|
import { VideoProfile, ScreenProfile, CustomVideoProfile } from '__@urtc/sdk-web/stream/profile';
|
|
import { VideoProfile, ScreenProfile, CustomVideoProfile } from '__@urtc/sdk-web/stream/profile';
|
|
|
|
|
+ import { StreamPlugin } from '__@urtc/sdk-web/plugin';
|
|
|
/**
|
|
/**
|
|
|
* 创建本地流的参数
|
|
* 创建本地流的参数
|
|
|
*/
|
|
*/
|
|
@@ -1063,13 +1073,6 @@ declare module '__@urtc/sdk-web/stream/stream' {
|
|
|
import { PlayOptions } from '__@urtc/sdk-web/types';
|
|
import { PlayOptions } from '__@urtc/sdk-web/types';
|
|
|
import { MediaType, StreamStats } from '__@urtc/sdk-web/stream/types';
|
|
import { MediaType, StreamStats } from '__@urtc/sdk-web/stream/types';
|
|
|
/**
|
|
/**
|
|
|
- * @public
|
|
|
|
|
- */
|
|
|
|
|
- export interface StreamPlugin {
|
|
|
|
|
- name: string;
|
|
|
|
|
- install: Function;
|
|
|
|
|
- }
|
|
|
|
|
- /**
|
|
|
|
|
* LocalStream 和 RemoteStream 的基类
|
|
* LocalStream 和 RemoteStream 的基类
|
|
|
*/
|
|
*/
|
|
|
export class Stream extends EventEmitter {
|
|
export class Stream extends EventEmitter {
|
|
@@ -1235,7 +1238,8 @@ declare module '__@urtc/sdk-web/stream/stream' {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
declare module '__@urtc/sdk-web/stream/remote-stream' {
|
|
declare module '__@urtc/sdk-web/stream/remote-stream' {
|
|
|
- import { Stream, StreamPlugin } from '__@urtc/sdk-web/stream/stream';
|
|
|
|
|
|
|
+ import { Stream } from '__@urtc/sdk-web/stream/stream';
|
|
|
|
|
+ import { StreamPlugin } from '__@urtc/sdk-web/plugin';
|
|
|
/**
|
|
/**
|
|
|
* 远端流,房间内其他用户发布的流,可通过 client 进行订阅
|
|
* 远端流,房间内其他用户发布的流,可通过 client 进行订阅
|
|
|
*/
|
|
*/
|
|
@@ -1315,6 +1319,23 @@ declare module '__@urtc/sdk-web/server' {
|
|
|
export function setServers(conf: ServerConfig): void;
|
|
export function setServers(conf: ServerConfig): void;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+declare module '__@urtc/sdk-web/plugin' {
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @public
|
|
|
|
|
+ */
|
|
|
|
|
+ export interface StreamPlugin {
|
|
|
|
|
+ name: string;
|
|
|
|
|
+ install: Function;
|
|
|
|
|
+ }
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @public
|
|
|
|
|
+ */
|
|
|
|
|
+ export interface ClientPlugin {
|
|
|
|
|
+ name: string;
|
|
|
|
|
+ install: Function;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
declare module '__@urtc/sdk-web/version' {
|
|
declare module '__@urtc/sdk-web/version' {
|
|
|
/**
|
|
/**
|
|
|
* 当前 sdk 的版本号
|
|
* 当前 sdk 的版本号
|
|
@@ -1517,8 +1538,10 @@ declare module '__@urtc/sdk-web/' {
|
|
|
export * from '__@urtc/sdk-web/stream/local-stream';
|
|
export * from '__@urtc/sdk-web/stream/local-stream';
|
|
|
export * from '__@urtc/sdk-web/stream/remote-stream';
|
|
export * from '__@urtc/sdk-web/stream/remote-stream';
|
|
|
export * from '__@urtc/sdk-web/server';
|
|
export * from '__@urtc/sdk-web/server';
|
|
|
|
|
+ export * from '__@urtc/sdk-web/plugin';
|
|
|
export * from '__@urtc/sdk-web/version';
|
|
export * from '__@urtc/sdk-web/version';
|
|
|
/************** 4 plugin ****************/
|
|
/************** 4 plugin ****************/
|
|
|
|
|
+ export { Client };
|
|
|
export { LocalStream };
|
|
export { LocalStream };
|
|
|
export { RemoteStream } from '__@urtc/sdk-web/stream/remote-stream';
|
|
export { RemoteStream } from '__@urtc/sdk-web/stream/remote-stream';
|
|
|
}
|
|
}
|