@xylink/xy-rtc-sdk 2.0.4 → 2.1.0

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,10 +1,4 @@
1
- /**
2
- * webrtc action request
3
- *
4
- * @authors Luo-jinghui (luojinghui424@gmail.com)
5
- * @date 2019-10-30 14:14:04
6
- */
7
- import { ILoginExtAccount, ISdkUserInfo, TStateAction, TEventName, IMeetingInfo, TCategory } from '../type';
1
+ import { ILoginExtAccount, ISdkUserInfo, TStateAction, TEventName, IMeetingInfo, TCategory, IToken, IGetConferenceParams } from '../type';
8
2
  import Logger from '../tools/logger';
9
3
  export interface ICommonParams {
10
4
  securityKey: string;
@@ -19,31 +13,41 @@ declare class Action {
19
13
  constructor();
20
14
  setBaseUrl(baseUrl: string, logUrl: string): void;
21
15
  setLogBaseUrl(logUrl: string): void;
22
- setClientId(clientId: string): void;
16
+ setClientInfo({ clientId, clientSecret }: {
17
+ clientId: string;
18
+ clientSecret: string;
19
+ }): void;
23
20
  setLogger(logger: Logger): void;
24
21
  setMeetingInfo(info: IMeetingInfo): void;
22
+ setLoginInfo(loginInfo: IToken | null): void;
23
+ getLoginInfo(): IToken;
25
24
  upload(data: any): Promise<any>;
25
+ /**
26
+ * 获取公钥,加密登录需使用此公钥
27
+ *
28
+ * @param { string } account 小鱼账号
29
+ * @returns
30
+ */
31
+ getPublicKey(account: string): Promise<any>;
26
32
  /**
27
33
  * 获取小鱼世界账号密码
28
34
  *
29
- * @param sdkUserInfo
30
- * @param params
35
+ * @param { ISdkUserInfo } sdkUserInfo 小鱼账号
31
36
  */
32
37
  login(sdkUserInfo: ISdkUserInfo): Promise<any>;
33
38
  /**
34
- * 匿名登录
39
+ * 获取匿名账号
35
40
  *
36
41
  * @param params
37
42
  */
38
43
  getSdkUserInfo(params: ILoginExtAccount): Promise<any>;
39
- setLoginInfo(loginInfo: any): void;
40
44
  getUserInfo(token: string): Promise<any>;
41
45
  getCallUri(params: any): Promise<any>;
42
46
  verifyPassword(confNumber: string, password: string): Promise<any>;
43
47
  hand(type: string, meetingId: string, di: string, conferenceNo: string): Promise<any>;
44
48
  fetchErrorCode(): Promise<any>;
45
49
  getErrorCodeByJson(url: string): Promise<any>;
46
- getConference(userProfileId: number, securityKey: string): Promise<any>;
50
+ getConference(userProfileId: number, securityKey: string, params: IGetConferenceParams): Promise<any>;
47
51
  setStates1(action: TStateAction, eventName: TEventName, params?: {}): Promise<void>;
48
52
  setStates(category: TCategory, eventName: TEventName, params?: {}): Promise<void>;
49
53
  igonreMeetingMonito(confNumber: string): Promise<any>;
@@ -61,6 +65,29 @@ declare class Action {
61
65
  clientSecret: string;
62
66
  httpServer?: string | undefined;
63
67
  }) => Promise<any>;
68
+ /**
69
+ * 监会操作
70
+ * @param params meetingId: 会议号;action: 操作类型;operations: 操作信息
71
+ * @yapi http://yapi.xylink.com/project/1083/interface/api/54806
72
+ * @returns [hasError, dada]
73
+ */
74
+ monitorOperation(params: {
75
+ meetingId: string;
76
+ action: string;
77
+ operations: Array<{
78
+ callUri: string;
79
+ params: string;
80
+ }>;
81
+ }): Promise<[boolean, any]>;
82
+ /**
83
+ * 监会 updateWebViewProp 操作
84
+ * @param meetingId 会议号
85
+ * @param operations 操作信息
86
+ */
87
+ updateWebViewProp(meetingId: string, operations?: Array<{
88
+ callUri: string;
89
+ params: string;
90
+ }>): Promise<[boolean, any]>;
64
91
  }
65
92
  declare const _default: Action;
66
93
  export default _default;
@@ -0,0 +1,217 @@
1
+ import { ICONTENT_CONTRAINTS, IBASE_CONTRAINTS } from '../type';
2
+ /**
3
+ * 初始默认采集分辨率
4
+ */
5
+ export declare const BASE_RESOLUTION_CONTRAINTS: {
6
+ width: number;
7
+ height: number;
8
+ };
9
+ /**
10
+ * 360P
11
+ */
12
+ export declare const RESOLUTION_360_CONTRAINTS: {
13
+ width: number;
14
+ height: number;
15
+ };
16
+ /**
17
+ * people 采集基础配置
18
+ *
19
+ *
20
+ */
21
+ export declare const BASE_CONTRAINTS: IBASE_CONTRAINTS;
22
+ /**
23
+ * content 采集基础配置
24
+ */
25
+ export declare const CONTENT_BASE_CONTRAINTS: ICONTENT_CONTRAINTS;
26
+ /**
27
+ * content 720P 1080P 采集配置信息
28
+ *
29
+ * common: 普通模式
30
+ * advanced: 高级模式, 帧率、宽、高 可进行最大、最小、期望设置
31
+ */
32
+ export declare const CONTENT_CONTRAINTS: {
33
+ '720': {
34
+ common: {
35
+ frameRate?: ConstrainDouble | undefined;
36
+ width: number;
37
+ height: number;
38
+ cursor: string;
39
+ aspectRatio: number;
40
+ resizeMode: "crop-and-scale";
41
+ logicalSurface: true;
42
+ } | {
43
+ frameRate: ConstrainDouble;
44
+ width: number;
45
+ height: number;
46
+ cursor: string;
47
+ aspectRatio: number;
48
+ resizeMode: "crop-and-scale";
49
+ logicalSurface: true;
50
+ };
51
+ advanced: {
52
+ frameRate: {
53
+ ideal: number;
54
+ max: number;
55
+ };
56
+ width: {
57
+ ideal: number;
58
+ max: number;
59
+ };
60
+ height: {
61
+ ideal: number;
62
+ max: number;
63
+ };
64
+ cursor: string;
65
+ aspectRatio: number;
66
+ resizeMode: "crop-and-scale";
67
+ logicalSurface: true;
68
+ };
69
+ };
70
+ '1080': {
71
+ common: {
72
+ frameRate?: ConstrainDouble | undefined;
73
+ width: number;
74
+ height: number;
75
+ cursor: string;
76
+ aspectRatio: number;
77
+ resizeMode: "crop-and-scale";
78
+ logicalSurface: true;
79
+ } | {
80
+ frameRate: ConstrainDouble;
81
+ width: number;
82
+ height: number;
83
+ cursor: string;
84
+ aspectRatio: number;
85
+ resizeMode: "crop-and-scale";
86
+ logicalSurface: true;
87
+ };
88
+ advanced: {
89
+ frameRate: {
90
+ ideal: number;
91
+ max: number;
92
+ };
93
+ width: {
94
+ ideal: number;
95
+ max: number;
96
+ };
97
+ height: {
98
+ ideal: number;
99
+ max: number;
100
+ };
101
+ cursor: string;
102
+ aspectRatio: number;
103
+ resizeMode: "crop-and-scale";
104
+ logicalSurface: true;
105
+ };
106
+ };
107
+ };
108
+ /**
109
+ * people 180P 360P 720P 采集配置信息
110
+ *
111
+ * common: 普通模式
112
+ * advanced: 高级模式, 帧率、宽、高 可进行最大、最小、期望设置
113
+ */
114
+ export declare const PEOPLE_CONTRAINTS: {
115
+ '180': {
116
+ common: {
117
+ frameRate?: ConstrainDouble | undefined;
118
+ width: number;
119
+ height: number;
120
+ aspectRatio: number;
121
+ resizeMode: "crop-and-scale";
122
+ } | {
123
+ frameRate: ConstrainDouble;
124
+ width: number;
125
+ height: number;
126
+ aspectRatio: number;
127
+ resizeMode: "crop-and-scale";
128
+ };
129
+ advanced: {
130
+ frameRate: {
131
+ min: number;
132
+ exact: number;
133
+ max: number;
134
+ };
135
+ width: {
136
+ min: number;
137
+ ideal: number;
138
+ max: number;
139
+ };
140
+ height: {
141
+ min: number;
142
+ ideal: number;
143
+ max: number;
144
+ };
145
+ aspectRatio: number;
146
+ resizeMode: "crop-and-scale";
147
+ };
148
+ };
149
+ '360': {
150
+ common: {
151
+ frameRate?: ConstrainDouble | undefined;
152
+ width: number;
153
+ height: number;
154
+ aspectRatio: number;
155
+ resizeMode: "crop-and-scale";
156
+ } | {
157
+ frameRate: ConstrainDouble;
158
+ width: number;
159
+ height: number;
160
+ aspectRatio: number;
161
+ resizeMode: "crop-and-scale";
162
+ };
163
+ advanced: {
164
+ frameRate: {
165
+ min: number;
166
+ exact: number;
167
+ max: number;
168
+ };
169
+ width: {
170
+ min: number;
171
+ ideal: number;
172
+ max: number;
173
+ };
174
+ height: {
175
+ min: number;
176
+ ideal: number;
177
+ max: number;
178
+ };
179
+ aspectRatio: number;
180
+ resizeMode: "crop-and-scale";
181
+ };
182
+ };
183
+ '720': {
184
+ common: {
185
+ frameRate?: ConstrainDouble | undefined;
186
+ width: number;
187
+ height: number;
188
+ aspectRatio: number;
189
+ resizeMode: "crop-and-scale";
190
+ } | {
191
+ frameRate: ConstrainDouble;
192
+ width: number;
193
+ height: number;
194
+ aspectRatio: number;
195
+ resizeMode: "crop-and-scale";
196
+ };
197
+ advanced: {
198
+ frameRate: {
199
+ min: number;
200
+ ideal: number;
201
+ max: number;
202
+ };
203
+ width: {
204
+ min: number;
205
+ ideal: number;
206
+ max: number;
207
+ };
208
+ height: {
209
+ min: number;
210
+ ideal: number;
211
+ max: number;
212
+ };
213
+ aspectRatio: number;
214
+ resizeMode: "crop-and-scale";
215
+ };
216
+ };
217
+ };