@xylink/xy-rtc-sdk 3.9.11-private.6 → 4.0.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.
- package/README.MD +36 -13
- package/lib/action/index.d.ts +106 -36
- package/lib/enum/analyser.d.ts +7 -0
- package/lib/enum/client.d.ts +8 -2
- package/lib/enum/constraints.d.ts +51 -0
- package/lib/enum/device.d.ts +28 -0
- package/lib/enum/errorCode.d.ts +8 -2
- package/lib/enum/i18n.d.ts +6 -0
- package/lib/enum/index.d.ts +90 -7
- package/lib/enum/meeting.d.ts +4 -0
- package/lib/enum/polling.d.ts +2 -11
- package/lib/feature/customMessage/index.d.ts +29 -0
- package/lib/feature/edu/index.d.ts +34 -0
- package/lib/feature/edu/index.type.d.ts +29 -0
- package/lib/feature/index.d.ts +3 -0
- package/lib/feature/speaker/index.d.ts +81 -0
- package/lib/feature/speaker/index.type.d.ts +17 -0
- package/lib/index.d.ts +84 -31
- package/lib/interface/baseModule.type.d.ts +9 -0
- package/lib/interface/clientInterface.type.d.ts +128 -0
- package/lib/interface/contentTrackInterface.type.d.ts +15 -0
- package/lib/interface/event.type.d.ts +444 -0
- package/lib/interface/videoAudioTrackInterface.type.d.ts +17 -0
- package/lib/main/ability/const.d.ts +5 -0
- package/lib/main/ability/index.d.ts +37 -0
- package/lib/main/{iauth.d.ts → auth/index.d.ts} +34 -26
- package/lib/main/client.d.ts +643 -637
- package/lib/main/clientBase.d.ts +40 -0
- package/lib/main/clientState.d.ts +56 -0
- package/lib/main/device/index.d.ts +272 -0
- package/lib/main/device/index.type.d.ts +204 -0
- package/lib/main/helper/index.d.ts +118 -0
- package/lib/main/helper/index.type.d.ts +12 -0
- package/lib/main/layout/index.d.ts +74 -108
- package/lib/main/layout/index.type.d.ts +282 -0
- package/lib/main/layout/polling.d.ts +17 -13
- package/lib/main/layout/state.d.ts +163 -0
- package/lib/main/layout/template.d.ts +3 -3
- package/lib/main/media/index.d.ts +177 -0
- package/lib/main/media/index.type.d.ts +29 -0
- package/lib/main/meeting/control.d.ts +107 -0
- package/lib/main/meeting/control.type.d.ts +24 -0
- package/lib/main/{meeting.d.ts → meeting/index.d.ts} +58 -28
- package/lib/main/meeting/verify.d.ts +70 -0
- package/lib/main/meeting/verify.type.d.ts +12 -0
- package/lib/main/peer.d.ts +67 -19
- package/lib/main/plugin/index.d.ts +28 -0
- package/lib/{tools/quality.d.ts → main/quality/index.d.ts} +2 -2
- package/lib/{tools → main/quality}/quality.worker.d.ts +1 -1
- package/lib/main/{qualityManager.d.ts → quality/report.d.ts} +11 -5
- package/lib/main/render/index.d.ts +116 -0
- package/lib/main/render/index.type.d.ts +36 -0
- package/lib/main/render/videoManager.d.ts +190 -0
- package/lib/main/render/videoManager.type.d.ts +66 -0
- package/lib/main/roster/index.d.ts +39 -0
- package/lib/main/server/index.d.ts +79 -0
- package/lib/main/server/index.type.d.ts +21 -0
- package/lib/main/signal/index.d.ts +15 -0
- package/lib/main/socket/index.d.ts +95 -0
- package/lib/main/stream/index.d.ts +182 -0
- package/lib/main/track/baseTrack.d.ts +178 -0
- package/lib/main/track/contentTrack.d.ts +168 -0
- package/lib/main/track/customContentTrack.d.ts +18 -0
- package/lib/main/track/customVideoAudioTrack.d.ts +18 -0
- package/lib/main/track/helper.d.ts +53 -0
- package/lib/main/track/videoAudioCapture.d.ts +90 -0
- package/lib/main/track/videoAudioTrack.d.ts +273 -0
- package/lib/main/vom/index.d.ts +44 -0
- package/lib/main/vom/index.type.d.ts +1 -0
- package/lib/tools/analyser.d.ts +53 -0
- package/lib/tools/analyserManager.d.ts +55 -0
- package/lib/tools/dbManager.d.ts +12 -1
- package/lib/tools/{browser.d.ts → detectBrowser/index.d.ts} +53 -5
- package/lib/tools/detectStream/index.d.ts +84 -0
- package/lib/tools/detectStream/index.type.d.ts +56 -0
- package/lib/tools/detectTool/index.d.ts +191 -0
- package/lib/tools/detectTool/index.type.d.ts +51 -0
- package/lib/tools/emitter.d.ts +27 -6
- package/lib/tools/enum.d.ts +1 -1
- package/lib/tools/httpClient.d.ts +23 -6
- package/lib/tools/i18n.d.ts +1 -1
- package/lib/tools/index.d.ts +5 -5
- package/lib/tools/{logger.d.ts → log/logger.d.ts} +59 -29
- package/lib/tools/{logger.worker.d.ts → log/logger.worker.d.ts} +1 -1
- package/lib/tools/log/loggerManager.d.ts +70 -0
- package/lib/tools/pressure/index.d.ts +33 -0
- package/lib/tools/pressure/index.type.d.ts +22 -0
- package/lib/tools/promiseQueue.d.ts +51 -0
- package/lib/tools/queue.d.ts +12 -15
- package/lib/tools/resize.d.ts +65 -0
- package/lib/tools/snapshot.d.ts +31 -0
- package/lib/tools/socket.d.ts +109 -32
- package/lib/tools/template/index.d.ts +3 -3
- package/lib/tools/template/mobile.d.ts +1 -1
- package/lib/tools/template/polling.d.ts +1 -1
- package/lib/tools/utils.d.ts +22 -19
- package/lib/tools/verify.d.ts +7 -0
- package/lib/type/ability.d.ts +25 -0
- package/lib/type/analyser.d.ts +43 -0
- package/lib/type/{iauth.d.ts → auth.d.ts} +22 -29
- package/lib/type/base.d.ts +41 -33
- package/lib/type/capture.d.ts +9 -0
- package/lib/type/client.d.ts +404 -498
- package/lib/type/index.d.ts +26 -2
- package/lib/type/layout.d.ts +25 -49
- package/lib/type/logger.d.ts +37 -12
- package/lib/type/meeting.d.ts +266 -27
- package/lib/type/peer.d.ts +24 -1
- package/lib/type/polling.d.ts +1 -49
- package/lib/type/quality.d.ts +16 -6
- package/lib/type/socket.d.ts +42 -0
- package/lib/type/stream.d.ts +154 -116
- package/lib/type/track.d.ts +139 -0
- package/lib/xyrtc.cjs.js +1 -1
- package/lib/xyrtc.umd.js +1 -1
- package/package.json +11 -3
- package/lib/enum/contraints.d.ts +0 -50
- package/lib/main/deviceManager.d.ts +0 -185
- package/lib/main/helper.d.ts +0 -79
- package/lib/main/stream.d.ts +0 -396
- package/lib/main/videoManager.d.ts +0 -57
- package/lib/tools/audioLevel.d.ts +0 -23
- package/lib/tools/detect.d.ts +0 -43
- package/lib/type/device.d.ts +0 -83
package/lib/type/polling.d.ts
CHANGED
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
* Polling Lib Type Defined
|
|
3
3
|
*
|
|
4
4
|
* Created at : 2022-10-27 18:13:24
|
|
5
|
-
* Last modified : 2024-04
|
|
5
|
+
* Last modified : 2024-06-04 16:41:42
|
|
6
6
|
*/
|
|
7
|
-
import { ILayoutState, IRoster } from './client';
|
|
8
|
-
import { ExternalTemplateConfig } from './layout';
|
|
9
7
|
/**
|
|
10
8
|
* 轮询多画面布局模型
|
|
11
9
|
*
|
|
@@ -194,49 +192,3 @@ export interface ICustomizedLayout {
|
|
|
194
192
|
skipUnjoined: boolean;
|
|
195
193
|
skipMuteVideo: boolean;
|
|
196
194
|
}
|
|
197
|
-
/**
|
|
198
|
-
* 多画面Layout数据
|
|
199
|
-
*
|
|
200
|
-
* @property { IRoster } roster - 参会者基本信息、状态信息,例如:用户名、麦克风/摄像头状态、是否是主会场等信息
|
|
201
|
-
* @property { ILayoutState } state - 当前参会者的画面状态信息,暂时未使用
|
|
202
|
-
* @property { any } rotate - 当前参会者的旋转信息,用于设置video标签样式
|
|
203
|
-
* @property { { left: string; top: string; width: string; height: string } } positionStyle - 当前参会者的位置样式
|
|
204
|
-
* @property { string } avatar - 人物头像
|
|
205
|
-
* @property { string } textAvatar - 名称头像
|
|
206
|
-
* @property { ExternalTemplateConfig } templateConfig - 忽略
|
|
207
|
-
* @property { { width: number; height: number } } positionInfo - 忽略
|
|
208
|
-
* @property { number[] } position - 忽略
|
|
209
|
-
* @property { boolean } deal - 忽略
|
|
210
|
-
* @property { number } index - 忽略
|
|
211
|
-
* @property { number } resolution - 忽略, 2.0.2以前的版本 自定义布局roster请流使用
|
|
212
|
-
* @property { number } quality - 忽略, 2.0.2以前的版本 自定义布局roster请流使用
|
|
213
|
-
* @property { AutoState } pollingState - 轮询多画面状态
|
|
214
|
-
* @property { string } pollingName - 多画面名称
|
|
215
|
-
* @property { string } id - Roster/Layout ID
|
|
216
|
-
*/
|
|
217
|
-
export interface PollingLayout {
|
|
218
|
-
roster: IRoster | null;
|
|
219
|
-
id: string;
|
|
220
|
-
state?: ILayoutState;
|
|
221
|
-
rotate?: any;
|
|
222
|
-
positionStyle?: {
|
|
223
|
-
left: string;
|
|
224
|
-
top: string;
|
|
225
|
-
width: string;
|
|
226
|
-
height: string;
|
|
227
|
-
};
|
|
228
|
-
avatar?: string;
|
|
229
|
-
textAvatar?: string;
|
|
230
|
-
templateConfig?: ExternalTemplateConfig;
|
|
231
|
-
position?: number[];
|
|
232
|
-
positionInfo?: {
|
|
233
|
-
width: number;
|
|
234
|
-
height: number;
|
|
235
|
-
};
|
|
236
|
-
deal?: boolean;
|
|
237
|
-
index?: number;
|
|
238
|
-
resolution?: number;
|
|
239
|
-
quality?: number;
|
|
240
|
-
pollingState?: AutoState;
|
|
241
|
-
pollingName?: string;
|
|
242
|
-
}
|
package/lib/type/quality.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Quality Type
|
|
3
3
|
*
|
|
4
4
|
* Created at : 2023-05-04 11:22:41
|
|
5
|
-
* Last modified :
|
|
5
|
+
* Last modified : 2024-06-05 11:07:38
|
|
6
6
|
*/
|
|
7
|
-
import { ILayout } from './
|
|
7
|
+
import { ILayout } from './index';
|
|
8
8
|
import { IStreamConfig } from './stream';
|
|
9
9
|
/**
|
|
10
10
|
* 网络质量信号等级
|
|
@@ -100,10 +100,10 @@ export interface IVideoQuality {
|
|
|
100
100
|
/**
|
|
101
101
|
* 远端网络质量信号等级
|
|
102
102
|
*
|
|
103
|
-
* @property { string } fromCallUri
|
|
104
|
-
* @property { number } fromPid
|
|
105
|
-
* @property { NetworkQualityLevel } networkLevel 网络质量信号等级
|
|
106
|
-
* @property { string } toCallUri
|
|
103
|
+
* @property { string } fromCallUri - 提供质量的callUri
|
|
104
|
+
* @property { number } fromPid - 提供质量的pid
|
|
105
|
+
* @property { NetworkQualityLevel } networkLevel - 网络质量信号等级
|
|
106
|
+
* @property { string } toCallUri - 发送给远端的CallUri
|
|
107
107
|
*
|
|
108
108
|
*/
|
|
109
109
|
export interface INetworkParameter {
|
|
@@ -136,6 +136,14 @@ export declare enum QualityOperateType {
|
|
|
136
136
|
REPORT_INTERNALS = "REPORT_INTERNALS",
|
|
137
137
|
REPORT_NETWORK_LEVEL = "REPORT_NETWORK_LEVEL"
|
|
138
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* 实时讲话人简化版本数据,用户匹配audio internal数据
|
|
141
|
+
*/
|
|
142
|
+
export interface IAudioSpeakerInfo {
|
|
143
|
+
name: string;
|
|
144
|
+
endpointId: string;
|
|
145
|
+
trackId: string;
|
|
146
|
+
}
|
|
139
147
|
/**
|
|
140
148
|
* 传递给Worker的原始数据
|
|
141
149
|
*
|
|
@@ -146,6 +154,7 @@ export declare enum QualityOperateType {
|
|
|
146
154
|
* @property { boolean } isContent - 是否是content
|
|
147
155
|
* @property { IStreamConfig } streamConfig - 流配置
|
|
148
156
|
* @property { boolean } isFirefox - 是否是火狐浏览器
|
|
157
|
+
* @property { IAudioSpeakerInfo } audioSpeaker - audio speaker讲话人信息
|
|
149
158
|
*/
|
|
150
159
|
export interface IWorkerVideoReceiver {
|
|
151
160
|
layoutItem?: ILayout;
|
|
@@ -155,6 +164,7 @@ export interface IWorkerVideoReceiver {
|
|
|
155
164
|
isContent?: boolean;
|
|
156
165
|
streamConfig?: IStreamConfig;
|
|
157
166
|
isFirefox?: boolean;
|
|
167
|
+
audioSpeaker?: IAudioSpeakerInfo;
|
|
158
168
|
}
|
|
159
169
|
/**
|
|
160
170
|
* 传递给Worker的结构数据
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Websocket options
|
|
3
|
+
*
|
|
4
|
+
* @param { string } url - Websocket URL
|
|
5
|
+
* @param { string[] } protocols - Websocket protocols
|
|
6
|
+
* @param { string } pingData - ping请求的默认发送内容
|
|
7
|
+
* @param { string } pangData - pong请求的默认发送内容
|
|
8
|
+
* @param { boolean } openHeatBeat - 开启心跳检测
|
|
9
|
+
* @param { boolean } autoReConnect - 自动重连
|
|
10
|
+
* @param { any } params - Params
|
|
11
|
+
*/
|
|
12
|
+
export interface SocketOptions {
|
|
13
|
+
url: string;
|
|
14
|
+
protocols?: string[];
|
|
15
|
+
pingData?: string;
|
|
16
|
+
pangData?: string;
|
|
17
|
+
openHeatBeat?: boolean;
|
|
18
|
+
autoReConnect?: boolean;
|
|
19
|
+
params?: any;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* socket 消息队列信息
|
|
23
|
+
*
|
|
24
|
+
* @param { string } id - 消息ID
|
|
25
|
+
* @param { any } data - 消息内容
|
|
26
|
+
* @param { number } maxRetries - 最大重试次数
|
|
27
|
+
*/
|
|
28
|
+
export interface SocketMessageData {
|
|
29
|
+
id: string;
|
|
30
|
+
data: any;
|
|
31
|
+
maxRetries?: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* socket消息
|
|
35
|
+
*
|
|
36
|
+
* @param { PING } PING - ping请求的默认发送内容
|
|
37
|
+
* @param { PONG } PONG - pong请求的默认发送内容
|
|
38
|
+
*/
|
|
39
|
+
export declare enum SocketMessage {
|
|
40
|
+
PING = "PING",
|
|
41
|
+
PONG = "PONG"
|
|
42
|
+
}
|
package/lib/type/stream.d.ts
CHANGED
|
@@ -1,30 +1,17 @@
|
|
|
1
|
-
import { FACING_MODE_LIST } from '../enum';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
* @param ENABLED 默认状态,无异常
|
|
7
|
-
* @param MUTE 流正在请求中
|
|
8
|
-
* @param ENDED 流已关闭
|
|
9
|
-
*/
|
|
10
|
-
export type IStreamTrackStatus = 'ENABLED' | 'MUTE' | 'ENDED';
|
|
1
|
+
import { FACING_MODE_LIST } from '../enum/index';
|
|
2
|
+
import { IReturnResult } from './base';
|
|
3
|
+
import { ContentMode } from './client';
|
|
4
|
+
import { XYDisplaySurface } from './track';
|
|
11
5
|
/**
|
|
12
6
|
* 设备类型枚举列表
|
|
13
7
|
*
|
|
14
8
|
* @param VIDEO video 视频设备
|
|
15
9
|
* @param AUDIO audio 音频设备
|
|
16
10
|
*/
|
|
17
|
-
export declare enum
|
|
11
|
+
export declare enum DEVICE_TYPE {
|
|
18
12
|
VIDEO = "video",
|
|
19
13
|
AUDIO = "audio"
|
|
20
14
|
}
|
|
21
|
-
/**
|
|
22
|
-
* 设备类型枚举列表
|
|
23
|
-
*
|
|
24
|
-
* @param VIDEO video 视频设备
|
|
25
|
-
* @param AUDIO audio 音频设备
|
|
26
|
-
*/
|
|
27
|
-
export type TDeviceKind = `${DeviceKind}`;
|
|
28
15
|
/**
|
|
29
16
|
* 请流时,控制流的帧率
|
|
30
17
|
*
|
|
@@ -88,6 +75,12 @@ export declare enum StreamType {
|
|
|
88
75
|
}
|
|
89
76
|
/**
|
|
90
77
|
* 分辨率枚举列表
|
|
78
|
+
*
|
|
79
|
+
* @param RS90 - 160*90
|
|
80
|
+
* @param RS180 - 320*180
|
|
81
|
+
* @param RS360 - 640*360
|
|
82
|
+
* @param RS720 - 1280*720
|
|
83
|
+
* @param RS1080 - 1920*1080
|
|
91
84
|
*/
|
|
92
85
|
export declare enum StreamResolution {
|
|
93
86
|
RS90 = 90,
|
|
@@ -115,7 +108,7 @@ export declare enum StreamResolutionLevel {
|
|
|
115
108
|
LEVEL1080 = 4
|
|
116
109
|
}
|
|
117
110
|
/**
|
|
118
|
-
*
|
|
111
|
+
* 视频质量等级
|
|
119
112
|
*
|
|
120
113
|
* @param LOW - 低画面质量,帧率会自动降低到15帧接收;
|
|
121
114
|
* @param NORMAL - 普通画面质量,会基于带宽信息自动在30/15帧切换;
|
|
@@ -220,10 +213,11 @@ export interface IStreamConfig {
|
|
|
220
213
|
type: StreamType;
|
|
221
214
|
status: StreamStatus;
|
|
222
215
|
stream: MediaStream | null;
|
|
216
|
+
streamId?: string;
|
|
223
217
|
pipeStream: TCustomStream[];
|
|
224
218
|
resolution: StreamResolution;
|
|
219
|
+
frameRate: StreamFrameRate;
|
|
225
220
|
kind?: StreamKind;
|
|
226
|
-
frameRate?: StreamFrameRate;
|
|
227
221
|
origin?: StreamOrigin;
|
|
228
222
|
constraintMode?: ConstraintMode;
|
|
229
223
|
simulcastMode?: SimulcastMode;
|
|
@@ -278,7 +272,7 @@ export type StreamsConfigMap = {
|
|
|
278
272
|
*/
|
|
279
273
|
export interface IStreamCurrent {
|
|
280
274
|
type: StreamCurrentType;
|
|
281
|
-
detail: string |
|
|
275
|
+
detail: string | IReturnResult;
|
|
282
276
|
}
|
|
283
277
|
/**
|
|
284
278
|
* publish推送流数据到Peer链接
|
|
@@ -287,12 +281,14 @@ export interface IStreamCurrent {
|
|
|
287
281
|
* @property { boolean } isShareFile 是否是分享文件
|
|
288
282
|
* @property { boolean } isShareWhiteBoard 是否是白板
|
|
289
283
|
* @property { boolean } isSharePeople 是否是people流
|
|
284
|
+
* @property { boolean } isSettingMode 是否是设置模式
|
|
290
285
|
*/
|
|
291
286
|
export interface IPublishParams {
|
|
292
287
|
isShareContent?: boolean;
|
|
293
288
|
isShareFile?: boolean;
|
|
294
289
|
isShareWhiteBoard?: boolean;
|
|
295
290
|
isSharePeople?: boolean;
|
|
291
|
+
isSettingMode?: boolean;
|
|
296
292
|
}
|
|
297
293
|
/**
|
|
298
294
|
* 封装Stream Sender
|
|
@@ -329,13 +325,13 @@ export type ISenderMap = {
|
|
|
329
325
|
/**
|
|
330
326
|
* Electron选择分享应用/屏幕资源
|
|
331
327
|
*
|
|
332
|
-
* @property { unknown } appIcon 资源icon
|
|
333
|
-
* @property { string } display_id 显示id
|
|
334
|
-
* @property { string } id 资源id
|
|
335
|
-
* @property { string } name 应用名称/屏幕名称
|
|
336
|
-
* @property { unknown } thumbnail thumbnail type is NativeImage
|
|
328
|
+
* @property { unknown } appIcon - 资源icon
|
|
329
|
+
* @property { string } display_id - 显示id
|
|
330
|
+
* @property { string } id - 资源id
|
|
331
|
+
* @property { string } name - 应用名称/屏幕名称
|
|
332
|
+
* @property { unknown } thumbnail - thumbnail type is NativeImage
|
|
337
333
|
*/
|
|
338
|
-
export interface
|
|
334
|
+
export interface XYElectronSource {
|
|
339
335
|
appIcon: any;
|
|
340
336
|
display_id: string;
|
|
341
337
|
id: string;
|
|
@@ -360,36 +356,33 @@ export interface IStreamInitConfig {
|
|
|
360
356
|
/**
|
|
361
357
|
* stream init第二个参数配置
|
|
362
358
|
*
|
|
363
|
-
* @property { boolean } muteVideo - 是否是关闭摄像头入会,默认是true,关闭摄像头
|
|
364
|
-
* @property { boolean } muteAudio - 是否是关闭麦克风入会,默认是true,关闭麦克风
|
|
365
359
|
* @property { boolean } enabledCustomStream - 是否启用自定义视频流
|
|
366
360
|
*/
|
|
367
361
|
export type IStreamInitParams = {
|
|
368
|
-
muteVideo?: boolean;
|
|
369
|
-
muteAudio?: boolean;
|
|
370
362
|
enabledCustomStream?: boolean;
|
|
371
363
|
};
|
|
372
364
|
/**
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
* @property { number } bytesReceived 接收的字节总数
|
|
376
|
-
* @property { number } bytesReceivedSecond 每秒接收字节数
|
|
377
|
-
* @property { number } bytesSent 发送的字节总数
|
|
378
|
-
* @property { number } bytesSentSecond 每秒发送字节数
|
|
379
|
-
* @property { number } jitterSent 发送的抖动(ms)
|
|
380
|
-
* @property { number } jitterReceived 接受的抖动(ms)
|
|
381
|
-
* @property { number }
|
|
382
|
-
* @property { number }
|
|
383
|
-
* @property { number }
|
|
384
|
-
* @property {
|
|
385
|
-
* @property { string }
|
|
386
|
-
* @property {
|
|
387
|
-
* @property {
|
|
388
|
-
* @property { [prop: string]:
|
|
389
|
-
* @property { [prop: string]:
|
|
390
|
-
* @property { [prop: string]:
|
|
391
|
-
* @property {
|
|
392
|
-
* @property { number }
|
|
365
|
+
* 质量统计数据
|
|
366
|
+
*
|
|
367
|
+
* @property { number } bytesReceived - 接收的字节总数
|
|
368
|
+
* @property { number } bytesReceivedSecond - 每秒接收字节数
|
|
369
|
+
* @property { number } bytesSent - 发送的字节总数
|
|
370
|
+
* @property { number } bytesSentSecond - 每秒发送字节数
|
|
371
|
+
* @property { number } jitterSent - 发送的抖动(ms)
|
|
372
|
+
* @property { number } jitterReceived - 接受的抖动(ms)
|
|
373
|
+
* @property { number } audioSendJitter - 音频发送抖动
|
|
374
|
+
* @property { number } roundTripTime - 往返延时 (ms)
|
|
375
|
+
* @property { number } fractionLostSent - 视频发送的丢包率
|
|
376
|
+
* @property { number } fractionLostReceived - 视频接受的丢包率
|
|
377
|
+
* @property { string } mimeType - 视频Codec类型
|
|
378
|
+
* @property { string } audioMimeType - 音频Codec类型
|
|
379
|
+
* @property { number } timestamp - 时间戳
|
|
380
|
+
* @property { [prop: string]: IReceiver } receiver - 所有接收视频的列表数据
|
|
381
|
+
* @property { [prop: string]: ISender } sender - 所有发送视频的列表数据
|
|
382
|
+
* @property { [prop: string]: IReceiver } audioReceiver - 所有接收音频的列表数据
|
|
383
|
+
* @property { [prop: string]: ISender } audioSender - 所有发送音频的列表数据
|
|
384
|
+
* @property { number } audioSendLost - 音频发送的丢包率
|
|
385
|
+
* @property { number } audioRecvLost - 音频接受的丢包率
|
|
393
386
|
*/
|
|
394
387
|
export interface IInternals {
|
|
395
388
|
bytesReceived: number;
|
|
@@ -425,39 +418,47 @@ export type IInternels = IInternals;
|
|
|
425
418
|
* 接收器 Receiver 统计数据
|
|
426
419
|
* 详情可参考:https://w3c.github.io/webrtc-stats/#dictionary-rtcreceivedrtpstreamstats-members
|
|
427
420
|
*
|
|
428
|
-
* @property { number } bytesReceived 接收总量
|
|
429
|
-
* @property { number } bytesReceivedSecond 每秒接收数据
|
|
430
|
-
* @property { number } frameHeight 解码帧的height
|
|
431
|
-
* @property { number } frameWidth 解码帧的width
|
|
432
|
-
* @property { number } framesDecoded frame编码量
|
|
433
|
-
* @property { number } framesDecodedSecond 每秒frame编码量
|
|
434
|
-
* @property { number } framesReceived frame接收量
|
|
435
|
-
* @property { number } framesReceivedSecond 每秒frame接收量
|
|
436
|
-
* @property { boolean } isContent 是否是分享content
|
|
437
|
-
* @property { boolean } isSupport 忽略
|
|
438
|
-
* @property { number } jitterBufferDelay 音频样本或视频帧从接收到退出抖动缓冲区所花费的时间总和,以秒为单位
|
|
439
|
-
* @property { number } keyFramesDecoded 代表关键帧的总数
|
|
440
|
-
* @property { number } nackCount 计算此接收器发送的否定确认(NACK)数据包的总数
|
|
441
|
-
* @property { string } name 与会者昵称
|
|
442
|
-
* @property { number } packetsReceived 此传输上收到的数据包总数
|
|
443
|
-
* @property { number } packetsReceivedSecond 此传输上每秒收到的数据包数量
|
|
444
|
-
* @property { number } packetsLost 此传输上丢失的数据包总数
|
|
445
|
-
* @property { number } packetsLostSecond 此传输上每秒丢失的数据包数量
|
|
446
|
-
* @property { number } pliCount 接收器发送的图片丢失指示(PLI)数据包的总数
|
|
447
|
-
* @property { number } timestamp 时间戳
|
|
448
|
-
* @property { string } type 与会者
|
|
449
|
-
* @property { number } expResolution 当前通道期望流分辨率
|
|
450
|
-
* @property { string } status 状态
|
|
451
|
-
* @property { number } framesPerSecond 此接收器解码的帧的 QP 值的总和
|
|
452
|
-
* @property {
|
|
421
|
+
* @property { number } bytesReceived - 接收总量
|
|
422
|
+
* @property { number } bytesReceivedSecond - 每秒接收数据
|
|
423
|
+
* @property { number } frameHeight - 解码帧的height
|
|
424
|
+
* @property { number } frameWidth - 解码帧的width
|
|
425
|
+
* @property { number } framesDecoded - frame编码量
|
|
426
|
+
* @property { number } framesDecodedSecond - 每秒frame编码量
|
|
427
|
+
* @property { number } framesReceived - frame接收量
|
|
428
|
+
* @property { number } framesReceivedSecond - 每秒frame接收量
|
|
429
|
+
* @property { boolean } isContent - 是否是分享content
|
|
430
|
+
* @property { boolean } isSupport - 忽略
|
|
431
|
+
* @property { number } jitterBufferDelay - 音频样本或视频帧从接收到退出抖动缓冲区所花费的时间总和,以秒为单位
|
|
432
|
+
* @property { number } keyFramesDecoded - 代表关键帧的总数
|
|
433
|
+
* @property { number } nackCount - 计算此接收器发送的否定确认(NACK)数据包的总数
|
|
434
|
+
* @property { string } name - 与会者昵称
|
|
435
|
+
* @property { number } packetsReceived - 此传输上收到的数据包总数
|
|
436
|
+
* @property { number } packetsReceivedSecond - 此传输上每秒收到的数据包数量
|
|
437
|
+
* @property { number } packetsLost - 此传输上丢失的数据包总数
|
|
438
|
+
* @property { number } packetsLostSecond - 此传输上每秒丢失的数据包数量
|
|
439
|
+
* @property { number } pliCount - 接收器发送的图片丢失指示(PLI)数据包的总数
|
|
440
|
+
* @property { number } timestamp - 时间戳
|
|
441
|
+
* @property { string } type - 与会者Type
|
|
442
|
+
* @property { number } expResolution - 当前通道期望流分辨率
|
|
443
|
+
* @property { string } status - 状态
|
|
444
|
+
* @property { number } framesPerSecond - 此接收器解码的帧的 QP 值的总和
|
|
445
|
+
* @property { number } framesDropped - 丢弃的帧数,由于网络问题、解码器缓冲区溢出或其他原因而丢弃的帧的数量
|
|
446
|
+
* @property { string } ssrc - 同步源 (ssrc) 标识符是每个 [RFC3550] 的无符号整数值,用于标识此 stats 对象正在描述的 RTP 数据包流;
|
|
453
447
|
* 对于出站和入站本地,ssrc 描述了分别由这些端点发送和接收的轨道的统计信息;
|
|
454
448
|
* 对于远程入站和远程出站,ssrc 描述了由远程端点接收和发送到远程端点的轨道的统计信息;
|
|
455
|
-
* @property { number } jitter 视频接收抖动
|
|
456
|
-
* @property { string } endpointId 参会者的callUri
|
|
457
|
-
* @property { string } participantId participantId
|
|
458
|
-
* @property {
|
|
459
|
-
* @property { number }
|
|
460
|
-
* @property { number }
|
|
449
|
+
* @property { number } jitter - 视频接收抖动
|
|
450
|
+
* @property { string } endpointId - 参会者的callUri
|
|
451
|
+
* @property { string } participantId - participantId
|
|
452
|
+
* @property { string } mimeType - 编码器类型
|
|
453
|
+
* @property { number } audioLevel - 音频音量大小
|
|
454
|
+
* @property { number } insertedSamplesForDeceleration - 减速的插入样本数,用于音频流,同步音频流和视频流(或其他参考时间),插入的音频样本的数量。插入样本会导致播放速度减慢
|
|
455
|
+
* @property { number } insertedSamplesForDecelerationSecond - 每秒用于减速的插入样本数
|
|
456
|
+
* @property { number } totalSamplesReceived - 接收到的总样本数,开始到现在接收到的音频样本的总数量,用于评估接收数据的总体规模
|
|
457
|
+
* @property { number } totalSamplesReceivedSecond - 每秒接收到的样本总数
|
|
458
|
+
* @property { number } removedSamplesForAcceleration - 加速的移除样本数,同步音频流和视频流(或其他参考时间),移除的音频样本的数量。移除样本会导致播放速度加快
|
|
459
|
+
* @property { number } removedSamplesForAccelerationSecond - 每秒用于加速的移除样本数
|
|
460
|
+
* @property { number } ExpectWidth - 当前通道期望宽度
|
|
461
|
+
* @property { number } ExpectHeight - 当前通道期望高度
|
|
461
462
|
*/
|
|
462
463
|
export interface IReceiver {
|
|
463
464
|
bytesReceived?: number;
|
|
@@ -504,33 +505,36 @@ export interface IReceiver {
|
|
|
504
505
|
* 发送器 Sender 统计数据
|
|
505
506
|
* 详情可以参考:https://w3c.github.io/webrtc-stats/#dictionary-rtcoutboundrtpstreamstats-members
|
|
506
507
|
*
|
|
507
|
-
* @property { number } bytesSent 此RTCIceTransport上发送的有效负载字节总数
|
|
508
|
-
* @property { number } bytesSentSecond 每秒发送有效负载字节数
|
|
509
|
-
* @property { number } frameHeight 编码帧的高度
|
|
510
|
-
* @property { number } frameWidth 编码帧的宽度
|
|
511
|
-
* @property { number } framesEncoded 此RTP媒体流成功编码的帧总数
|
|
512
|
-
* @property { number } framesEncodedSecond 每秒成功编码的帧数
|
|
513
|
-
* @property { number } framesSent 此RTP流上发送的帧总数
|
|
514
|
-
* @property { number } framesSentSecond 每秒发送的帧数
|
|
515
|
-
* @property { number } hugeFramesSent 此RTP流发送的huge帧的总数
|
|
516
|
-
* @property { string } status 忽略
|
|
517
|
-
* @property { number } keyFramesEncoded 此RTP媒体流编码的关键帧总数
|
|
518
|
-
* @property { number } packetsSent 此传输发送的数据包总数
|
|
519
|
-
* @property { number } packetsSentSecond 此传输每秒发送的数据包数
|
|
520
|
-
* @property { number } timestamp 时间戳
|
|
521
|
-
* @property { string } type 发送器类型
|
|
522
|
-
* @property { number } expBandwidth 期望带宽
|
|
523
|
-
* @property {
|
|
524
|
-
* @property { number } pliCount 计算此发送方收到的图片丢失指示 (PLI) 数据包的总数
|
|
525
|
-
* @property { number } firCount 接收方已向发送方发送的完整帧内请求 (FIR) 数据包的数量
|
|
526
|
-
* @property { number } nackCount 计算此发送方收到的否定确认 (NACK) 数据包的总数
|
|
527
|
-
* @property { string } ssrc 标识此 stats 对象正在描述的 RTP 数据包流;
|
|
508
|
+
* @property { number } bytesSent - 此RTCIceTransport上发送的有效负载字节总数
|
|
509
|
+
* @property { number } bytesSentSecond - 每秒发送有效负载字节数
|
|
510
|
+
* @property { number } frameHeight - 编码帧的高度
|
|
511
|
+
* @property { number } frameWidth - 编码帧的宽度
|
|
512
|
+
* @property { number } framesEncoded - 此RTP媒体流成功编码的帧总数
|
|
513
|
+
* @property { number } framesEncodedSecond - 每秒成功编码的帧数
|
|
514
|
+
* @property { number } framesSent - 此RTP流上发送的帧总数
|
|
515
|
+
* @property { number } framesSentSecond - 每秒发送的帧数
|
|
516
|
+
* @property { number } hugeFramesSent - 此RTP流发送的huge帧的总数
|
|
517
|
+
* @property { string } status - 忽略
|
|
518
|
+
* @property { number } keyFramesEncoded - 此RTP媒体流编码的关键帧总数
|
|
519
|
+
* @property { number } packetsSent - 此传输发送的数据包总数
|
|
520
|
+
* @property { number } packetsSentSecond - 此传输每秒发送的数据包数
|
|
521
|
+
* @property { number } timestamp - 时间戳
|
|
522
|
+
* @property { string } type - 发送器类型
|
|
523
|
+
* @property { number } expBandwidth - 期望带宽
|
|
524
|
+
* @property { StreamResolution } resolution - 分辨率
|
|
525
|
+
* @property { number } pliCount - 计算此发送方收到的图片丢失指示 (PLI) 数据包的总数
|
|
526
|
+
* @property { number } firCount - 接收方已向发送方发送的完整帧内请求 (FIR) 数据包的数量
|
|
527
|
+
* @property { number } nackCount - 计算此发送方收到的否定确认 (NACK) 数据包的总数
|
|
528
|
+
* @property { string } ssrc - 标识此 stats 对象正在描述的 RTP 数据包流;
|
|
528
529
|
* 对于出站和入站本地,ssrc 描述了分别由这些端点发送和接收的轨道的统计信息;
|
|
529
530
|
* 对于远程入站和远程出站,ssrc 描述了由远程端点接收和发送到远程端点的轨道的统计信息;
|
|
530
|
-
* @property {
|
|
531
|
-
* @property {
|
|
532
|
-
* @property {
|
|
533
|
-
* @property {
|
|
531
|
+
* @property { string } mimeType - 编码器类型
|
|
532
|
+
* @property { number } audioLevel - 音量大小
|
|
533
|
+
* @property { number } packetsLost - 丢包总数
|
|
534
|
+
* @property { number } packetsLostSecond - 丢包率
|
|
535
|
+
* @property { boolean } isContent - 是否是分享content
|
|
536
|
+
* @property { boolean } jitter - 抖动
|
|
537
|
+
* @property { boolean } roundTripTime - 往返延时
|
|
534
538
|
*/
|
|
535
539
|
export interface ISender {
|
|
536
540
|
bytesSent: number;
|
|
@@ -571,7 +575,7 @@ export interface ISender {
|
|
|
571
575
|
* @property { number } width 采集分辨率-width
|
|
572
576
|
* @property { number } height 采集分辨率-height
|
|
573
577
|
*/
|
|
574
|
-
export interface
|
|
578
|
+
export interface XYPeopleConfig {
|
|
575
579
|
frameRate?: ConstrainDouble;
|
|
576
580
|
aspectRatio?: number;
|
|
577
581
|
resizeMode?: 'crop-and-scale';
|
|
@@ -581,19 +585,22 @@ export interface I_PEOPLE_CONSTRAINTS {
|
|
|
581
585
|
/**
|
|
582
586
|
* 初始化视频约束设置
|
|
583
587
|
*
|
|
584
|
-
* @property { string } cursor 用于指定content分享时,是否指定显示鼠标指针的显示/隐藏或者是否需要录制鼠标
|
|
585
|
-
* @property { number } aspectRatio 期待采集视频比例
|
|
586
|
-
* @property { 'crop-and-scale' } resizeMode 裁剪模式,此处使用裁剪比例模式,以满足分辨率要求;
|
|
587
|
-
* @property { ConstrainDouble } frameRate
|
|
588
|
-
* @property { boolean } logicalSurface
|
|
589
|
-
*
|
|
588
|
+
* @property { string } cursor - 用于指定content分享时,是否指定显示鼠标指针的显示/隐藏或者是否需要录制鼠标
|
|
589
|
+
* @property { number } aspectRatio - 期待采集视频比例
|
|
590
|
+
* @property { 'crop-and-scale' } resizeMode - 裁剪模式,此处使用裁剪比例模式,以满足分辨率要求;
|
|
591
|
+
* @property { ConstrainDouble } frameRate - 帧率
|
|
592
|
+
* @property { boolean } logicalSurface - 指示是否允许用户共享应用时采集非活跃的画面内容(生效异常)
|
|
593
|
+
* @property { boolean } displaySurface - 指示用户分享应用的默认类型,可选:browser(浏览器标签)、monitor(屏幕)、window(应用),默认是monitor屏幕
|
|
594
|
+
*
|
|
595
|
+
* API详见:https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/logicalSurface
|
|
590
596
|
*/
|
|
591
|
-
export interface
|
|
597
|
+
export interface XYContentConfig {
|
|
592
598
|
cursor: string;
|
|
593
599
|
aspectRatio?: number;
|
|
594
600
|
resizeMode?: 'crop-and-scale';
|
|
595
|
-
logicalSurface
|
|
601
|
+
logicalSurface?: boolean;
|
|
596
602
|
frameRate?: ConstrainDouble;
|
|
603
|
+
displaySurface?: XYDisplaySurface;
|
|
597
604
|
}
|
|
598
605
|
/**
|
|
599
606
|
* 媒体通知Web对视频流的分辨率、带宽信息、帧率进行限制
|
|
@@ -663,3 +670,34 @@ export interface IFrameRateConfig {
|
|
|
663
670
|
}
|
|
664
671
|
export interface ISteamConfig {
|
|
665
672
|
}
|
|
673
|
+
/**
|
|
674
|
+
* 切换设备方法额外配置
|
|
675
|
+
*
|
|
676
|
+
* @property { boolean } isDefault - 可选,是否是系统默认设备,如果指定默认设备,则DeviceId可以提供空值
|
|
677
|
+
* @property { boolean } allowSpecifiedId - 可选,是否需要记录当前设备ID信息,默认内部的切换设备行为不需要记录,仅用户主动触发才会强制记录当前的设备ID信息
|
|
678
|
+
*/
|
|
679
|
+
export interface SwitchDeviceConfig {
|
|
680
|
+
isDefault?: boolean;
|
|
681
|
+
allowSpecifiedId?: boolean;
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* 控制分享Content的状态
|
|
685
|
+
*
|
|
686
|
+
* @property ACQUIRING - 应答中
|
|
687
|
+
* @property SENDING - 允许发送Content流
|
|
688
|
+
* @property IDLE - 结束分享
|
|
689
|
+
*/
|
|
690
|
+
export declare enum DualStreamState {
|
|
691
|
+
'ACQUIRING' = "ACQUIRING",
|
|
692
|
+
'SENDING' = "SENDING",
|
|
693
|
+
'IDLE' = "IDLE"
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* 信令控制Content状态消息
|
|
697
|
+
*/
|
|
698
|
+
export interface DualStreamMsg {
|
|
699
|
+
code: string;
|
|
700
|
+
mode: ContentMode;
|
|
701
|
+
state: DualStreamState;
|
|
702
|
+
type: 'DualStreamReport';
|
|
703
|
+
}
|