@xylink/xy-rtc-sdk 2.1.1 → 2.1.2
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/README.MD +38 -73
- package/lib/index.es.js +3 -1
- package/lib/index.js +3 -1
- package/lib/src/action/index.d.ts +136 -8
- package/lib/src/enum/contraints.d.ts +3 -104
- package/lib/src/enum/index.d.ts +84 -0
- package/lib/src/index.d.ts +2 -2
- package/lib/src/main/client.d.ts +125 -30
- package/lib/src/main/deviceManager.d.ts +3 -4
- package/lib/src/main/helper.d.ts +5 -5
- package/lib/src/main/layoutManager.d.ts +2 -2
- package/lib/src/main/peer.d.ts +27 -2
- package/lib/src/main/qualityManager.d.ts +39 -0
- package/lib/src/main/stream.d.ts +6 -6
- package/lib/src/main/videoManager.d.ts +4 -4
- package/lib/src/tools/browser.d.ts +2 -2
- package/lib/src/tools/config.d.ts +1 -1
- package/lib/src/tools/db.d.ts +56 -3
- package/lib/src/tools/detect.d.ts +28 -2
- package/lib/src/tools/httpClient.d.ts +10 -7
- package/lib/src/tools/index.d.ts +5 -0
- package/lib/src/tools/logger.d.ts +1 -2
- package/lib/src/tools/socket.d.ts +5 -2
- package/lib/src/tools/utils.d.ts +2 -2
- package/lib/src/type/base.d.ts +7 -2
- package/lib/src/type/client.d.ts +171 -48
- package/lib/src/type/device.d.ts +2 -2
- package/lib/src/type/index.d.ts +1 -1
- package/lib/src/type/quality.d.ts +77 -0
- package/lib/src/type/stream.d.ts +52 -3
- package/package.json +130 -130
|
@@ -3,17 +3,43 @@
|
|
|
3
3
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
4
4
|
* @date 2019-10-22 11:11:55
|
|
5
5
|
*/
|
|
6
|
+
interface ISupportFeature {
|
|
7
|
+
isSupportRTC: boolean;
|
|
8
|
+
isSupportAddtrack: boolean;
|
|
9
|
+
isSupportAddTransceiver: boolean;
|
|
10
|
+
isSupportReplaceTrack: boolean;
|
|
11
|
+
isApplyConstraints: boolean;
|
|
12
|
+
isSupportSetStreams: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface ISupportTest {
|
|
15
|
+
isSupportPeer: boolean;
|
|
16
|
+
isSupportAddtrack: boolean;
|
|
17
|
+
isSupportAddTransceiver: boolean;
|
|
18
|
+
isSupportReplaceTrack: boolean;
|
|
19
|
+
isApplyConstraints: boolean;
|
|
20
|
+
isSupportSetStreams: boolean;
|
|
21
|
+
}
|
|
6
22
|
export declare const detect: {
|
|
7
23
|
isMinBrowser: () => boolean;
|
|
8
24
|
isMobile: () => boolean;
|
|
9
25
|
isFirefox: () => boolean;
|
|
10
26
|
isSupportReauthorize: () => boolean;
|
|
11
27
|
isSupportAppendTrack: () => boolean;
|
|
12
|
-
|
|
13
|
-
|
|
28
|
+
isSupportUserMedia: () => boolean;
|
|
29
|
+
isSupportRTC: (videoCapture?: MediaStream) => Promise<ISupportFeature>;
|
|
30
|
+
isSupportPeerCB: (videoCapture?: MediaStream) => Promise<ISupportTest>;
|
|
14
31
|
isSupportWebsocket: () => boolean;
|
|
15
32
|
isSupportMedia: () => boolean;
|
|
16
33
|
isSupportH264: () => Promise<boolean>;
|
|
17
34
|
osVersion: () => string;
|
|
35
|
+
getNetWork: () => {
|
|
36
|
+
type: any;
|
|
37
|
+
downlink: any;
|
|
38
|
+
effectiveType: any;
|
|
39
|
+
rtt: any;
|
|
40
|
+
downlinkMax: any;
|
|
41
|
+
saveData: any;
|
|
42
|
+
} | null;
|
|
18
43
|
};
|
|
19
44
|
export declare const isFirefox: boolean;
|
|
45
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* webrtc
|
|
2
|
+
* webrtc axios request lib
|
|
3
3
|
*
|
|
4
4
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
5
|
* @date 2019-11-01 14:14:45
|
|
@@ -30,7 +30,10 @@ declare class HttpClient {
|
|
|
30
30
|
private clientSecret;
|
|
31
31
|
private retryCount;
|
|
32
32
|
constructor(commonOption: IAxiosRequestConfig);
|
|
33
|
-
refreshToken(baseURL
|
|
33
|
+
refreshToken({ baseURL, refresh_token }: {
|
|
34
|
+
baseURL?: string | undefined;
|
|
35
|
+
refresh_token?: string | undefined;
|
|
36
|
+
}): Promise<any>;
|
|
34
37
|
setLogger(logger: Logger): void;
|
|
35
38
|
setBaseUrl(url: string): void;
|
|
36
39
|
setClientInfo({ clientId, clientSecret }: {
|
|
@@ -50,12 +53,12 @@ declare class HttpClient {
|
|
|
50
53
|
};
|
|
51
54
|
setLoginInfo(loginInfo: IToken | null): void;
|
|
52
55
|
getLoginInfo(): any;
|
|
53
|
-
assignOptions: (option?: AxiosRequestConfig
|
|
56
|
+
assignOptions: (option?: AxiosRequestConfig) => AxiosRequestConfig & {
|
|
54
57
|
params: any;
|
|
55
58
|
};
|
|
56
|
-
get: (url: string, option?: IAxiosRequestConfig
|
|
57
|
-
put: (url: string, data?: any, option?: AxiosRequestConfig
|
|
58
|
-
post: (url: string, data?: any, option?: AxiosRequestConfig
|
|
59
|
-
delete: (url: string, option?: AxiosRequestConfig
|
|
59
|
+
get: (url: string, option?: IAxiosRequestConfig) => any;
|
|
60
|
+
put: (url: string, data?: any, option?: AxiosRequestConfig) => any;
|
|
61
|
+
post: (url: string, data?: any, option?: AxiosRequestConfig) => any;
|
|
62
|
+
delete: (url: string, option?: AxiosRequestConfig) => any;
|
|
60
63
|
}
|
|
61
64
|
export default HttpClient;
|
package/lib/src/tools/index.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 关闭视频流
|
|
3
|
+
*
|
|
4
|
+
* @param { MediaStream } stream
|
|
5
|
+
*/
|
|
1
6
|
declare const closePreviewStream: (stream: MediaStream) => Promise<void>;
|
|
2
7
|
declare const setOutputAudioDevice: (element: any, outputValue: string) => void;
|
|
3
8
|
export { closePreviewStream, setOutputAudioDevice };
|
|
@@ -131,8 +131,7 @@ declare class Logger {
|
|
|
131
131
|
*/
|
|
132
132
|
downloadLog: () => Promise<void>;
|
|
133
133
|
/**
|
|
134
|
-
* Upload sdk log file to
|
|
135
|
-
* redmine url: http://172.20.33.81:8080/redmine/projects/crashandupload/issues
|
|
134
|
+
* Upload sdk log file to devops
|
|
136
135
|
*
|
|
137
136
|
* @public
|
|
138
137
|
* @param { string } name 上传文件名
|
|
@@ -27,6 +27,8 @@ 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;
|
|
@@ -36,14 +38,15 @@ declare class Socket {
|
|
|
36
38
|
onCloseSocket: (e: CloseEvent) => void;
|
|
37
39
|
onErrorSocket: (e: any) => void;
|
|
38
40
|
sendHeartBeat(): void;
|
|
39
|
-
|
|
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,
|
|
49
|
+
send(data: any, parse?: boolean, isLog?: boolean): void;
|
|
47
50
|
stopCall(): void;
|
|
48
51
|
reConnect(): void;
|
|
49
52
|
}
|
package/lib/src/tools/utils.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export declare const getStatus: (code: string, detail?: any, msg?: string) => {
|
|
|
51
51
|
msg: string;
|
|
52
52
|
detail: any;
|
|
53
53
|
};
|
|
54
|
-
export declare const getMeetingStatus: (success: boolean, code?: string
|
|
54
|
+
export declare const getMeetingStatus: (success: boolean, code?: string, msg?: string) => {
|
|
55
55
|
success: boolean;
|
|
56
56
|
data: {
|
|
57
57
|
code: string;
|
|
@@ -64,4 +64,4 @@ export declare const getMeetingStatus: (success: boolean, code?: string | undefi
|
|
|
64
64
|
msg?: undefined;
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
|
-
export declare const
|
|
67
|
+
export declare const hideKeyInfo: (data: any, key: string | string[]) => any;
|
package/lib/src/type/base.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @property { string } code 错误码
|
|
5
5
|
* @property { string } msg 错误信息
|
|
6
|
-
* @property {
|
|
6
|
+
* @property { any } detail 数据详情
|
|
7
7
|
*/
|
|
8
8
|
export interface IStatus {
|
|
9
9
|
code: string;
|
|
@@ -23,8 +23,12 @@ export interface ICheckSystemRequirements {
|
|
|
23
23
|
detail: {
|
|
24
24
|
isSupportRTC: boolean;
|
|
25
25
|
isSupportWebsocket: boolean;
|
|
26
|
-
isSupportH264: boolean;
|
|
27
26
|
isSupportBrowser: boolean;
|
|
27
|
+
isSupportMobileBrowser: boolean;
|
|
28
|
+
isSupportH264: boolean;
|
|
29
|
+
isSupportAddTransceiver: boolean;
|
|
30
|
+
isSupportAddtrack: boolean;
|
|
31
|
+
isSupportUserMedia: boolean;
|
|
28
32
|
};
|
|
29
33
|
}
|
|
30
34
|
/**
|
|
@@ -64,3 +68,4 @@ export interface ISignParams {
|
|
|
64
68
|
token: string;
|
|
65
69
|
signSecret: string;
|
|
66
70
|
}
|
|
71
|
+
export declare type Key = string | number;
|
package/lib/src/type/client.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IToken } from './base';
|
|
2
2
|
import VideoManager from '../main/videoManager';
|
|
3
|
+
import { IInternels } from './stream';
|
|
4
|
+
import { SupportLocalLanguages } from 'src/enum';
|
|
3
5
|
/**
|
|
4
6
|
* 向Client推送流类型
|
|
5
7
|
*
|
|
@@ -49,10 +51,10 @@ export declare type ITemplateMode = 'SPEAKER' | 'GALLERY';
|
|
|
49
51
|
* 主画面/Content布局模式
|
|
50
52
|
*
|
|
51
53
|
* @value MULTI_PIC_CONTENT_HIGH_PRIORITY Content是大窗口
|
|
52
|
-
* @value MULTI_PIC_ACTIVE_HIGH_PRIORITY
|
|
54
|
+
* @value MULTI_PIC_ACTIVE_HIGH_PRIORITY ActiveSpeaker是大窗口
|
|
53
55
|
* @value TWO_PIC_PIP 画中画模式(picture in picture)
|
|
54
56
|
* @value CONTENT_ONLY 只显示Content
|
|
55
|
-
* @value TWO_PIC_SYMMETRIC 对称显示content和
|
|
57
|
+
* @value TWO_PIC_SYMMETRIC 对称显示content和speaker(side by side)
|
|
56
58
|
*/
|
|
57
59
|
export declare type IContentTemplateMode = 'MULTI_PIC_CONTENT_HIGH_PRIORITY' | 'MULTI_PIC_ACTIVE_HIGH_PRIORITY' | 'TWO_PIC_PIP' | 'CONTENT_ONLY' | 'TWO_PIC_SYMMETRIC';
|
|
58
60
|
/**
|
|
@@ -78,15 +80,15 @@ export declare type IVideoType = 'muteVideo' | 'unmuteVideo';
|
|
|
78
80
|
/**
|
|
79
81
|
* 音频状态
|
|
80
82
|
*
|
|
81
|
-
* @
|
|
82
|
-
* @
|
|
83
|
+
* @value muteAudio 关闭麦克风
|
|
84
|
+
* @value unmuteAudio 开启麦克风
|
|
83
85
|
*/
|
|
84
86
|
export declare type IAudioType = 'muteAudio' | 'unmuteAudio';
|
|
85
87
|
/**
|
|
86
88
|
* 视频/音频状态
|
|
87
89
|
*
|
|
88
|
-
* @
|
|
89
|
-
* @
|
|
90
|
+
* @value muteAudio 关闭麦克风
|
|
91
|
+
* @value unmuteAudio 开启麦克风
|
|
90
92
|
* @value muteVideo 关闭摄像头
|
|
91
93
|
* @value unmuteVideo:开启摄像头
|
|
92
94
|
*/
|
|
@@ -168,6 +170,42 @@ export declare type IResolutionType = 0 | 1 | 2 | 3 | 4 | 5;
|
|
|
168
170
|
* @value 3 300
|
|
169
171
|
*/
|
|
170
172
|
export declare type IQualityType = 0 | 1 | 2;
|
|
173
|
+
/**
|
|
174
|
+
* 是否禁止收听
|
|
175
|
+
*
|
|
176
|
+
* @value 'keep' 保持上次的状态
|
|
177
|
+
* @value 'on' 禁止收听
|
|
178
|
+
* @value 'off' 取消禁止收听
|
|
179
|
+
*/
|
|
180
|
+
export declare type IMuteSpeaker = 'keep' | 'on' | 'off';
|
|
181
|
+
/**
|
|
182
|
+
* 录制状态
|
|
183
|
+
*
|
|
184
|
+
* @value RECORD_STATE_IDLE 停止成功
|
|
185
|
+
* @value RECORD_STATE_STARTING 开启录制
|
|
186
|
+
* @value RECORD_STATE_STARTED 开启成功
|
|
187
|
+
* @value RECORD_STATE_STOPING 停止录制
|
|
188
|
+
*/
|
|
189
|
+
export declare enum RecordingState {
|
|
190
|
+
RECORD_STATE_IDLE = "RECORD_STATE_IDLE",
|
|
191
|
+
RECORD_STATE_STARTING = "RECORD_STATE_STARTING",
|
|
192
|
+
RECORD_STATE_STARTED = "RECORD_STATE_STARTED",
|
|
193
|
+
RECORD_STATE_STOPING = "RECORD_STATE_STOPING"
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* 录制状态
|
|
197
|
+
*
|
|
198
|
+
* @param NONE 未开启录制
|
|
199
|
+
* @param LOCAL_START 本地开启录制
|
|
200
|
+
* @param REMOTE_STAR 远端开启录制
|
|
201
|
+
* @param REMOTE_PAUSED 远端录制暂停中
|
|
202
|
+
*/
|
|
203
|
+
export declare enum RecordStatus {
|
|
204
|
+
NONE = 0,
|
|
205
|
+
LOCAL_START = 1,
|
|
206
|
+
REMOTE_STAR = 2,
|
|
207
|
+
REMOTE_PAUSED = 3
|
|
208
|
+
}
|
|
171
209
|
/**
|
|
172
210
|
* client配置参数
|
|
173
211
|
*
|
|
@@ -190,6 +228,7 @@ export declare type IQualityType = 0 | 1 | 2;
|
|
|
190
228
|
* @property { boolean } isThird 埋点
|
|
191
229
|
* @property { boolean } isSupportHybridCloud 是否是混合云,默认公有云。 如果有探测到内网地址,则此值为true,将不进行鉴权。
|
|
192
230
|
* @property { boolean } isVerifyMeetingId 是否校验会议号,默认校验
|
|
231
|
+
* @property { boolean } bandwidthSetting 带宽配置
|
|
193
232
|
*
|
|
194
233
|
*/
|
|
195
234
|
export interface IClientConfig {
|
|
@@ -209,11 +248,12 @@ export interface IClientConfig {
|
|
|
209
248
|
localHide?: boolean;
|
|
210
249
|
localMirror?: boolean;
|
|
211
250
|
templateMode?: ITemplateMode;
|
|
212
|
-
__hideId?: string;
|
|
251
|
+
__hideId?: number | string;
|
|
213
252
|
__monitorMode?: string;
|
|
214
253
|
isThird?: boolean;
|
|
215
254
|
isSupportHybridCloud?: boolean;
|
|
216
255
|
isVerifyMeetingId?: boolean;
|
|
256
|
+
bandwidthSetting?: boolean;
|
|
217
257
|
}
|
|
218
258
|
export interface ILayoutParams {
|
|
219
259
|
rosters: IRoster[];
|
|
@@ -250,18 +290,7 @@ export interface ITemplate {
|
|
|
250
290
|
*/
|
|
251
291
|
export interface IDefault {
|
|
252
292
|
CLIENT_TYPE: string;
|
|
253
|
-
INIT_INTERNELS:
|
|
254
|
-
bytesReceived: number;
|
|
255
|
-
bytesReceivedSecond: number;
|
|
256
|
-
bytesSent: number;
|
|
257
|
-
bytesSentSecond: number;
|
|
258
|
-
mimeType: string;
|
|
259
|
-
timestamp: number;
|
|
260
|
-
receiver: {};
|
|
261
|
-
sender: {};
|
|
262
|
-
audioReceiver: {};
|
|
263
|
-
audioSender: {};
|
|
264
|
-
};
|
|
293
|
+
INIT_INTERNELS: IInternels;
|
|
265
294
|
RESOLUTION: number;
|
|
266
295
|
ROSTER: IRoster;
|
|
267
296
|
SELF_MOCK_PID: number;
|
|
@@ -315,7 +344,7 @@ export interface ILoginInfo {
|
|
|
315
344
|
cellPhone?: string;
|
|
316
345
|
extUserId?: string;
|
|
317
346
|
}
|
|
318
|
-
export interface
|
|
347
|
+
export interface ICodeList {
|
|
319
348
|
version: string;
|
|
320
349
|
zh_CN: {
|
|
321
350
|
[key: string]: string;
|
|
@@ -525,6 +554,7 @@ export interface ICall extends IMackCall {
|
|
|
525
554
|
* @property { string } vcNumber 最终的会议号
|
|
526
555
|
* @property { "true" | "false" } inoutReminder 是否设置了出入会提醒
|
|
527
556
|
* @property { string } commonJson 其他会议室配置
|
|
557
|
+
* @property { string } remoteUri 云会议室URI
|
|
528
558
|
*/
|
|
529
559
|
export interface IInvite {
|
|
530
560
|
callerUri: string;
|
|
@@ -534,6 +564,19 @@ export interface IInvite {
|
|
|
534
564
|
vcNumber?: string;
|
|
535
565
|
inoutReminder?: 'true' | 'false';
|
|
536
566
|
commonJson?: string;
|
|
567
|
+
remoteUri?: string;
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* 分组会议信息
|
|
571
|
+
*
|
|
572
|
+
* @property { boolean } groupLeader 是否设置本终端为管理员 true:设置, false:取消
|
|
573
|
+
* @property { string } groupName 此名称显示至用户界面
|
|
574
|
+
* @property { number } groupType 是否进入讨论组 1:进入,0:退出
|
|
575
|
+
*/
|
|
576
|
+
export interface IGroupInfo {
|
|
577
|
+
groupLeader: boolean;
|
|
578
|
+
groupName: string;
|
|
579
|
+
groupType: number;
|
|
537
580
|
}
|
|
538
581
|
/**
|
|
539
582
|
* 会控回调信息
|
|
@@ -547,6 +590,8 @@ export interface IInvite {
|
|
|
547
590
|
* @property { string } role 未知
|
|
548
591
|
* @property { string } type 未知
|
|
549
592
|
* @property { string } commonJson 会控修改名称等
|
|
593
|
+
* @property { IMuteSpeaker } isMuteSpeaker 禁止收听
|
|
594
|
+
* @property { boolean } recordIsDisabled 录制权限
|
|
550
595
|
*/
|
|
551
596
|
export interface IMeetingControl {
|
|
552
597
|
callIndex: number;
|
|
@@ -558,6 +603,9 @@ export interface IMeetingControl {
|
|
|
558
603
|
role: string;
|
|
559
604
|
type: string;
|
|
560
605
|
commonJson: string;
|
|
606
|
+
isMuteSpeaker: IMuteSpeaker;
|
|
607
|
+
recordIsDisabled: boolean;
|
|
608
|
+
groupInfoList: IGroupInfo[];
|
|
561
609
|
}
|
|
562
610
|
/**
|
|
563
611
|
* Roster:参会者的基本信息,包含基本信息,设备信息,画面信息等
|
|
@@ -581,6 +629,8 @@ export interface IMeetingControl {
|
|
|
581
629
|
* @property { string } id 参会者唯一id,值为 endpointId + mediagroupid,用于区分一个人同时发送people+content画面数据
|
|
582
630
|
* @property { string } extUserId 三方userId
|
|
583
631
|
* @property { boolean } isLocal 参会者是否是自己
|
|
632
|
+
* @property { number } ExpectHeight 期望分辨率
|
|
633
|
+
* @property { number } ExpectWidth 期望分辨率
|
|
584
634
|
*/
|
|
585
635
|
export interface IRoster {
|
|
586
636
|
deviceType: IDeviceType;
|
|
@@ -602,6 +652,8 @@ export interface IRoster {
|
|
|
602
652
|
id: string;
|
|
603
653
|
extUserId: string;
|
|
604
654
|
isLocal?: boolean;
|
|
655
|
+
ExpectHeight?: number;
|
|
656
|
+
ExpectWidth?: number;
|
|
605
657
|
}
|
|
606
658
|
/**
|
|
607
659
|
* Layout Result布局结果中返回的基础数据
|
|
@@ -726,11 +778,11 @@ export interface ILocalLayout extends ILayout {
|
|
|
726
778
|
isLocal: true;
|
|
727
779
|
}
|
|
728
780
|
/**
|
|
729
|
-
* 自动布局模式下,Layout
|
|
781
|
+
* 自动布局模式下,Layout Container的容器信息
|
|
730
782
|
* 计算得到的宽高能给铺满当前参会者的布局
|
|
731
783
|
*
|
|
732
|
-
* @property { number } width 减掉偏移左右值的
|
|
733
|
-
* @property { number } height 减掉偏移上下值的
|
|
784
|
+
* @property { number } width 减掉偏移左右值的Container容器宽
|
|
785
|
+
* @property { number } height 减掉偏移上下值的Container容器高
|
|
734
786
|
* @property { number } rateWidth 基于width配合 Layout Rate 计算得到的Layout Container容器宽
|
|
735
787
|
* @property { number } rateHeight 基于height配合 Layout Rate 计算得到的Layout Container容器高
|
|
736
788
|
*/
|
|
@@ -803,22 +855,6 @@ export interface ICustomLayout {
|
|
|
803
855
|
quality: IQualityType;
|
|
804
856
|
mediagroupid: number;
|
|
805
857
|
}
|
|
806
|
-
/**
|
|
807
|
-
* 1.x版本customLayoutSender所需的请流参数
|
|
808
|
-
*
|
|
809
|
-
* @property { number } pid 用户id,从roster中获取
|
|
810
|
-
* @property { 'low' | 'normal' | 'high' | 'hd' } quality 请求视频质量
|
|
811
|
-
* @param low 1 180P
|
|
812
|
-
* @param normal 2 360P
|
|
813
|
-
* @param high 3 720P
|
|
814
|
-
* @param hd 4 1080P
|
|
815
|
-
* @property { boolean } isContent 是否是共享内容,从roster中获取
|
|
816
|
-
*/
|
|
817
|
-
export interface IThidrCustomLayout {
|
|
818
|
-
pid: number;
|
|
819
|
-
quality: 'low' | 'normal' | 'high' | 'hd';
|
|
820
|
-
isContent: boolean;
|
|
821
|
-
}
|
|
822
858
|
/**
|
|
823
859
|
* 封装MediaStream
|
|
824
860
|
*/
|
|
@@ -860,18 +896,21 @@ export interface ISubTitle {
|
|
|
860
896
|
/**
|
|
861
897
|
* 字幕规则
|
|
862
898
|
*
|
|
899
|
+
* @property { string } content 字幕内容
|
|
900
|
+
* @property { string? } i18nKey 字幕内容key
|
|
863
901
|
* @property { string? } fontFamily 字体
|
|
864
902
|
* @property { string? } fontRGB 字体色
|
|
865
903
|
* @property { "1" | "0" } scroll 是否滚动
|
|
866
904
|
* @property { string? } action 动作
|
|
867
|
-
* @property { string } location 位置'top' | 'middle' | 'bottom'
|
|
868
|
-
* @property { string } fontSize 位置'small' | 'middle' | 'big'
|
|
869
|
-
* @property { string } backgroundAlpha 背景色
|
|
870
|
-
* @property { string } scrollSpeed 滚动速度
|
|
871
|
-
* @property { string }
|
|
872
|
-
* @property { string } backgroundRGB 背景色
|
|
905
|
+
* @property { string? } location 位置'top' | 'middle' | 'bottom'
|
|
906
|
+
* @property { string? } fontSize 位置'small' | 'middle' | 'big'
|
|
907
|
+
* @property { string? } backgroundAlpha 背景色
|
|
908
|
+
* @property { string? } scrollSpeed 滚动速度
|
|
909
|
+
* @property { string? } backgroundRGB 背景色
|
|
873
910
|
*/
|
|
874
911
|
export interface ISubTitleContent {
|
|
912
|
+
content: string;
|
|
913
|
+
i18nKey?: string;
|
|
875
914
|
fontFamily?: string;
|
|
876
915
|
fontRGB?: string;
|
|
877
916
|
scroll?: '1' | '0';
|
|
@@ -880,7 +919,6 @@ export interface ISubTitleContent {
|
|
|
880
919
|
fontSize?: 'small' | 'middle' | 'big';
|
|
881
920
|
backgroundAlpha?: string;
|
|
882
921
|
scrollSpeed?: string;
|
|
883
|
-
content: string;
|
|
884
922
|
backgroundRGB?: string;
|
|
885
923
|
}
|
|
886
924
|
export declare type IAudioRenders = {
|
|
@@ -893,6 +931,10 @@ export declare type IVideoRenders = {
|
|
|
893
931
|
match?: boolean;
|
|
894
932
|
};
|
|
895
933
|
};
|
|
934
|
+
/**
|
|
935
|
+
* 同传字幕: 本地支持的语言
|
|
936
|
+
*/
|
|
937
|
+
export declare type TLocalLanguage = typeof SupportLocalLanguages[number];
|
|
896
938
|
export interface IOutputCustomLayout {
|
|
897
939
|
[pid: string]: {
|
|
898
940
|
resolution: number;
|
|
@@ -921,14 +963,14 @@ export interface IConference {
|
|
|
921
963
|
* @property { 0 | 1 } bulkRosterType 全量roster类型,0表示全量数据,1表示增量数据
|
|
922
964
|
* @property { IRoster[] } addRosterInfo 新增的roster信息 当bulkRosterType是0的时候,此参数表示全量数据
|
|
923
965
|
* @property { IRoster[] } changeRosterInfo 变化的roster信息
|
|
924
|
-
* @property { { participantId:
|
|
966
|
+
* @property { { participantId: number }[] } deleteRosterInfo 被删除的roster信息
|
|
925
967
|
*/
|
|
926
968
|
export interface IBulkRoster {
|
|
927
969
|
bulkRosterType: 0 | 1;
|
|
928
970
|
addRosterInfo: IRoster[];
|
|
929
971
|
changeRosterInfo: IRoster[];
|
|
930
972
|
deleteRosterInfo: {
|
|
931
|
-
participantId:
|
|
973
|
+
participantId: number;
|
|
932
974
|
}[];
|
|
933
975
|
}
|
|
934
976
|
/**
|
|
@@ -980,4 +1022,85 @@ export declare enum AutoMute {
|
|
|
980
1022
|
export interface IGetConferenceParams {
|
|
981
1023
|
autoMute: AutoMute;
|
|
982
1024
|
}
|
|
1025
|
+
/**
|
|
1026
|
+
* 录制结果上报
|
|
1027
|
+
*
|
|
1028
|
+
* @property { string } reason stream id
|
|
1029
|
+
* @property { string } state
|
|
1030
|
+
* @property { boolean } isRecorded
|
|
1031
|
+
* @property { string } controlUri
|
|
1032
|
+
*/
|
|
1033
|
+
export interface IRecordingStateChanged {
|
|
1034
|
+
reason: string;
|
|
1035
|
+
state: string;
|
|
1036
|
+
isRecorded: boolean;
|
|
1037
|
+
controlUri: string;
|
|
1038
|
+
reasonText: string;
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* 录制状态上报
|
|
1042
|
+
*
|
|
1043
|
+
* @property { boolean } isStart stream id
|
|
1044
|
+
* @property { string } uri
|
|
1045
|
+
* @property { string } callUri
|
|
1046
|
+
* @property { string } callerUri
|
|
1047
|
+
* @property { string } status
|
|
1048
|
+
* @property { boolean } isLocal 是否是local开启的录制
|
|
1049
|
+
*/
|
|
1050
|
+
export interface IRecordStatusNotification {
|
|
1051
|
+
isStart: Boolean;
|
|
1052
|
+
uri: string;
|
|
1053
|
+
callUri: string;
|
|
1054
|
+
callerUri: string;
|
|
1055
|
+
status: string;
|
|
1056
|
+
isLocal: boolean;
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* 录制权限
|
|
1060
|
+
*
|
|
1061
|
+
* @property { boolean } authorize 权限
|
|
1062
|
+
* @property { string } recordingUrl 云会议室URI
|
|
1063
|
+
* @property { string? } developerMessage 云会议室的所属用户名称
|
|
1064
|
+
* @property { number? } errorCode 错误码
|
|
1065
|
+
* @property { string? } userMessage 错误信息
|
|
1066
|
+
*/
|
|
1067
|
+
export interface IRecordPermission {
|
|
1068
|
+
authorize: boolean;
|
|
1069
|
+
recordingUrl: string;
|
|
1070
|
+
developerMessage?: string;
|
|
1071
|
+
errorCode?: number;
|
|
1072
|
+
userMessage?: string;
|
|
1073
|
+
}
|
|
1074
|
+
/**
|
|
1075
|
+
* 同传字幕内容
|
|
1076
|
+
*
|
|
1077
|
+
* @property { number } pid 当前说话的终端
|
|
1078
|
+
* @property { string } src 原文
|
|
1079
|
+
* @property { string } target 译文
|
|
1080
|
+
* @property { number } seTime 发送时间
|
|
1081
|
+
* @property { number } startTime 开始时间
|
|
1082
|
+
* @property { number } endTime 结束时间
|
|
1083
|
+
* @property { boolean } isEnd 一句话是否结束
|
|
1084
|
+
* @property { boolean } isActive 活跃标志,收三路,同时只有一路active
|
|
1085
|
+
* @property { string } url 终端calluri
|
|
1086
|
+
* @property { string } dn 显示名称
|
|
1087
|
+
* @property { string } meetingId 会议号
|
|
1088
|
+
* @property { string } srcLang 原语言,zh表示中文,en表示英文
|
|
1089
|
+
* @property { string } targetLang 译文语言,zh表示中文,en表示英文
|
|
1090
|
+
*/
|
|
1091
|
+
export interface ITranslationContent {
|
|
1092
|
+
pid: number;
|
|
1093
|
+
src: string;
|
|
1094
|
+
target: string;
|
|
1095
|
+
seTime: number;
|
|
1096
|
+
startTime: number;
|
|
1097
|
+
endTime: number;
|
|
1098
|
+
isEnd: boolean;
|
|
1099
|
+
isActive: boolean;
|
|
1100
|
+
url: string;
|
|
1101
|
+
dn: string;
|
|
1102
|
+
meetingId: string;
|
|
1103
|
+
srcLang: string;
|
|
1104
|
+
targetLang: string;
|
|
1105
|
+
}
|
|
983
1106
|
export {};
|
package/lib/src/type/device.d.ts
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* @value granted 已授权
|
|
5
5
|
* @value denied 已拒绝
|
|
6
6
|
* @value prompt 询问中
|
|
7
|
-
* @value
|
|
7
|
+
* @value unknown 未知
|
|
8
8
|
* @value '' 默认
|
|
9
9
|
*/
|
|
10
|
-
export declare type TPermissionType = 'granted' | 'denied' | 'prompt' | '
|
|
10
|
+
export declare type TPermissionType = 'granted' | 'denied' | 'prompt' | 'unknown' | 'failed' | '';
|
|
11
11
|
/**
|
|
12
12
|
* 获取设备信息
|
|
13
13
|
*
|
package/lib/src/type/index.d.ts
CHANGED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 会议质量上报 基础数据
|
|
3
|
+
*
|
|
4
|
+
* @property { string } callNumber 会议号callUri
|
|
5
|
+
* @property { string } deviceId
|
|
6
|
+
* @property { string } meetingId 会议ID
|
|
7
|
+
* @property { string } osVersion 终端系统版本; 目前上报的是navigator.userAgent
|
|
8
|
+
* @property { string } sockProto 终端接入协议方式 udpProto
|
|
9
|
+
* @property { string } swVersion 终端软件版本
|
|
10
|
+
* @property { string } cdrVersion 统计版本号 目前传的是10
|
|
11
|
+
* @property { string } deviceType 设备类型 17
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export interface IMeetingQualityData {
|
|
15
|
+
callNumber: string;
|
|
16
|
+
deviceId: string;
|
|
17
|
+
meetingId: string;
|
|
18
|
+
osVersion: string;
|
|
19
|
+
sockProto: string;
|
|
20
|
+
swVersion: string;
|
|
21
|
+
cdrVersion: number;
|
|
22
|
+
deviceType: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* video 数据
|
|
26
|
+
*
|
|
27
|
+
* @property { number } fr 帧率
|
|
28
|
+
* @property { number } height 高
|
|
29
|
+
* @property { number } width 宽
|
|
30
|
+
*/
|
|
31
|
+
export interface IQualityVideoStream {
|
|
32
|
+
fr: number;
|
|
33
|
+
height: number;
|
|
34
|
+
width: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 远端video数据
|
|
38
|
+
*
|
|
39
|
+
* @property { number } participantId
|
|
40
|
+
* @property { IQualityVideoStream[] } videoStream
|
|
41
|
+
*/
|
|
42
|
+
export interface IQualityRecvStreams {
|
|
43
|
+
participantId: number;
|
|
44
|
+
videoStream: IQualityVideoStream[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 本地发送video数据
|
|
48
|
+
*
|
|
49
|
+
* @property { string } callUri
|
|
50
|
+
* @property { number } participantId
|
|
51
|
+
* @property { number } sessionId 媒体提供
|
|
52
|
+
* @property { IQualityVideoStream[] } audioStream
|
|
53
|
+
* @property { IQualityVideoStream[] } videoStream
|
|
54
|
+
*/
|
|
55
|
+
export interface IQualitySendStreams {
|
|
56
|
+
callUri: string;
|
|
57
|
+
participantId: number;
|
|
58
|
+
sessionId: number;
|
|
59
|
+
audioStream: IQualityVideoStream[];
|
|
60
|
+
videoStream: IQualityVideoStream[];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* video质量相关数据 统计相同分辨率的路数、平均帧率
|
|
64
|
+
*
|
|
65
|
+
* @property { number } Height 分辨率-高
|
|
66
|
+
* @property { number } Width 分辨率-宽
|
|
67
|
+
* @property { number } framerate 当前分辨率4s内平均帧率
|
|
68
|
+
* @property { number } resNum 当前分辨率的路数
|
|
69
|
+
* @property { number } resolution 分辨率 【似乎没用】
|
|
70
|
+
*/
|
|
71
|
+
export interface IVideoQuality {
|
|
72
|
+
Height: number;
|
|
73
|
+
Width: number;
|
|
74
|
+
framerate: number;
|
|
75
|
+
resNum: number;
|
|
76
|
+
resolution: number;
|
|
77
|
+
}
|