@xylink/xy-rtc-sdk 2.1.0 → 2.1.1
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.
- package/lib/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/lib/src/action/index.d.ts +17 -2
- package/lib/src/main/client.d.ts +21 -31
- package/lib/src/main/iauth.d.ts +33 -0
- package/lib/src/tools/config.d.ts +1 -1
- package/lib/src/type/client.d.ts +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ declare class Action {
|
|
|
10
10
|
private seqId;
|
|
11
11
|
private statesTime;
|
|
12
12
|
commonParams: ICommonParams;
|
|
13
|
+
randomDeviceSN: string;
|
|
13
14
|
constructor();
|
|
14
15
|
setBaseUrl(baseUrl: string, logUrl: string): void;
|
|
15
16
|
setLogBaseUrl(logUrl: string): void;
|
|
@@ -21,6 +22,7 @@ declare class Action {
|
|
|
21
22
|
setMeetingInfo(info: IMeetingInfo): void;
|
|
22
23
|
setLoginInfo(loginInfo: IToken | null): void;
|
|
23
24
|
getLoginInfo(): IToken;
|
|
25
|
+
setCommonParams(data: any): void;
|
|
24
26
|
upload(data: any): Promise<any>;
|
|
25
27
|
/**
|
|
26
28
|
* 获取公钥,加密登录需使用此公钥
|
|
@@ -30,11 +32,24 @@ declare class Action {
|
|
|
30
32
|
*/
|
|
31
33
|
getPublicKey(account: string): Promise<any>;
|
|
32
34
|
/**
|
|
33
|
-
*
|
|
35
|
+
* 不加密登录
|
|
34
36
|
*
|
|
35
|
-
* @param
|
|
37
|
+
* @param sdkUserInfo
|
|
36
38
|
*/
|
|
37
39
|
login(sdkUserInfo: ISdkUserInfo): Promise<any>;
|
|
40
|
+
/**
|
|
41
|
+
* 加密登录
|
|
42
|
+
*
|
|
43
|
+
* @param { ISdkUserInfo } sdkUserInfo 小鱼账号
|
|
44
|
+
*/
|
|
45
|
+
encryptLogin(sdkUserInfo: ISdkUserInfo): Promise<any>;
|
|
46
|
+
/**
|
|
47
|
+
* 定制(RSA直接加密)登录接口(适配SHA512加密老用户)
|
|
48
|
+
*
|
|
49
|
+
* @param data
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
customLogin: (data: any) => Promise<any>;
|
|
38
53
|
/**
|
|
39
54
|
* 获取匿名账号
|
|
40
55
|
*
|
package/lib/src/main/client.d.ts
CHANGED
|
@@ -4,15 +4,17 @@
|
|
|
4
4
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
5
|
* @date 2019-10-23 12:04:44
|
|
6
6
|
*/
|
|
7
|
-
import { IClientConfig, IMackCall, IInvite, IRoster, ILayoutRoster, ISpeakerInfo, IScreenInfo, IServers, ILoginExtAccount,
|
|
7
|
+
import { IClientConfig, IMackCall, IInvite, IRoster, ILayoutRoster, ISpeakerInfo, IScreenInfo, IServers, ILoginExtAccount, IPublishParams, ICustomLayout, ICustomStreamTrack, IInternels, IVideoAudioType, IShareContentStatus, IPushType, IMode, IReqInfo, TCommand, ILayout, IConference, IContentMode, IToken, AutoMute } from '../type';
|
|
8
8
|
import Emmitter from '../tools/emmitter';
|
|
9
9
|
import Socket from '../tools/socket';
|
|
10
10
|
import Stream from './stream';
|
|
11
11
|
import Logger from '../tools/logger';
|
|
12
|
+
import IAuth from './iauth';
|
|
12
13
|
import DeviceManager from './deviceManager';
|
|
13
14
|
import LayoutManager from './layoutManager';
|
|
14
15
|
export default class Client extends Emmitter {
|
|
15
16
|
logger: Logger;
|
|
17
|
+
iauth: IAuth;
|
|
16
18
|
socketTask: Socket | undefined;
|
|
17
19
|
invite: IInvite;
|
|
18
20
|
rosters: IRoster[];
|
|
@@ -27,7 +29,7 @@ export default class Client extends Emmitter {
|
|
|
27
29
|
pushType: IPushType;
|
|
28
30
|
isAutoBandwidth: boolean;
|
|
29
31
|
debug: boolean;
|
|
30
|
-
shareContentStatus:
|
|
32
|
+
shareContentStatus: IShareContentStatus;
|
|
31
33
|
deviceManager: DeviceManager | null;
|
|
32
34
|
localHide: boolean;
|
|
33
35
|
hideId: string;
|
|
@@ -41,7 +43,6 @@ export default class Client extends Emmitter {
|
|
|
41
43
|
private peer;
|
|
42
44
|
private servers;
|
|
43
45
|
private callInfo;
|
|
44
|
-
private loginInfo;
|
|
45
46
|
private stream;
|
|
46
47
|
private meetingControl;
|
|
47
48
|
private videoTrackList;
|
|
@@ -102,6 +103,23 @@ export default class Client extends Emmitter {
|
|
|
102
103
|
getAudioTrackList(): ICustomStreamTrack[];
|
|
103
104
|
getLayoutList(): Map<string, ILayout> | undefined;
|
|
104
105
|
getSelfRoster(): IRoster | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* 小鱼账号初始登录,获取token方法
|
|
108
|
+
*
|
|
109
|
+
* @public
|
|
110
|
+
* @param { string } userName 小鱼用户账号
|
|
111
|
+
* @param { string } password 小鱼用户账号密码
|
|
112
|
+
* @returns { Promise<Object> } { access_token }
|
|
113
|
+
*/
|
|
114
|
+
loginXYlinkAccount(userName: string, password: string): Promise<Object>;
|
|
115
|
+
/**
|
|
116
|
+
* 第三方登录方法
|
|
117
|
+
*
|
|
118
|
+
* @public
|
|
119
|
+
* @param { ILoginExtAccount } params 参数
|
|
120
|
+
* @return { Promise<Object> } 登录结果
|
|
121
|
+
*/
|
|
122
|
+
loginExternalAccount(params: ILoginExtAccount): Promise<Object>;
|
|
105
123
|
/**
|
|
106
124
|
* 退会时 重置初始化参数
|
|
107
125
|
*
|
|
@@ -273,34 +291,6 @@ export default class Client extends Emmitter {
|
|
|
273
291
|
*/
|
|
274
292
|
destroy(): Promise<boolean>;
|
|
275
293
|
close(reason?: string): void;
|
|
276
|
-
/**
|
|
277
|
-
* 小鱼账号初始登录,获取token方法
|
|
278
|
-
*
|
|
279
|
-
* @public
|
|
280
|
-
* @param { string } userName 小鱼用户账号
|
|
281
|
-
* @param { string } password 小鱼用户账号密码
|
|
282
|
-
* @returns { Promise<Object> } { access_token }
|
|
283
|
-
*/
|
|
284
|
-
loginXYlinkAccount(userName: string, password: string): Promise<Object>;
|
|
285
|
-
/**
|
|
286
|
-
* 获取第三方user info & 获取token方法
|
|
287
|
-
*
|
|
288
|
-
* @param { string } userName
|
|
289
|
-
* @param { string } password
|
|
290
|
-
*/
|
|
291
|
-
getExternalLoginInfo(sdkUserInfo: ISdkUserInfo, params: ILoginExtAccount): Promise<{
|
|
292
|
-
code: string;
|
|
293
|
-
msg: string;
|
|
294
|
-
detail: any;
|
|
295
|
-
}>;
|
|
296
|
-
/**
|
|
297
|
-
* 第三方登录方法
|
|
298
|
-
*
|
|
299
|
-
* @public
|
|
300
|
-
* @param { ILoginExtAccount } params 参数
|
|
301
|
-
* @return { Promise<Object> } 登录结果
|
|
302
|
-
*/
|
|
303
|
-
loginExternalAccount(params: ILoginExtAccount): Promise<Object>;
|
|
304
294
|
/**
|
|
305
295
|
* 获取随机云会议室 - 目前用于教育
|
|
306
296
|
*
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 登录模块
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
import { ILoginExtAccount, ISdkUserInfo, ILoginInfo } from '../type';
|
|
6
|
+
import Logger from '../tools/logger';
|
|
7
|
+
declare class IAuth {
|
|
8
|
+
private logger;
|
|
9
|
+
private loginInfo;
|
|
10
|
+
constructor(logger: Logger);
|
|
11
|
+
getLoginInfo(): ILoginInfo;
|
|
12
|
+
setLoginInfo(loginInfo: ILoginInfo): void;
|
|
13
|
+
/**
|
|
14
|
+
* 第三方登录方法
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
* @param { ILoginExtAccount } params 参数
|
|
18
|
+
* @return { Promise<Object> } 登录结果
|
|
19
|
+
*/
|
|
20
|
+
loginExternalAccount(params: ILoginExtAccount): Promise<Object>;
|
|
21
|
+
/**
|
|
22
|
+
* 登录
|
|
23
|
+
*
|
|
24
|
+
* @param { ISdkUserInfo } sdkUserInfo
|
|
25
|
+
* @param { ILoginExtAccount } params
|
|
26
|
+
*/
|
|
27
|
+
login(sdkUserInfo: ISdkUserInfo, params?: ILoginExtAccount): Promise<{
|
|
28
|
+
code: string;
|
|
29
|
+
msg: string;
|
|
30
|
+
detail: any;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
export default IAuth;
|
|
@@ -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.1.
|
|
7
|
+
export declare const version = "2.1.1 - build on 2022-06-13 13:59";
|
|
8
8
|
export declare const proxy: {
|
|
9
9
|
wssHost: string;
|
|
10
10
|
restHost: string;
|
package/lib/src/type/client.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare type IClientLayout = 'AUTO' | 'CUSTOM' | 'auto' | 'custom';
|
|
|
21
21
|
* @value STARTING 分享中
|
|
22
22
|
* @value PENDING 等待
|
|
23
23
|
*/
|
|
24
|
-
export declare type
|
|
24
|
+
export declare type IShareContentStatus = 'ENDED' | 'STARTING' | 'PENDING';
|
|
25
25
|
/**
|
|
26
26
|
* VIDEO事件回调状态状态
|
|
27
27
|
*
|