@xylink/xy-rtc-sdk 2.1.2-beta.7 → 3.8.0-beta.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/README.MD +2 -37
- package/lib/{src/action → action}/index.d.ts +237 -230
- package/lib/{src/enum → enum}/contraints.d.ts +116 -115
- package/lib/{src/enum → enum}/errorCode.d.ts +880 -880
- package/lib/{src/enum → enum}/index.d.ts +137 -133
- package/lib/{src/index.d.ts → index.d.ts} +34 -34
- package/lib/{src/main → main}/client.d.ts +878 -797
- package/lib/{src/main → main}/deviceManager.d.ts +164 -165
- package/lib/{src/main → main}/helper.d.ts +51 -51
- package/lib/{src/main → main}/iauth.d.ts +33 -33
- package/lib/{src/main → main}/layoutManager.d.ts +214 -214
- package/lib/{src/main → main}/peer.d.ts +311 -295
- package/lib/{src/main → main}/qualityManager.d.ts +39 -39
- package/lib/{src/main → main}/stream.d.ts +263 -243
- package/lib/{src/main → main}/videoManager.d.ts +65 -65
- package/lib/{src/tools → tools}/audioLevel.d.ts +23 -23
- package/lib/{src/tools → tools}/browser.d.ts +55 -55
- package/lib/{src/tools → tools}/config.d.ts +12 -12
- package/lib/{src/tools → tools}/db.d.ts +85 -84
- package/lib/tools/detect.d.ts +44 -0
- package/lib/{src/tools → tools}/emmitter.d.ts +15 -15
- package/lib/{src/tools → tools}/enum.d.ts +6 -6
- package/lib/{src/tools → tools}/httpClient.d.ts +64 -61
- package/lib/{src/tools → tools}/i18n.d.ts +8 -8
- package/lib/{src/tools → tools}/index.d.ts +8 -3
- package/lib/{src/tools → tools}/logger.d.ts +151 -151
- package/lib/{src/tools → tools}/socket.d.ts +53 -50
- package/lib/{src/tools → tools}/store.d.ts +15 -15
- package/lib/{src/tools → tools}/template.d.ts +14 -14
- package/lib/{src/tools → tools}/utils.d.ts +73 -67
- package/lib/{src/tools → tools}/verify.d.ts +7 -7
- package/lib/{src/type → type}/base.d.ts +71 -67
- package/lib/{src/type → type}/client.d.ts +1121 -1106
- package/lib/{src/type → type}/device.d.ts +77 -77
- package/lib/{src/type → type}/index.d.ts +11 -11
- package/lib/{src/type → type}/quality.d.ts +77 -77
- package/lib/{src/type → type}/stream.d.ts +426 -422
- package/lib/xyrtc.cjs.js +1 -0
- package/lib/xyrtc.umd.js +1 -0
- package/package.json +43 -54
- package/scripts/build_lib.js +16 -0
- package/scripts/utils.js +27 -0
- package/scripts/webpack.common.js +139 -0
- package/scripts/webpack.dev.js +27 -0
- package/scripts/webpack.sdk.js +68 -0
- package/tsconfig.lib.json +37 -0
- package/lib/index.es.js +0 -3
- package/lib/index.js +0 -3
- package/lib/src/tools/detect.d.ts +0 -19
|
@@ -1,422 +1,426 @@
|
|
|
1
|
-
import { IStatus } from './base';
|
|
2
|
-
/**
|
|
3
|
-
* MediaTrack状态
|
|
4
|
-
*
|
|
5
|
-
* @value ENABLED 默认状态,无异常
|
|
6
|
-
* @value MUTE 流正在请求中
|
|
7
|
-
* @value ENDED 流已关闭
|
|
8
|
-
*/
|
|
9
|
-
export declare type IStreamTrackStatus = 'ENABLED' | 'MUTE' | 'ENDED';
|
|
10
|
-
/**
|
|
11
|
-
* 自定义流类型
|
|
12
|
-
*
|
|
13
|
-
* @property { 'video' | 'audio' } kind 流类型,分video和audio
|
|
14
|
-
*/
|
|
15
|
-
export declare type TCustomStream = {
|
|
16
|
-
kind: 'video' | 'audio';
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* 采集Media流的状态
|
|
20
|
-
*
|
|
21
|
-
* @value NORMAL 正常
|
|
22
|
-
* @value DOMSTRING 创建协商通道流
|
|
23
|
-
* @value INVALID 失效
|
|
24
|
-
*/
|
|
25
|
-
export declare type IStreamStatus = 'NORMAL' | 'DOMSTRING' | 'INVALID';
|
|
26
|
-
/**
|
|
27
|
-
* 自定义采集流时产生的状态
|
|
28
|
-
*
|
|
29
|
-
* @value NORMAL 采集正常
|
|
30
|
-
* @value SEND_ONLY 仅发送(无权限、无设备等无流入会情况)
|
|
31
|
-
* @value AUDIO_ONLY 仅采集麦克风流,视频流转仅接收模式
|
|
32
|
-
* @value VIDEO_ONLY 仅采集摄像头流,麦克风转仅接收模式
|
|
33
|
-
* @value FAILED 其他异常,无法入会
|
|
34
|
-
*/
|
|
35
|
-
export declare type IStreamCurrentType = 'NORMAL' | 'SEND_ONLY' | 'AUDIO_ONLY' | 'VIDEO_ONLY' | 'FAILED';
|
|
36
|
-
/**
|
|
37
|
-
* 自定义流类型
|
|
38
|
-
*
|
|
39
|
-
* @value contentStream 共享内容流
|
|
40
|
-
* @value previewStream 本地预览流
|
|
41
|
-
* @value pipelineStream 建立通道流
|
|
42
|
-
* @value remoteStream 仅接收远端画面流
|
|
43
|
-
*/
|
|
44
|
-
export declare type IStreamObjType = 'contentStream' | 'previewStream' | 'pipelineStream' | 'remoteStream';
|
|
45
|
-
/**
|
|
46
|
-
* 请流时,控制流的帧率
|
|
47
|
-
*
|
|
48
|
-
* @value 100 低帧率
|
|
49
|
-
* @value 200 高帧率
|
|
50
|
-
*/
|
|
51
|
-
export declare type IMediaQualityType = 0 | 100 | 200;
|
|
52
|
-
/**
|
|
53
|
-
* content采集支持分辨率
|
|
54
|
-
*
|
|
55
|
-
* @value 720 1280*720
|
|
56
|
-
* @value 1080 1920*1080
|
|
57
|
-
*/
|
|
58
|
-
export declare type IContentResolutionType = 720 | 1080;
|
|
59
|
-
/**
|
|
60
|
-
* people采集支持分辨率
|
|
61
|
-
*
|
|
62
|
-
* @value 180 320*180
|
|
63
|
-
* @value 360 640*360
|
|
64
|
-
* @value 720 1280*720
|
|
65
|
-
*/
|
|
66
|
-
export declare type IPeopleResolutionType = 180 | 360 | 720;
|
|
67
|
-
/**
|
|
68
|
-
* 自定义流数据
|
|
69
|
-
*
|
|
70
|
-
* @property { MediaStream | null } stream 采集设备流
|
|
71
|
-
* @property { TCustomStream[] } domStream 协商通道流
|
|
72
|
-
* @property { IStreamStatus } status 状态
|
|
73
|
-
* @property { IStreamObjType } type 自定义流类型
|
|
74
|
-
* @property { string } resolution 分辨率
|
|
75
|
-
*/
|
|
76
|
-
export interface IStreamObj {
|
|
77
|
-
stream: MediaStream | null;
|
|
78
|
-
domStream: TCustomStream[];
|
|
79
|
-
status: IStreamStatus;
|
|
80
|
-
type: IStreamObjType;
|
|
81
|
-
resolution: string;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* 流集合
|
|
85
|
-
*
|
|
86
|
-
* @property { IStreamObj[] } previewStreams 本地预览流
|
|
87
|
-
* @property { IStreamObj[] } streams 发送远端流
|
|
88
|
-
* @property { IStreamObj[] } pipelineStreams 协商通道流
|
|
89
|
-
* @property { IStreamObj[] } contentStreams 共享内容流
|
|
90
|
-
*/
|
|
91
|
-
export interface IGetMediaStreams {
|
|
92
|
-
previewStreams: IStreamObj[];
|
|
93
|
-
streams: IStreamObj[];
|
|
94
|
-
pipelineStreams: IStreamObj[];
|
|
95
|
-
contentStreams: IStreamObj[];
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Stream类采集流的状态和信息
|
|
99
|
-
*
|
|
100
|
-
* @property { IStreamCurrentType } type 流的采集状态:采集正常、仅发送、其他异常
|
|
101
|
-
* @property { string } detail 错误消息
|
|
102
|
-
*/
|
|
103
|
-
export interface IStreamCurrent {
|
|
104
|
-
type: IStreamCurrentType;
|
|
105
|
-
detail: string | IStatus;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* publish推送流数据到Peer链接
|
|
109
|
-
*
|
|
110
|
-
* @property { boolean } isShareContent 是否是共享内容流
|
|
111
|
-
* @property { boolean } isShareFile 是否是分享文件
|
|
112
|
-
* @property { boolean } isShareWhiteBoard 是否是白板
|
|
113
|
-
* @property { boolean } isSharePeople 是否是people流
|
|
114
|
-
*/
|
|
115
|
-
export interface IPublishParams {
|
|
116
|
-
isShareContent?: boolean;
|
|
117
|
-
isShareFile?: boolean;
|
|
118
|
-
isShareWhiteBoard?: boolean;
|
|
119
|
-
isSharePeople?: boolean;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* 封装Stream Sender
|
|
123
|
-
*
|
|
124
|
-
* @property { string } resolution 当前通道发送的流的分辨率
|
|
125
|
-
* @property { MediaStreamTrack | null } track 当前通道发送的Track流
|
|
126
|
-
* @property { RTCRtpSender | null } RTCSender
|
|
127
|
-
* @property { string } status 状态
|
|
128
|
-
* @property { string } type 类型
|
|
129
|
-
*/
|
|
130
|
-
export interface IStreamSender {
|
|
131
|
-
resolution: string;
|
|
132
|
-
track: MediaStreamTrack | null;
|
|
133
|
-
sender: RTCRtpSender;
|
|
134
|
-
status: string;
|
|
135
|
-
type: string;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Electron选择分享应用/屏幕资源
|
|
139
|
-
*
|
|
140
|
-
* @property { unknown } appIcon 资源icon
|
|
141
|
-
* @property { string } display_id 显示id
|
|
142
|
-
* @property { string } id 资源id
|
|
143
|
-
* @property { string } name 应用名称/屏幕名称
|
|
144
|
-
* @property { unknown } thumbnail thumbnail type is NativeImage
|
|
145
|
-
*/
|
|
146
|
-
export interface ISource {
|
|
147
|
-
appIcon: any;
|
|
148
|
-
display_id: string;
|
|
149
|
-
id: string;
|
|
150
|
-
name: string;
|
|
151
|
-
thumbnail: any;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* stream init配置参数,用于在初始采集视频/音频流时指定设备信息
|
|
155
|
-
*
|
|
156
|
-
* @property { Object } devices 麦克风/摄像头/扬声器 设备id
|
|
157
|
-
* @value { string } devices.audioInputValue 音频输入
|
|
158
|
-
* @value { string } devices.videoInValue 视频输入
|
|
159
|
-
* @value { string } devices.audioOutputValue 音频输出
|
|
160
|
-
*/
|
|
161
|
-
export declare type IStreamInitConfig = {
|
|
162
|
-
devices: {
|
|
163
|
-
audioInputValue?: string;
|
|
164
|
-
videoInValue?: string;
|
|
165
|
-
audioOutputValue?: string;
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
/**
|
|
169
|
-
* Internels 统计数据
|
|
170
|
-
*
|
|
171
|
-
* @property { number } bytesReceived 接收的字节总数
|
|
172
|
-
* @property { number } bytesReceivedSecond 每秒接收字节数
|
|
173
|
-
* @property { number } bytesSent 发送的字节总数
|
|
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 视频接受的丢包率
|
|
180
|
-
* @property { string } mimeType 视频类型
|
|
181
|
-
* @property { number } timestamp 时间戳
|
|
182
|
-
* @property { [prop: string]: IReceiver } receiver 所有接收视频的列表数据
|
|
183
|
-
* @property { [prop: string]: ISender } sender 所有发送视频的列表数据
|
|
184
|
-
* @property { [prop: string]: IReceiver } audioReceiver 所有接收音频的列表数据
|
|
185
|
-
* @property { [prop: string]: ISender } audioSender 所有发送音频的列表数据
|
|
186
|
-
* @property { number } audioSendLost 音频发送的丢包率
|
|
187
|
-
* @property { number } audioRecvLost 音频接受的丢包率
|
|
188
|
-
*/
|
|
189
|
-
export interface IInternels {
|
|
190
|
-
bytesReceived: number;
|
|
191
|
-
bytesReceivedSecond: number;
|
|
192
|
-
bytesSent: number;
|
|
193
|
-
bytesSentSecond: number;
|
|
194
|
-
jitterSent: number;
|
|
195
|
-
jitterReceived: number;
|
|
196
|
-
audioSendJitter: number;
|
|
197
|
-
roundTripTime: number;
|
|
198
|
-
fractionLostSent: number;
|
|
199
|
-
fractionLostReceived: number;
|
|
200
|
-
mimeType: string;
|
|
201
|
-
timestamp: number;
|
|
202
|
-
receiver: {
|
|
203
|
-
[prop: string]: IReceiver;
|
|
204
|
-
};
|
|
205
|
-
sender: {
|
|
206
|
-
[prop: string]: ISender;
|
|
207
|
-
};
|
|
208
|
-
audioReceiver: {
|
|
209
|
-
[prop: string]: IReceiver;
|
|
210
|
-
};
|
|
211
|
-
audioSender: {
|
|
212
|
-
[prop: string]: ISender;
|
|
213
|
-
};
|
|
214
|
-
audioSendLost?: number;
|
|
215
|
-
audioRecvLost?: number;
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* 接收器 Receiver 统计数据
|
|
219
|
-
* 详情可参考:https://w3c.github.io/webrtc-stats/#dictionary-rtcreceivedrtpstreamstats-members
|
|
220
|
-
*
|
|
221
|
-
* @property { number } bytesReceived 接收总量
|
|
222
|
-
* @property { number } bytesReceivedSecond 每秒接收数据
|
|
223
|
-
* @property { number } frameHeight 解码帧的height
|
|
224
|
-
* @property { number } frameWidth 解码帧的width
|
|
225
|
-
* @property { number } framesDecoded frame编码量
|
|
226
|
-
* @property { number } framesDecodedSecond 每秒frame编码量
|
|
227
|
-
* @property { number } framesReceived frame接收量
|
|
228
|
-
* @property { number } framesReceivedSecond 每秒frame接收量
|
|
229
|
-
* @property { boolean } isContent 是否是分享content
|
|
230
|
-
* @property { boolean } isSupport 忽略
|
|
231
|
-
* @property { number } jitterBufferDelay 音频样本或视频帧从接收到退出抖动缓冲区所花费的时间总和,以秒为单位
|
|
232
|
-
* @property { number } keyFramesDecoded 代表关键帧的总数
|
|
233
|
-
* @property { number } nackCount 计算此接收器发送的否定确认(NACK)数据包的总数
|
|
234
|
-
* @property { string } name 与会者昵称
|
|
235
|
-
* @property { number } packetsReceived 此传输上收到的数据包总数
|
|
236
|
-
* @property { number } packetsReceivedSecond 此传输上每秒收到的数据包数量
|
|
237
|
-
* @property { number } packetsLost 此传输上丢失的数据包总数
|
|
238
|
-
* @property { number } packetsLostSecond 此传输上每秒丢失的数据包数量
|
|
239
|
-
* @property { number } pliCount 接收器发送的图片丢失指示(PLI)数据包的总数
|
|
240
|
-
* @property { number } timestamp 时间戳
|
|
241
|
-
* @property { string } type 与会者type
|
|
242
|
-
* @property { number } expResolution 当前通道期望流分辨率
|
|
243
|
-
* @property { string } status 状态
|
|
244
|
-
* @property { number } framesPerSecond 此接收器解码的帧的 QP 值的总和
|
|
245
|
-
* @property { string } ssrc 同步源 (ssrc) 标识符是每个 [RFC3550] 的无符号整数值,用于标识此 stats 对象正在描述的 RTP 数据包流;
|
|
246
|
-
* 对于出站和入站本地,ssrc 描述了分别由这些端点发送和接收的轨道的统计信息;
|
|
247
|
-
* 对于远程入站和远程出站,ssrc 描述了由远程端点接收和发送到远程端点的轨道的统计信息;
|
|
248
|
-
* @property { number } jitter 视频接收抖动
|
|
249
|
-
* @property { string } endpointId 参会者的callUri
|
|
250
|
-
* @property { string } participantId participantId
|
|
251
|
-
* @property { number } totalSamplesReceived 总的接受采样点
|
|
252
|
-
* @property { number } insertedSamplesForDeceleration
|
|
253
|
-
* @property { number } removedSamplesForAcceleration
|
|
254
|
-
*/
|
|
255
|
-
export interface IReceiver {
|
|
256
|
-
bytesReceived: number;
|
|
257
|
-
bytesReceivedSecond: number;
|
|
258
|
-
frameHeight: number;
|
|
259
|
-
frameWidth: number;
|
|
260
|
-
framesDecoded: number;
|
|
261
|
-
framesDecodedSecond: number;
|
|
262
|
-
framesReceived: number;
|
|
263
|
-
framesReceivedSecond: number;
|
|
264
|
-
isContent: boolean;
|
|
265
|
-
isSupport: boolean;
|
|
266
|
-
jitterBufferDelay: number;
|
|
267
|
-
keyFramesDecoded: number;
|
|
268
|
-
nackCount: number;
|
|
269
|
-
name: string;
|
|
270
|
-
packetsReceived: number;
|
|
271
|
-
packetsReceivedSecond: number;
|
|
272
|
-
packetsLost: number;
|
|
273
|
-
packetsLostSecond: number;
|
|
274
|
-
pliCount: number;
|
|
275
|
-
timestamp: number;
|
|
276
|
-
type: string;
|
|
277
|
-
expResolution: number;
|
|
278
|
-
status: string;
|
|
279
|
-
framesPerSecond: number;
|
|
280
|
-
framesDropped: number;
|
|
281
|
-
ssrc: string;
|
|
282
|
-
jitter: number;
|
|
283
|
-
endpointId?: string;
|
|
284
|
-
participantId?: number;
|
|
285
|
-
mimeType?: string;
|
|
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;
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* 发送器 Sender 统计数据
|
|
298
|
-
* 详情可以参考:https://w3c.github.io/webrtc-stats/#dictionary-rtcoutboundrtpstreamstats-members
|
|
299
|
-
*
|
|
300
|
-
* @property { number } bytesSent 此RTCIceTransport上发送的有效负载字节总数
|
|
301
|
-
* @property { number } bytesSentSecond 每秒发送有效负载字节数
|
|
302
|
-
* @property { number } frameHeight 编码帧的高度
|
|
303
|
-
* @property { number } frameWidth 编码帧的宽度
|
|
304
|
-
* @property { number } framesEncoded 此RTP媒体流成功编码的帧总数
|
|
305
|
-
* @property { number } framesEncodedSecond 每秒成功编码的帧数
|
|
306
|
-
* @property { number } framesSent 此RTP流上发送的帧总数
|
|
307
|
-
* @property { number } framesSentSecond 每秒发送的帧数
|
|
308
|
-
* @property { number } hugeFramesSent 此RTP流发送的huge帧的总数
|
|
309
|
-
* @property { string } status 忽略
|
|
310
|
-
* @property { number } keyFramesEncoded 此RTP媒体流编码的关键帧总数
|
|
311
|
-
* @property { number } packetsSent 此传输发送的数据包总数
|
|
312
|
-
* @property { number } packetsSentSecond 此传输每秒发送的数据包数
|
|
313
|
-
* @property { number } timestamp 时间戳
|
|
314
|
-
* @property { string } type 发送器类型
|
|
315
|
-
* @property { number } expBandwidth 期望带宽
|
|
316
|
-
* @property { string } string 分辨率
|
|
317
|
-
* @property { number } pliCount 计算此发送方收到的图片丢失指示 (PLI) 数据包的总数
|
|
318
|
-
* @property { number } firCount 接收方已向发送方发送的完整帧内请求 (FIR) 数据包的数量
|
|
319
|
-
* @property { number } nackCount 计算此发送方收到的否定确认 (NACK) 数据包的总数
|
|
320
|
-
* @property { string } ssrc 标识此 stats 对象正在描述的 RTP 数据包流;
|
|
321
|
-
* 对于出站和入站本地,ssrc 描述了分别由这些端点发送和接收的轨道的统计信息;
|
|
322
|
-
* 对于远程入站和远程出站,ssrc 描述了由远程端点接收和发送到远程端点的轨道的统计信息;
|
|
323
|
-
* @property { number } packetsLost 丢包总数
|
|
324
|
-
* @property { boolean } isContent 是否是分享content
|
|
325
|
-
* @property { boolean } jitter jitter
|
|
326
|
-
* @property { boolean } roundTripTime 往返延时
|
|
327
|
-
*/
|
|
328
|
-
export interface ISender {
|
|
329
|
-
bytesSent: number;
|
|
330
|
-
bytesSentSecond: number;
|
|
331
|
-
frameHeight: number;
|
|
332
|
-
frameWidth: number;
|
|
333
|
-
framesEncoded: number;
|
|
334
|
-
framesEncodedSecond: number;
|
|
335
|
-
framesSent: number;
|
|
336
|
-
framesSentSecond: number;
|
|
337
|
-
hugeFramesSent: number;
|
|
338
|
-
status: string;
|
|
339
|
-
keyFramesEncoded: number;
|
|
340
|
-
packetsSent: number;
|
|
341
|
-
packetsSentSecond: number;
|
|
342
|
-
timestamp: number;
|
|
343
|
-
type: string;
|
|
344
|
-
expBandwidth: number;
|
|
345
|
-
resolution: string;
|
|
346
|
-
pliCount: number;
|
|
347
|
-
firCount: number;
|
|
348
|
-
nackCount: number;
|
|
349
|
-
ssrc: string;
|
|
350
|
-
mimeType: string;
|
|
351
|
-
audioLevel?: number;
|
|
352
|
-
packetsLost: number;
|
|
353
|
-
packetsLostSecond: number;
|
|
354
|
-
isContent?: boolean;
|
|
355
|
-
jitter?: number;
|
|
356
|
-
roundTripTime?: number;
|
|
357
|
-
}
|
|
358
|
-
/**
|
|
359
|
-
* 基础视频约束配置
|
|
360
|
-
*
|
|
361
|
-
* @property { ConstrainDouble } frameRate 帧率配置
|
|
362
|
-
* @property { number } aspectRatio 视频比例
|
|
363
|
-
* @property { 'crop-and-scale' } resizeMode 裁剪模式,此处使用裁剪比例模式,以满足分辨率要求;
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
* @property {
|
|
378
|
-
*
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
*
|
|
393
|
-
*
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
*
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
1
|
+
import { IStatus } from './base';
|
|
2
|
+
/**
|
|
3
|
+
* MediaTrack状态
|
|
4
|
+
*
|
|
5
|
+
* @value ENABLED 默认状态,无异常
|
|
6
|
+
* @value MUTE 流正在请求中
|
|
7
|
+
* @value ENDED 流已关闭
|
|
8
|
+
*/
|
|
9
|
+
export declare type IStreamTrackStatus = 'ENABLED' | 'MUTE' | 'ENDED';
|
|
10
|
+
/**
|
|
11
|
+
* 自定义流类型
|
|
12
|
+
*
|
|
13
|
+
* @property { 'video' | 'audio' } kind 流类型,分video和audio
|
|
14
|
+
*/
|
|
15
|
+
export declare type TCustomStream = {
|
|
16
|
+
kind: 'video' | 'audio';
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 采集Media流的状态
|
|
20
|
+
*
|
|
21
|
+
* @value NORMAL 正常
|
|
22
|
+
* @value DOMSTRING 创建协商通道流
|
|
23
|
+
* @value INVALID 失效
|
|
24
|
+
*/
|
|
25
|
+
export declare type IStreamStatus = 'NORMAL' | 'DOMSTRING' | 'INVALID';
|
|
26
|
+
/**
|
|
27
|
+
* 自定义采集流时产生的状态
|
|
28
|
+
*
|
|
29
|
+
* @value NORMAL 采集正常
|
|
30
|
+
* @value SEND_ONLY 仅发送(无权限、无设备等无流入会情况)
|
|
31
|
+
* @value AUDIO_ONLY 仅采集麦克风流,视频流转仅接收模式
|
|
32
|
+
* @value VIDEO_ONLY 仅采集摄像头流,麦克风转仅接收模式
|
|
33
|
+
* @value FAILED 其他异常,无法入会
|
|
34
|
+
*/
|
|
35
|
+
export declare type IStreamCurrentType = 'NORMAL' | 'SEND_ONLY' | 'AUDIO_ONLY' | 'VIDEO_ONLY' | 'FAILED';
|
|
36
|
+
/**
|
|
37
|
+
* 自定义流类型
|
|
38
|
+
*
|
|
39
|
+
* @value contentStream 共享内容流
|
|
40
|
+
* @value previewStream 本地预览流
|
|
41
|
+
* @value pipelineStream 建立通道流
|
|
42
|
+
* @value remoteStream 仅接收远端画面流
|
|
43
|
+
*/
|
|
44
|
+
export declare type IStreamObjType = 'contentStream' | 'previewStream' | 'pipelineStream' | 'remoteStream';
|
|
45
|
+
/**
|
|
46
|
+
* 请流时,控制流的帧率
|
|
47
|
+
*
|
|
48
|
+
* @value 100 低帧率
|
|
49
|
+
* @value 200 高帧率
|
|
50
|
+
*/
|
|
51
|
+
export declare type IMediaQualityType = 0 | 100 | 200;
|
|
52
|
+
/**
|
|
53
|
+
* content采集支持分辨率
|
|
54
|
+
*
|
|
55
|
+
* @value 720 1280*720
|
|
56
|
+
* @value 1080 1920*1080
|
|
57
|
+
*/
|
|
58
|
+
export declare type IContentResolutionType = 720 | 1080;
|
|
59
|
+
/**
|
|
60
|
+
* people采集支持分辨率
|
|
61
|
+
*
|
|
62
|
+
* @value 180 320*180
|
|
63
|
+
* @value 360 640*360
|
|
64
|
+
* @value 720 1280*720
|
|
65
|
+
*/
|
|
66
|
+
export declare type IPeopleResolutionType = 180 | 360 | 720;
|
|
67
|
+
/**
|
|
68
|
+
* 自定义流数据
|
|
69
|
+
*
|
|
70
|
+
* @property { MediaStream | null } stream 采集设备流
|
|
71
|
+
* @property { TCustomStream[] } domStream 协商通道流
|
|
72
|
+
* @property { IStreamStatus } status 状态
|
|
73
|
+
* @property { IStreamObjType } type 自定义流类型
|
|
74
|
+
* @property { string } resolution 分辨率
|
|
75
|
+
*/
|
|
76
|
+
export interface IStreamObj {
|
|
77
|
+
stream: MediaStream | null;
|
|
78
|
+
domStream: TCustomStream[];
|
|
79
|
+
status: IStreamStatus;
|
|
80
|
+
type: IStreamObjType;
|
|
81
|
+
resolution: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* 流集合
|
|
85
|
+
*
|
|
86
|
+
* @property { IStreamObj[] } previewStreams 本地预览流
|
|
87
|
+
* @property { IStreamObj[] } streams 发送远端流
|
|
88
|
+
* @property { IStreamObj[] } pipelineStreams 协商通道流
|
|
89
|
+
* @property { IStreamObj[] } contentStreams 共享内容流
|
|
90
|
+
*/
|
|
91
|
+
export interface IGetMediaStreams {
|
|
92
|
+
previewStreams: IStreamObj[];
|
|
93
|
+
streams: IStreamObj[];
|
|
94
|
+
pipelineStreams: IStreamObj[];
|
|
95
|
+
contentStreams: IStreamObj[];
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Stream类采集流的状态和信息
|
|
99
|
+
*
|
|
100
|
+
* @property { IStreamCurrentType } type 流的采集状态:采集正常、仅发送、其他异常
|
|
101
|
+
* @property { string } detail 错误消息
|
|
102
|
+
*/
|
|
103
|
+
export interface IStreamCurrent {
|
|
104
|
+
type: IStreamCurrentType;
|
|
105
|
+
detail: string | IStatus;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* publish推送流数据到Peer链接
|
|
109
|
+
*
|
|
110
|
+
* @property { boolean } isShareContent 是否是共享内容流
|
|
111
|
+
* @property { boolean } isShareFile 是否是分享文件
|
|
112
|
+
* @property { boolean } isShareWhiteBoard 是否是白板
|
|
113
|
+
* @property { boolean } isSharePeople 是否是people流
|
|
114
|
+
*/
|
|
115
|
+
export interface IPublishParams {
|
|
116
|
+
isShareContent?: boolean;
|
|
117
|
+
isShareFile?: boolean;
|
|
118
|
+
isShareWhiteBoard?: boolean;
|
|
119
|
+
isSharePeople?: boolean;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* 封装Stream Sender
|
|
123
|
+
*
|
|
124
|
+
* @property { string } resolution 当前通道发送的流的分辨率
|
|
125
|
+
* @property { MediaStreamTrack | null } track 当前通道发送的Track流
|
|
126
|
+
* @property { RTCRtpSender | null } RTCSender
|
|
127
|
+
* @property { string } status 状态
|
|
128
|
+
* @property { string } type 类型
|
|
129
|
+
*/
|
|
130
|
+
export interface IStreamSender {
|
|
131
|
+
resolution: string;
|
|
132
|
+
track: MediaStreamTrack | null;
|
|
133
|
+
sender: RTCRtpSender;
|
|
134
|
+
status: string;
|
|
135
|
+
type: string;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Electron选择分享应用/屏幕资源
|
|
139
|
+
*
|
|
140
|
+
* @property { unknown } appIcon 资源icon
|
|
141
|
+
* @property { string } display_id 显示id
|
|
142
|
+
* @property { string } id 资源id
|
|
143
|
+
* @property { string } name 应用名称/屏幕名称
|
|
144
|
+
* @property { unknown } thumbnail thumbnail type is NativeImage
|
|
145
|
+
*/
|
|
146
|
+
export interface ISource {
|
|
147
|
+
appIcon: any;
|
|
148
|
+
display_id: string;
|
|
149
|
+
id: string;
|
|
150
|
+
name: string;
|
|
151
|
+
thumbnail: any;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* stream init配置参数,用于在初始采集视频/音频流时指定设备信息
|
|
155
|
+
*
|
|
156
|
+
* @property { Object } devices 麦克风/摄像头/扬声器 设备id
|
|
157
|
+
* @value { string } devices.audioInputValue 音频输入
|
|
158
|
+
* @value { string } devices.videoInValue 视频输入
|
|
159
|
+
* @value { string } devices.audioOutputValue 音频输出
|
|
160
|
+
*/
|
|
161
|
+
export declare type IStreamInitConfig = {
|
|
162
|
+
devices: {
|
|
163
|
+
audioInputValue?: string;
|
|
164
|
+
videoInValue?: string;
|
|
165
|
+
audioOutputValue?: string;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Internels 统计数据
|
|
170
|
+
*
|
|
171
|
+
* @property { number } bytesReceived 接收的字节总数
|
|
172
|
+
* @property { number } bytesReceivedSecond 每秒接收字节数
|
|
173
|
+
* @property { number } bytesSent 发送的字节总数
|
|
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 视频接受的丢包率
|
|
180
|
+
* @property { string } mimeType 视频类型
|
|
181
|
+
* @property { number } timestamp 时间戳
|
|
182
|
+
* @property { [prop: string]: IReceiver } receiver 所有接收视频的列表数据
|
|
183
|
+
* @property { [prop: string]: ISender } sender 所有发送视频的列表数据
|
|
184
|
+
* @property { [prop: string]: IReceiver } audioReceiver 所有接收音频的列表数据
|
|
185
|
+
* @property { [prop: string]: ISender } audioSender 所有发送音频的列表数据
|
|
186
|
+
* @property { number } audioSendLost 音频发送的丢包率
|
|
187
|
+
* @property { number } audioRecvLost 音频接受的丢包率
|
|
188
|
+
*/
|
|
189
|
+
export interface IInternels {
|
|
190
|
+
bytesReceived: number;
|
|
191
|
+
bytesReceivedSecond: number;
|
|
192
|
+
bytesSent: number;
|
|
193
|
+
bytesSentSecond: number;
|
|
194
|
+
jitterSent: number;
|
|
195
|
+
jitterReceived: number;
|
|
196
|
+
audioSendJitter: number;
|
|
197
|
+
roundTripTime: number;
|
|
198
|
+
fractionLostSent: number;
|
|
199
|
+
fractionLostReceived: number;
|
|
200
|
+
mimeType: string;
|
|
201
|
+
timestamp: number;
|
|
202
|
+
receiver: {
|
|
203
|
+
[prop: string]: IReceiver;
|
|
204
|
+
};
|
|
205
|
+
sender: {
|
|
206
|
+
[prop: string]: ISender;
|
|
207
|
+
};
|
|
208
|
+
audioReceiver: {
|
|
209
|
+
[prop: string]: IReceiver;
|
|
210
|
+
};
|
|
211
|
+
audioSender: {
|
|
212
|
+
[prop: string]: ISender;
|
|
213
|
+
};
|
|
214
|
+
audioSendLost?: number;
|
|
215
|
+
audioRecvLost?: number;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* 接收器 Receiver 统计数据
|
|
219
|
+
* 详情可参考:https://w3c.github.io/webrtc-stats/#dictionary-rtcreceivedrtpstreamstats-members
|
|
220
|
+
*
|
|
221
|
+
* @property { number } bytesReceived 接收总量
|
|
222
|
+
* @property { number } bytesReceivedSecond 每秒接收数据
|
|
223
|
+
* @property { number } frameHeight 解码帧的height
|
|
224
|
+
* @property { number } frameWidth 解码帧的width
|
|
225
|
+
* @property { number } framesDecoded frame编码量
|
|
226
|
+
* @property { number } framesDecodedSecond 每秒frame编码量
|
|
227
|
+
* @property { number } framesReceived frame接收量
|
|
228
|
+
* @property { number } framesReceivedSecond 每秒frame接收量
|
|
229
|
+
* @property { boolean } isContent 是否是分享content
|
|
230
|
+
* @property { boolean } isSupport 忽略
|
|
231
|
+
* @property { number } jitterBufferDelay 音频样本或视频帧从接收到退出抖动缓冲区所花费的时间总和,以秒为单位
|
|
232
|
+
* @property { number } keyFramesDecoded 代表关键帧的总数
|
|
233
|
+
* @property { number } nackCount 计算此接收器发送的否定确认(NACK)数据包的总数
|
|
234
|
+
* @property { string } name 与会者昵称
|
|
235
|
+
* @property { number } packetsReceived 此传输上收到的数据包总数
|
|
236
|
+
* @property { number } packetsReceivedSecond 此传输上每秒收到的数据包数量
|
|
237
|
+
* @property { number } packetsLost 此传输上丢失的数据包总数
|
|
238
|
+
* @property { number } packetsLostSecond 此传输上每秒丢失的数据包数量
|
|
239
|
+
* @property { number } pliCount 接收器发送的图片丢失指示(PLI)数据包的总数
|
|
240
|
+
* @property { number } timestamp 时间戳
|
|
241
|
+
* @property { string } type 与会者type
|
|
242
|
+
* @property { number } expResolution 当前通道期望流分辨率
|
|
243
|
+
* @property { string } status 状态
|
|
244
|
+
* @property { number } framesPerSecond 此接收器解码的帧的 QP 值的总和
|
|
245
|
+
* @property { string } ssrc 同步源 (ssrc) 标识符是每个 [RFC3550] 的无符号整数值,用于标识此 stats 对象正在描述的 RTP 数据包流;
|
|
246
|
+
* 对于出站和入站本地,ssrc 描述了分别由这些端点发送和接收的轨道的统计信息;
|
|
247
|
+
* 对于远程入站和远程出站,ssrc 描述了由远程端点接收和发送到远程端点的轨道的统计信息;
|
|
248
|
+
* @property { number } jitter 视频接收抖动
|
|
249
|
+
* @property { string } endpointId 参会者的callUri
|
|
250
|
+
* @property { string } participantId participantId
|
|
251
|
+
* @property { number } totalSamplesReceived 总的接受采样点
|
|
252
|
+
* @property { number } insertedSamplesForDeceleration
|
|
253
|
+
* @property { number } removedSamplesForAcceleration
|
|
254
|
+
*/
|
|
255
|
+
export interface IReceiver {
|
|
256
|
+
bytesReceived: number;
|
|
257
|
+
bytesReceivedSecond: number;
|
|
258
|
+
frameHeight: number;
|
|
259
|
+
frameWidth: number;
|
|
260
|
+
framesDecoded: number;
|
|
261
|
+
framesDecodedSecond: number;
|
|
262
|
+
framesReceived: number;
|
|
263
|
+
framesReceivedSecond: number;
|
|
264
|
+
isContent: boolean;
|
|
265
|
+
isSupport: boolean;
|
|
266
|
+
jitterBufferDelay: number;
|
|
267
|
+
keyFramesDecoded: number;
|
|
268
|
+
nackCount: number;
|
|
269
|
+
name: string;
|
|
270
|
+
packetsReceived: number;
|
|
271
|
+
packetsReceivedSecond: number;
|
|
272
|
+
packetsLost: number;
|
|
273
|
+
packetsLostSecond: number;
|
|
274
|
+
pliCount: number;
|
|
275
|
+
timestamp: number;
|
|
276
|
+
type: string;
|
|
277
|
+
expResolution: number;
|
|
278
|
+
status: string;
|
|
279
|
+
framesPerSecond: number;
|
|
280
|
+
framesDropped: number;
|
|
281
|
+
ssrc: string;
|
|
282
|
+
jitter: number;
|
|
283
|
+
endpointId?: string;
|
|
284
|
+
participantId?: number;
|
|
285
|
+
mimeType?: string;
|
|
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;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* 发送器 Sender 统计数据
|
|
298
|
+
* 详情可以参考:https://w3c.github.io/webrtc-stats/#dictionary-rtcoutboundrtpstreamstats-members
|
|
299
|
+
*
|
|
300
|
+
* @property { number } bytesSent 此RTCIceTransport上发送的有效负载字节总数
|
|
301
|
+
* @property { number } bytesSentSecond 每秒发送有效负载字节数
|
|
302
|
+
* @property { number } frameHeight 编码帧的高度
|
|
303
|
+
* @property { number } frameWidth 编码帧的宽度
|
|
304
|
+
* @property { number } framesEncoded 此RTP媒体流成功编码的帧总数
|
|
305
|
+
* @property { number } framesEncodedSecond 每秒成功编码的帧数
|
|
306
|
+
* @property { number } framesSent 此RTP流上发送的帧总数
|
|
307
|
+
* @property { number } framesSentSecond 每秒发送的帧数
|
|
308
|
+
* @property { number } hugeFramesSent 此RTP流发送的huge帧的总数
|
|
309
|
+
* @property { string } status 忽略
|
|
310
|
+
* @property { number } keyFramesEncoded 此RTP媒体流编码的关键帧总数
|
|
311
|
+
* @property { number } packetsSent 此传输发送的数据包总数
|
|
312
|
+
* @property { number } packetsSentSecond 此传输每秒发送的数据包数
|
|
313
|
+
* @property { number } timestamp 时间戳
|
|
314
|
+
* @property { string } type 发送器类型
|
|
315
|
+
* @property { number } expBandwidth 期望带宽
|
|
316
|
+
* @property { string } string 分辨率
|
|
317
|
+
* @property { number } pliCount 计算此发送方收到的图片丢失指示 (PLI) 数据包的总数
|
|
318
|
+
* @property { number } firCount 接收方已向发送方发送的完整帧内请求 (FIR) 数据包的数量
|
|
319
|
+
* @property { number } nackCount 计算此发送方收到的否定确认 (NACK) 数据包的总数
|
|
320
|
+
* @property { string } ssrc 标识此 stats 对象正在描述的 RTP 数据包流;
|
|
321
|
+
* 对于出站和入站本地,ssrc 描述了分别由这些端点发送和接收的轨道的统计信息;
|
|
322
|
+
* 对于远程入站和远程出站,ssrc 描述了由远程端点接收和发送到远程端点的轨道的统计信息;
|
|
323
|
+
* @property { number } packetsLost 丢包总数
|
|
324
|
+
* @property { boolean } isContent 是否是分享content
|
|
325
|
+
* @property { boolean } jitter jitter
|
|
326
|
+
* @property { boolean } roundTripTime 往返延时
|
|
327
|
+
*/
|
|
328
|
+
export interface ISender {
|
|
329
|
+
bytesSent: number;
|
|
330
|
+
bytesSentSecond: number;
|
|
331
|
+
frameHeight: number;
|
|
332
|
+
frameWidth: number;
|
|
333
|
+
framesEncoded: number;
|
|
334
|
+
framesEncodedSecond: number;
|
|
335
|
+
framesSent: number;
|
|
336
|
+
framesSentSecond: number;
|
|
337
|
+
hugeFramesSent: number;
|
|
338
|
+
status: string;
|
|
339
|
+
keyFramesEncoded: number;
|
|
340
|
+
packetsSent: number;
|
|
341
|
+
packetsSentSecond: number;
|
|
342
|
+
timestamp: number;
|
|
343
|
+
type: string;
|
|
344
|
+
expBandwidth: number;
|
|
345
|
+
resolution: string;
|
|
346
|
+
pliCount: number;
|
|
347
|
+
firCount: number;
|
|
348
|
+
nackCount: number;
|
|
349
|
+
ssrc: string;
|
|
350
|
+
mimeType: string;
|
|
351
|
+
audioLevel?: number;
|
|
352
|
+
packetsLost: number;
|
|
353
|
+
packetsLostSecond: number;
|
|
354
|
+
isContent?: boolean;
|
|
355
|
+
jitter?: number;
|
|
356
|
+
roundTripTime?: number;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* 基础视频约束配置
|
|
360
|
+
*
|
|
361
|
+
* @property { ConstrainDouble } frameRate 帧率配置
|
|
362
|
+
* @property { number } aspectRatio 视频比例
|
|
363
|
+
* @property { 'crop-and-scale' } resizeMode 裁剪模式,此处使用裁剪比例模式,以满足分辨率要求;
|
|
364
|
+
* @property { number } width 采集分辨率-width
|
|
365
|
+
* @property { number } height 采集分辨率-height
|
|
366
|
+
*/
|
|
367
|
+
export interface IBASE_CONTRAINTS {
|
|
368
|
+
frameRate?: ConstrainDouble;
|
|
369
|
+
aspectRatio: number;
|
|
370
|
+
resizeMode: 'crop-and-scale';
|
|
371
|
+
width?: number;
|
|
372
|
+
height?: number;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* 初始化视频约束设置
|
|
376
|
+
*
|
|
377
|
+
* @property { string } cursor 用于指定content分享时,是否指定显示鼠标指针的显示/隐藏或者是否需要录制鼠标
|
|
378
|
+
* @property { number } aspectRatio 期待采集视频比例
|
|
379
|
+
* @property { 'crop-and-scale' } resizeMode 裁剪模式,此处使用裁剪比例模式,以满足分辨率要求;
|
|
380
|
+
* @property { ConstrainDouble } frameRate 裁剪模式,此处使用裁剪比例模式,以满足分辨率要求;
|
|
381
|
+
* @property { boolean } logicalSurface 指示是否允许用户选择不直接对应于显示区域的源表面;
|
|
382
|
+
* 详见:https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/logicalSurface
|
|
383
|
+
*/
|
|
384
|
+
export interface ICONTENT_CONTRAINTS {
|
|
385
|
+
cursor: string;
|
|
386
|
+
aspectRatio: number;
|
|
387
|
+
resizeMode: 'crop-and-scale';
|
|
388
|
+
logicalSurface: true;
|
|
389
|
+
frameRate?: ConstrainDouble;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* 媒体通知Web对视频流的分辨率、带宽信息、帧率进行限制
|
|
393
|
+
*
|
|
394
|
+
* @property { string } streamId 指定streamId进行限制
|
|
395
|
+
* @property { number } resolution 暂时未使用
|
|
396
|
+
* @property { number } bandwidth 限制streamId最大发送带宽
|
|
397
|
+
* @property { number } frameRate 限制streamId最大发送帧率(暂时未启用,存在帧率动态设置后,帧率起不来问题)
|
|
398
|
+
*/
|
|
399
|
+
export interface IStreamChange {
|
|
400
|
+
streamId: string;
|
|
401
|
+
resolution: number;
|
|
402
|
+
bandwidth: number;
|
|
403
|
+
frameRate: number;
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* StreamChange消息内容
|
|
407
|
+
*
|
|
408
|
+
* @property { string } type 消息类型
|
|
409
|
+
* @property { IStreamChange[] } streamChangeInfo 流限制配置信息
|
|
410
|
+
* @property { number } mediagroupid 是否是content或者people画面
|
|
411
|
+
*/
|
|
412
|
+
export interface IStreamChangeType {
|
|
413
|
+
type: string;
|
|
414
|
+
streamChangeInfo: IStreamChange[];
|
|
415
|
+
mediagroupid: number;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* 缓存content和people的StreamChange配置数据
|
|
419
|
+
*
|
|
420
|
+
* @property { IStreamChange[] } content content的streamChange数据
|
|
421
|
+
* @property { IStreamChange[] } people content的streamChange数据
|
|
422
|
+
*/
|
|
423
|
+
export interface IStreamChangeListType {
|
|
424
|
+
content: IStreamChange[];
|
|
425
|
+
people: IStreamChange[];
|
|
426
|
+
}
|