@xylink/xy-rtc-sdk 2.1.1 → 2.1.2-beta.7
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 +3 -1
- package/lib/index.js +3 -1
- package/lib/src/action/index.d.ts +130 -8
- package/lib/src/enum/contraints.d.ts +2 -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 +114 -30
- package/lib/src/main/deviceManager.d.ts +2 -2
- 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 +11 -2
- package/lib/src/main/qualityManager.d.ts +39 -0
- package/lib/src/main/stream.d.ts +4 -4
- 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 +55 -3
- package/lib/src/tools/httpClient.d.ts +6 -6
- package/lib/src/tools/logger.d.ts +1 -2
- package/lib/src/tools/socket.d.ts +1 -1
- package/lib/src/tools/utils.d.ts +2 -2
- package/lib/src/type/base.d.ts +2 -1
- 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 +48 -3
- package/package.json +1 -1
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
|
+
}
|
package/lib/src/type/stream.d.ts
CHANGED
|
@@ -158,7 +158,7 @@ export interface ISource {
|
|
|
158
158
|
* @value { string } devices.videoInValue 视频输入
|
|
159
159
|
* @value { string } devices.audioOutputValue 音频输出
|
|
160
160
|
*/
|
|
161
|
-
export declare type
|
|
161
|
+
export declare type IStreamInitConfig = {
|
|
162
162
|
devices: {
|
|
163
163
|
audioInputValue?: string;
|
|
164
164
|
videoInValue?: string;
|
|
@@ -172,18 +172,31 @@ export declare type IStreamInitConfog = {
|
|
|
172
172
|
* @property { number } bytesReceivedSecond 每秒接收字节数
|
|
173
173
|
* @property { number } bytesSent 发送的字节总数
|
|
174
174
|
* @property { number } bytesSentSecond 每秒发送字节数
|
|
175
|
+
* @property { number } jitterSent 发送的抖动(ms)
|
|
176
|
+
* @property { number } jitterReceived 接受的抖动(ms)
|
|
177
|
+
* @property { number } roundTripTime 往返延时 (ms)
|
|
178
|
+
* @property { number } fractionLostSent 视频发送的丢包率
|
|
179
|
+
* @property { number } fractionLostReceived 视频接受的丢包率
|
|
175
180
|
* @property { string } mimeType 视频类型
|
|
176
181
|
* @property { number } timestamp 时间戳
|
|
177
182
|
* @property { [prop: string]: IReceiver } receiver 所有接收视频的列表数据
|
|
178
183
|
* @property { [prop: string]: ISender } sender 所有发送视频的列表数据
|
|
179
184
|
* @property { [prop: string]: IReceiver } audioReceiver 所有接收音频的列表数据
|
|
180
185
|
* @property { [prop: string]: ISender } audioSender 所有发送音频的列表数据
|
|
186
|
+
* @property { number } audioSendLost 音频发送的丢包率
|
|
187
|
+
* @property { number } audioRecvLost 音频接受的丢包率
|
|
181
188
|
*/
|
|
182
189
|
export interface IInternels {
|
|
183
190
|
bytesReceived: number;
|
|
184
191
|
bytesReceivedSecond: number;
|
|
185
192
|
bytesSent: number;
|
|
186
193
|
bytesSentSecond: number;
|
|
194
|
+
jitterSent: number;
|
|
195
|
+
jitterReceived: number;
|
|
196
|
+
audioSendJitter: number;
|
|
197
|
+
roundTripTime: number;
|
|
198
|
+
fractionLostSent: number;
|
|
199
|
+
fractionLostReceived: number;
|
|
187
200
|
mimeType: string;
|
|
188
201
|
timestamp: number;
|
|
189
202
|
receiver: {
|
|
@@ -198,6 +211,8 @@ export interface IInternels {
|
|
|
198
211
|
audioSender: {
|
|
199
212
|
[prop: string]: ISender;
|
|
200
213
|
};
|
|
214
|
+
audioSendLost?: number;
|
|
215
|
+
audioRecvLost?: number;
|
|
201
216
|
}
|
|
202
217
|
/**
|
|
203
218
|
* 接收器 Receiver 统计数据
|
|
@@ -218,6 +233,9 @@ export interface IInternels {
|
|
|
218
233
|
* @property { number } nackCount 计算此接收器发送的否定确认(NACK)数据包的总数
|
|
219
234
|
* @property { string } name 与会者昵称
|
|
220
235
|
* @property { number } packetsReceived 此传输上收到的数据包总数
|
|
236
|
+
* @property { number } packetsReceivedSecond 此传输上每秒收到的数据包数量
|
|
237
|
+
* @property { number } packetsLost 此传输上丢失的数据包总数
|
|
238
|
+
* @property { number } packetsLostSecond 此传输上每秒丢失的数据包数量
|
|
221
239
|
* @property { number } pliCount 接收器发送的图片丢失指示(PLI)数据包的总数
|
|
222
240
|
* @property { number } timestamp 时间戳
|
|
223
241
|
* @property { string } type 与会者type
|
|
@@ -230,6 +248,9 @@ export interface IInternels {
|
|
|
230
248
|
* @property { number } jitter 视频接收抖动
|
|
231
249
|
* @property { string } endpointId 参会者的callUri
|
|
232
250
|
* @property { string } participantId participantId
|
|
251
|
+
* @property { number } totalSamplesReceived 总的接受采样点
|
|
252
|
+
* @property { number } insertedSamplesForDeceleration
|
|
253
|
+
* @property { number } removedSamplesForAcceleration
|
|
233
254
|
*/
|
|
234
255
|
export interface IReceiver {
|
|
235
256
|
bytesReceived: number;
|
|
@@ -247,6 +268,9 @@ export interface IReceiver {
|
|
|
247
268
|
nackCount: number;
|
|
248
269
|
name: string;
|
|
249
270
|
packetsReceived: number;
|
|
271
|
+
packetsReceivedSecond: number;
|
|
272
|
+
packetsLost: number;
|
|
273
|
+
packetsLostSecond: number;
|
|
250
274
|
pliCount: number;
|
|
251
275
|
timestamp: number;
|
|
252
276
|
type: string;
|
|
@@ -260,6 +284,14 @@ export interface IReceiver {
|
|
|
260
284
|
participantId?: number;
|
|
261
285
|
mimeType?: string;
|
|
262
286
|
audioLevel?: number;
|
|
287
|
+
insertedSamplesForDeceleration?: number;
|
|
288
|
+
insertedSamplesForDecelerationSecond?: number;
|
|
289
|
+
totalSamplesReceived?: number;
|
|
290
|
+
totalSamplesReceivedSecond?: number;
|
|
291
|
+
removedSamplesForAcceleration?: number;
|
|
292
|
+
removedSamplesForAccelerationSecond?: number;
|
|
293
|
+
ExpectWidth?: number;
|
|
294
|
+
ExpectHeight?: number;
|
|
263
295
|
}
|
|
264
296
|
/**
|
|
265
297
|
* 发送器 Sender 统计数据
|
|
@@ -277,15 +309,21 @@ export interface IReceiver {
|
|
|
277
309
|
* @property { string } status 忽略
|
|
278
310
|
* @property { number } keyFramesEncoded 此RTP媒体流编码的关键帧总数
|
|
279
311
|
* @property { number } packetsSent 此传输发送的数据包总数
|
|
312
|
+
* @property { number } packetsSentSecond 此传输每秒发送的数据包数
|
|
280
313
|
* @property { number } timestamp 时间戳
|
|
281
314
|
* @property { string } type 发送器类型
|
|
282
315
|
* @property { number } expBandwidth 期望带宽
|
|
283
316
|
* @property { string } string 分辨率
|
|
284
317
|
* @property { number } pliCount 计算此发送方收到的图片丢失指示 (PLI) 数据包的总数
|
|
318
|
+
* @property { number } firCount 接收方已向发送方发送的完整帧内请求 (FIR) 数据包的数量
|
|
285
319
|
* @property { number } nackCount 计算此发送方收到的否定确认 (NACK) 数据包的总数
|
|
286
320
|
* @property { string } ssrc 标识此 stats 对象正在描述的 RTP 数据包流;
|
|
287
321
|
* 对于出站和入站本地,ssrc 描述了分别由这些端点发送和接收的轨道的统计信息;
|
|
288
322
|
* 对于远程入站和远程出站,ssrc 描述了由远程端点接收和发送到远程端点的轨道的统计信息;
|
|
323
|
+
* @property { number } packetsLost 丢包总数
|
|
324
|
+
* @property { boolean } isContent 是否是分享content
|
|
325
|
+
* @property { boolean } jitter jitter
|
|
326
|
+
* @property { boolean } roundTripTime 往返延时
|
|
289
327
|
*/
|
|
290
328
|
export interface ISender {
|
|
291
329
|
bytesSent: number;
|
|
@@ -300,15 +338,22 @@ export interface ISender {
|
|
|
300
338
|
status: string;
|
|
301
339
|
keyFramesEncoded: number;
|
|
302
340
|
packetsSent: number;
|
|
341
|
+
packetsSentSecond: number;
|
|
303
342
|
timestamp: number;
|
|
304
343
|
type: string;
|
|
305
344
|
expBandwidth: number;
|
|
306
345
|
resolution: string;
|
|
307
346
|
pliCount: number;
|
|
347
|
+
firCount: number;
|
|
308
348
|
nackCount: number;
|
|
309
349
|
ssrc: string;
|
|
310
350
|
mimeType: string;
|
|
311
351
|
audioLevel?: number;
|
|
352
|
+
packetsLost: number;
|
|
353
|
+
packetsLostSecond: number;
|
|
354
|
+
isContent?: boolean;
|
|
355
|
+
jitter?: number;
|
|
356
|
+
roundTripTime?: number;
|
|
312
357
|
}
|
|
313
358
|
/**
|
|
314
359
|
* 基础视频约束配置
|
|
@@ -368,8 +413,8 @@ export interface IStreamChangeType {
|
|
|
368
413
|
/**
|
|
369
414
|
* 缓存content和people的StreamChange配置数据
|
|
370
415
|
*
|
|
371
|
-
* @property { IStreamChange[] } content content的
|
|
372
|
-
* @property { IStreamChange[] } people content的
|
|
416
|
+
* @property { IStreamChange[] } content content的streamChange数据
|
|
417
|
+
* @property { IStreamChange[] } people content的streamChange数据
|
|
373
418
|
*/
|
|
374
419
|
export interface IStreamChangeListType {
|
|
375
420
|
content: IStreamChange[];
|