@xylink/xy-rtc-sdk 2.0.5 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,7 @@
1
1
  import { TLocale } from 'src/type';
2
+ export declare const SERVER_ERROR_CODE_MAP: {
3
+ [key: number]: string;
4
+ };
2
5
  export declare const ERROR_CODE: {
3
6
  [key in TLocale]: {
4
7
  [key: string]: string;
@@ -68,6 +68,7 @@ export default class Client extends Emmitter {
68
68
  private conferenceInfo;
69
69
  private customLayoutCacheList;
70
70
  private contentMode;
71
+ private isSubscribeBulkRoster;
71
72
  private onDocumentChange;
72
73
  constructor(config: IClientConfig, servers: IServers, logger: Logger);
73
74
  static instance: Client;
@@ -112,6 +113,11 @@ export default class Client extends Emmitter {
112
113
  getOnHold(): boolean;
113
114
  getLayoutList(): Map<string, ILayout> | undefined;
114
115
  getSelfRoster(): IRoster | undefined;
116
+ /**
117
+ * 退会时 重置初始化参数
118
+ *
119
+ */
120
+ resetInitParameter(): void;
115
121
  setContentMode(mode: IContentMode): void;
116
122
  /**
117
123
  * 切换显示/隐藏 Local 画面
@@ -374,6 +380,12 @@ export default class Client extends Emmitter {
374
380
  */
375
381
  onMute(): Promise<boolean>;
376
382
  private onHand;
383
+ /**
384
+ * 告知媒体是否开启出入会通知
385
+ *
386
+ * @private
387
+ */
388
+ private sendConfParam;
377
389
  /**
378
390
  * 获取可支持的编解码
379
391
  *
@@ -31,6 +31,8 @@ export default class Peer {
31
31
  private isShareContent;
32
32
  private senderInterval;
33
33
  private isResendContentOffer;
34
+ private isRestartIceConnection;
35
+ private isFirstConnected;
34
36
  constructor(client: Client, stream: Stream);
35
37
  getInternels(): IInternels;
36
38
  /**
@@ -129,7 +131,7 @@ export default class Peer {
129
131
  *
130
132
  * @public
131
133
  */
132
- restartIceConnection(): Promise<void>;
134
+ restartIceConnection(isRestartIceConnection?: boolean): Promise<void>;
133
135
  /**
134
136
  * 关闭PeerConnection连接、销毁状态
135
137
  */
@@ -12,7 +12,6 @@ export declare const platform: () => {
12
12
  isMac: boolean;
13
13
  isWindows: boolean;
14
14
  isIPad: boolean;
15
- isPad: boolean;
16
15
  isChrome: boolean;
17
16
  isLinux: boolean;
18
17
  isFirefox: boolean;
@@ -4,7 +4,7 @@
4
4
  * @authors Luo-jinghui (luojinghui424@gmail.com)
5
5
  * @date 2019-10-24 14:06:05
6
6
  */
7
- export declare const version = "2.0.5 - build on 2022-01-27 14:43";
7
+ export declare const version = "2.0.8 - build on 2022-09-01 19:14";
8
8
  export declare const proxy: {
9
9
  wssHost: string;
10
10
  restHost: string;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * webrtc axiox request lib
2
+ * webrtc axios request lib
3
3
  *
4
4
  * @authors Luo-jinghui (luojinghui424@gmail.com)
5
5
  * @date 2019-11-01 14:14:45
@@ -29,7 +29,10 @@ declare class HttpClient {
29
29
  private clientId;
30
30
  private retryCount;
31
31
  constructor(commonOption: IAxiosRequestConfig);
32
- refreshToken(baseURL?: string): Promise<any>;
32
+ refreshToken({ baseURL, refresh_token }: {
33
+ baseURL?: string | undefined;
34
+ refresh_token?: string | undefined;
35
+ }): Promise<any>;
33
36
  setLogger(logger: Logger): void;
34
37
  setBaseUrl(url: string): void;
35
38
  setClientId(clientId: string): void;
@@ -37,12 +40,12 @@ declare class HttpClient {
37
40
  setHeader(params: ISignParams): any;
38
41
  setLoginInfo(loginInfo: IToken | null): void;
39
42
  getLoginInfo(): any;
40
- assignOptions: (option?: AxiosRequestConfig | undefined) => AxiosRequestConfig & {
43
+ assignOptions: (option?: AxiosRequestConfig) => AxiosRequestConfig & {
41
44
  params: any;
42
45
  };
43
- get: (url: string, option?: IAxiosRequestConfig | undefined) => any;
44
- put: (url: string, data?: any, option?: AxiosRequestConfig | undefined) => any;
45
- post: (url: string, data?: any, option?: AxiosRequestConfig | undefined) => any;
46
- delete: (url: string, option?: AxiosRequestConfig | undefined) => any;
46
+ get: (url: string, option?: IAxiosRequestConfig) => any;
47
+ put: (url: string, data?: any, option?: AxiosRequestConfig) => any;
48
+ post: (url: string, data?: any, option?: AxiosRequestConfig) => any;
49
+ delete: (url: string, option?: AxiosRequestConfig) => any;
47
50
  }
48
51
  export default HttpClient;
@@ -27,23 +27,26 @@ declare class Socket {
27
27
  private isClose;
28
28
  private logger;
29
29
  private client;
30
+ private reconnectOffset;
31
+ private reconnectTimer;
30
32
  constructor(options: socketOptions, client: any);
31
33
  connect(isReconnect?: boolean): void;
32
34
  addEvent(): void;
33
35
  removeEvent(): void;
34
36
  onOpenSocket: (e: any) => void;
35
37
  onHandleMessage: (e: any) => void;
36
- onCloseSocket: (e: any) => void;
38
+ onCloseSocket: (e: CloseEvent) => void;
37
39
  onErrorSocket: (e: any) => void;
38
40
  sendHeartBeat(): void;
39
- creatTimeout(): void;
41
+ clearTimeout(): void;
40
42
  emit(type: string, data: any): void;
41
43
  clearPangTimer(): void;
42
44
  clearBeatTimer(): void;
45
+ clearReconnectTimer(): void;
43
46
  reset(): void;
44
47
  on(type: string, fn: any): void;
45
48
  close(isReconnect?: boolean): void;
46
- send(data: any, parase?: boolean, isLog?: boolean): void;
49
+ send(data: any, parse?: boolean, isLog?: boolean): void;
47
50
  stopCall(): void;
48
51
  reConnect(): void;
49
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylink/xy-rtc-sdk",
3
- "version": "2.0.5",
3
+ "version": "2.0.8",
4
4
  "description": "XYRTC SDK(小鱼易连web音视频 sdk)",
5
5
  "keywords": [
6
6
  "webrtc",