dingrtc 3.7.4
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 +131 -0
- package/dist/index.d.ts +3717 -0
- package/dist/index.esm.js +1 -0
- package/dist/index.js +1 -0
- package/dist/index.umd.js +35 -0
- package/package.json +28 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3717 @@
|
|
|
1
|
+
import * as _dingrtc_shared from '@dingrtc/shared';
|
|
2
|
+
import { EventEmitter, Reporter, VideoSendReport, AudioSendReport, VideoReceiveReport, AudioReceiveReport, AudioNetEQReport, BweReport, AudioDeviceBufferReport, DingRTCError, PromiseLikeObject, ResolutionInfo as ResolutionInfo$1, TrackMediaType as TrackMediaType$1 } from '@dingrtc/shared';
|
|
3
|
+
export { ErrorCodeAndMsgMap } from '@dingrtc/shared';
|
|
4
|
+
import * as _dingrtc_channel from '@dingrtc/channel';
|
|
5
|
+
import { DingRTCChannel, JoinParam as JoinParam$1, ISignal_msg, UserEventAction as UserEventAction$1 } from '@dingrtc/channel';
|
|
6
|
+
import { SessionDescription } from 'sdp-transform';
|
|
7
|
+
|
|
8
|
+
/** Namespace signal_msg. */
|
|
9
|
+
declare namespace signal_msg {
|
|
10
|
+
/** Properties of an AudioSsrcSpec. */
|
|
11
|
+
interface IAudioSsrcSpec {
|
|
12
|
+
/** AudioSsrcSpec ssrc */
|
|
13
|
+
ssrc?: number | null;
|
|
14
|
+
/** AudioSsrcSpec rtxSsrc */
|
|
15
|
+
rtxSsrc?: number | null;
|
|
16
|
+
}
|
|
17
|
+
/** Represents an AudioSsrcSpec. */
|
|
18
|
+
/** Properties of a SyncNotification. */
|
|
19
|
+
interface ISyncNotification {
|
|
20
|
+
/** SyncNotification streamsVer */
|
|
21
|
+
streamsVer?: number | null;
|
|
22
|
+
/** SyncNotification participantsVer */
|
|
23
|
+
participantsVer?: number | null;
|
|
24
|
+
/** SyncNotification conferenceVer */
|
|
25
|
+
conferenceVer?: number | null;
|
|
26
|
+
/** SyncNotification msgId */
|
|
27
|
+
msgId?: string | null;
|
|
28
|
+
/** SyncNotification tid */
|
|
29
|
+
tid?: string | null;
|
|
30
|
+
/** SyncNotification traceId */
|
|
31
|
+
traceId?: string | null;
|
|
32
|
+
}
|
|
33
|
+
/** Properties of a VideoSsrcSpec. */
|
|
34
|
+
interface IVideoSsrcSpec {
|
|
35
|
+
/** VideoSsrcSpec ssrc */
|
|
36
|
+
ssrc?: number | null;
|
|
37
|
+
/** VideoSsrcSpec rtxSsrc */
|
|
38
|
+
rtxSsrc?: number | null;
|
|
39
|
+
/** VideoSsrcSpec fecSsrc */
|
|
40
|
+
fecSsrc?: number | null;
|
|
41
|
+
}
|
|
42
|
+
/** Represents a VideoSsrcSpec. */
|
|
43
|
+
/** Properties of a MultiPcAdaptRequestInfo. */
|
|
44
|
+
interface IMultiPcAdaptRequestInfo {
|
|
45
|
+
/** MultiPcAdaptRequestInfo audioSsrcSpec */
|
|
46
|
+
audioSsrcSpec?: signal_msg.IAudioSsrcSpec[] | null;
|
|
47
|
+
/** MultiPcAdaptRequestInfo videoSsrcSpec */
|
|
48
|
+
videoSsrcSpec?: signal_msg.IVideoSsrcSpec[] | null;
|
|
49
|
+
}
|
|
50
|
+
/** Represents a MultiPcAdaptRequestInfo. */
|
|
51
|
+
/** Properties of an AudioStreamFormat. */
|
|
52
|
+
interface IAudioStreamFormat {
|
|
53
|
+
/** AudioStreamFormat codec */
|
|
54
|
+
codec?: string | null;
|
|
55
|
+
/** AudioStreamFormat sampleRate */
|
|
56
|
+
sampleRate?: number | null;
|
|
57
|
+
/** AudioStreamFormat channelNum */
|
|
58
|
+
channelNum?: number | null;
|
|
59
|
+
}
|
|
60
|
+
/** Represents an AudioStreamFormat. */
|
|
61
|
+
/** Properties of an AudioFormatPreference. */
|
|
62
|
+
interface IAudioFormatPreference {
|
|
63
|
+
/** AudioFormatPreference preferred */
|
|
64
|
+
preferred?: signal_msg.IAudioStreamFormat | null;
|
|
65
|
+
/** AudioFormatPreference optional */
|
|
66
|
+
optional?: signal_msg.IAudioStreamFormat[] | null;
|
|
67
|
+
}
|
|
68
|
+
/** Represents an AudioFormatPreference. */
|
|
69
|
+
/** Properties of an AudioStreamOptional. */
|
|
70
|
+
interface IAudioStreamOptional {
|
|
71
|
+
/** AudioStreamOptional format */
|
|
72
|
+
format?: signal_msg.IAudioStreamFormat[] | null;
|
|
73
|
+
}
|
|
74
|
+
/** Represents an AudioStreamOptional. */
|
|
75
|
+
/** Properties of a VideoStreamFormat. */
|
|
76
|
+
interface IVideoStreamFormat {
|
|
77
|
+
/** VideoStreamFormat codec */
|
|
78
|
+
codec?: string | null;
|
|
79
|
+
/** VideoStreamFormat profile */
|
|
80
|
+
profile?: string | null;
|
|
81
|
+
}
|
|
82
|
+
/** Represents a VideoStreamFormat. */
|
|
83
|
+
/** Properties of a VideoFormatPreference. */
|
|
84
|
+
interface IVideoFormatPreference {
|
|
85
|
+
/** VideoFormatPreference preferred */
|
|
86
|
+
preferred?: signal_msg.IVideoStreamFormat | null;
|
|
87
|
+
/** VideoFormatPreference optional */
|
|
88
|
+
optional?: signal_msg.IVideoStreamFormat[] | null;
|
|
89
|
+
}
|
|
90
|
+
/** Represents a VideoFormatPreference. */
|
|
91
|
+
/** Properties of a FormatPreference. */
|
|
92
|
+
interface IFormatPreference {
|
|
93
|
+
/** FormatPreference audio */
|
|
94
|
+
audio?: signal_msg.IAudioFormatPreference | null;
|
|
95
|
+
/** FormatPreference video */
|
|
96
|
+
video?: signal_msg.IVideoFormatPreference | null;
|
|
97
|
+
}
|
|
98
|
+
/** Represents a FormatPreference. */
|
|
99
|
+
/** Properties of a Resolution. */
|
|
100
|
+
interface IResolution {
|
|
101
|
+
/** Resolution width */
|
|
102
|
+
width?: number | null;
|
|
103
|
+
/** Resolution height */
|
|
104
|
+
height?: number | null;
|
|
105
|
+
}
|
|
106
|
+
/** Represents a Resolution. */
|
|
107
|
+
/** Properties of a VideoSsrcParameters. */
|
|
108
|
+
interface IVideoSsrcParameters {
|
|
109
|
+
/** VideoSsrcParameters ssrc */
|
|
110
|
+
ssrc?: number | null;
|
|
111
|
+
/** VideoSsrcParameters framerate */
|
|
112
|
+
framerate?: number | null;
|
|
113
|
+
/** VideoSsrcParameters resolution */
|
|
114
|
+
resolution?: signal_msg.IResolution | null;
|
|
115
|
+
/** VideoSsrcParameters maxBitrate */
|
|
116
|
+
maxBitrate?: number | null;
|
|
117
|
+
/** VideoSsrcParameters minBitrate */
|
|
118
|
+
minBitrate?: number | null;
|
|
119
|
+
/** VideoSsrcParameters active */
|
|
120
|
+
active?: boolean | null;
|
|
121
|
+
/** VideoSsrcParameters bitrate */
|
|
122
|
+
bitrate?: number | null;
|
|
123
|
+
/** VideoSsrcParameters tlayer */
|
|
124
|
+
tlayer?: number | null;
|
|
125
|
+
/** VideoSsrcParameters multiSlice */
|
|
126
|
+
multiSlice?: number | null;
|
|
127
|
+
/** VideoSsrcParameters keyFrameInterval */
|
|
128
|
+
keyFrameInterval?: number | null;
|
|
129
|
+
/** VideoSsrcParameters constantPpsid */
|
|
130
|
+
constantPpsid?: number | null;
|
|
131
|
+
/** VideoSsrcParameters rid */
|
|
132
|
+
rid?: string | null;
|
|
133
|
+
}
|
|
134
|
+
/** Represents a VideoSsrcParameters. */
|
|
135
|
+
/** Properties of a VideoParameters. */
|
|
136
|
+
interface IVideoParameters {
|
|
137
|
+
/** VideoParameters ssrc */
|
|
138
|
+
ssrc?: number | null;
|
|
139
|
+
/** VideoParameters resolution */
|
|
140
|
+
resolution?: signal_msg.IResolution | null;
|
|
141
|
+
/** VideoParameters framerate */
|
|
142
|
+
framerate?: number | null;
|
|
143
|
+
/** VideoParameters bitrate */
|
|
144
|
+
bitrate?: string | null;
|
|
145
|
+
/** VideoParameters multiSlice */
|
|
146
|
+
multiSlice?: number | null;
|
|
147
|
+
/** VideoParameters keyFrameInterval */
|
|
148
|
+
keyFrameInterval?: number | null;
|
|
149
|
+
/** VideoParameters constantPpsid */
|
|
150
|
+
constantPpsid?: number | null;
|
|
151
|
+
/** VideoParameters resolutionLevel */
|
|
152
|
+
resolutionLevel?: number | null;
|
|
153
|
+
}
|
|
154
|
+
/** Represents a VideoParameters. */
|
|
155
|
+
/** Properties of a GroupVersion. */
|
|
156
|
+
interface IGroupVersion {
|
|
157
|
+
/** GroupVersion id */
|
|
158
|
+
id?: string | null;
|
|
159
|
+
/** GroupVersion ver */
|
|
160
|
+
ver?: number | null;
|
|
161
|
+
}
|
|
162
|
+
/** Represents a GroupVersion. */
|
|
163
|
+
/** Properties of a StreamInfo. */
|
|
164
|
+
interface IStreamInfo {
|
|
165
|
+
/** StreamInfo type */
|
|
166
|
+
type?: string | null;
|
|
167
|
+
/** StreamInfo owner */
|
|
168
|
+
owner?: string | null;
|
|
169
|
+
/** StreamInfo attributesJsonStr */
|
|
170
|
+
attributesJsonStr?: string | null;
|
|
171
|
+
/** StreamInfo label */
|
|
172
|
+
label?: string | null;
|
|
173
|
+
/** StreamInfo createTime */
|
|
174
|
+
createTime?: number | null;
|
|
175
|
+
}
|
|
176
|
+
/** Represents a StreamInfo. */
|
|
177
|
+
/** Properties of a StreamVideoParameters. */
|
|
178
|
+
interface IStreamVideoParameters {
|
|
179
|
+
/** StreamVideoParameters resolution */
|
|
180
|
+
resolution?: signal_msg.IResolution | null;
|
|
181
|
+
/** StreamVideoParameters framerate */
|
|
182
|
+
framerate?: number | null;
|
|
183
|
+
/** StreamVideoParameters bitrate */
|
|
184
|
+
bitrate?: number | null;
|
|
185
|
+
/** StreamVideoParameters keyFrameInterval */
|
|
186
|
+
keyFrameInterval?: number | null;
|
|
187
|
+
/** StreamVideoParameters multiSlice */
|
|
188
|
+
multiSlice?: number | null;
|
|
189
|
+
/** StreamVideoParameters constantPpsid */
|
|
190
|
+
constantPpsid?: number | null;
|
|
191
|
+
}
|
|
192
|
+
/** Represents a StreamVideoParameters. */
|
|
193
|
+
/** Properties of a VideoStreamPara. */
|
|
194
|
+
interface IVideoStreamPara {
|
|
195
|
+
/** VideoStreamPara specs */
|
|
196
|
+
specs?: string[] | null;
|
|
197
|
+
/** VideoStreamPara resolution */
|
|
198
|
+
resolution?: signal_msg.IResolution[] | null;
|
|
199
|
+
/** VideoStreamPara framerate */
|
|
200
|
+
framerate?: number[] | null;
|
|
201
|
+
/** VideoStreamPara bitrate */
|
|
202
|
+
bitrate?: string[] | null;
|
|
203
|
+
/** VideoStreamPara keyFrameInterval */
|
|
204
|
+
keyFrameInterval?: number[] | null;
|
|
205
|
+
}
|
|
206
|
+
/** Represents a VideoStreamPara. */
|
|
207
|
+
/** Properties of a VideoStreamOptional. */
|
|
208
|
+
interface IVideoStreamOptional {
|
|
209
|
+
/** VideoStreamOptional format */
|
|
210
|
+
format?: signal_msg.IVideoStreamFormat[] | null;
|
|
211
|
+
/** VideoStreamOptional parameters */
|
|
212
|
+
parameters?: signal_msg.IVideoStreamPara | null;
|
|
213
|
+
}
|
|
214
|
+
/** Represents a VideoStreamOptional. */
|
|
215
|
+
/** Properties of a StreamAudioDesc. */
|
|
216
|
+
interface IStreamAudioDesc {
|
|
217
|
+
/** StreamAudioDesc trackId */
|
|
218
|
+
trackId?: string | null;
|
|
219
|
+
/** StreamAudioDesc msid */
|
|
220
|
+
msid?: string | null;
|
|
221
|
+
/** StreamAudioDesc status */
|
|
222
|
+
status?: string | null;
|
|
223
|
+
/** StreamAudioDesc format */
|
|
224
|
+
format?: signal_msg.IAudioStreamFormat | null;
|
|
225
|
+
/** StreamAudioDesc source */
|
|
226
|
+
source?: string | null;
|
|
227
|
+
/** StreamAudioDesc ssrc */
|
|
228
|
+
ssrc?: number[] | null;
|
|
229
|
+
/** StreamAudioDesc ssrcGroup */
|
|
230
|
+
ssrcGroup?: signal_msg.IAudioSsrcSpec[] | null;
|
|
231
|
+
/** StreamAudioDesc optional */
|
|
232
|
+
optional?: signal_msg.IAudioStreamOptional | null;
|
|
233
|
+
}
|
|
234
|
+
/** Represents a StreamAudioDesc. */
|
|
235
|
+
/** Properties of a StreamVideoDesc. */
|
|
236
|
+
interface IStreamVideoDesc {
|
|
237
|
+
/** StreamVideoDesc trackId */
|
|
238
|
+
trackId?: string | null;
|
|
239
|
+
/** StreamVideoDesc msid */
|
|
240
|
+
msid?: string | null;
|
|
241
|
+
/** StreamVideoDesc status */
|
|
242
|
+
status?: string | null;
|
|
243
|
+
/** StreamVideoDesc source */
|
|
244
|
+
source?: string | null;
|
|
245
|
+
/** StreamVideoDesc format */
|
|
246
|
+
format?: signal_msg.IVideoStreamFormat | null;
|
|
247
|
+
/** StreamVideoDesc ssrc */
|
|
248
|
+
ssrc?: number[] | null;
|
|
249
|
+
/** StreamVideoDesc ssrcGroup */
|
|
250
|
+
ssrcGroup?: signal_msg.IVideoSsrcSpec[] | null;
|
|
251
|
+
/** StreamVideoDesc parameters */
|
|
252
|
+
parameters?: signal_msg.IStreamVideoParameters | null;
|
|
253
|
+
/** StreamVideoDesc optional */
|
|
254
|
+
optional?: signal_msg.IVideoStreamOptional | null;
|
|
255
|
+
}
|
|
256
|
+
/** Represents a StreamVideoDesc. */
|
|
257
|
+
/** Properties of a StreamMediaDesc. */
|
|
258
|
+
interface IStreamMediaDesc {
|
|
259
|
+
/** StreamMediaDesc audio */
|
|
260
|
+
audio?: signal_msg.IStreamAudioDesc | null;
|
|
261
|
+
/** StreamMediaDesc video */
|
|
262
|
+
video?: signal_msg.IStreamVideoDesc | null;
|
|
263
|
+
}
|
|
264
|
+
/** Represents a StreamMediaDesc. */
|
|
265
|
+
/** Properties of a Stream. */
|
|
266
|
+
interface IStream {
|
|
267
|
+
/** Stream id */
|
|
268
|
+
id?: string | null;
|
|
269
|
+
/** Stream type */
|
|
270
|
+
type?: string | null;
|
|
271
|
+
/** Stream media */
|
|
272
|
+
media?: signal_msg.IStreamMediaDesc | null;
|
|
273
|
+
/** Stream info */
|
|
274
|
+
info?: signal_msg.IStreamInfo | null;
|
|
275
|
+
/** Stream version */
|
|
276
|
+
version?: number | null;
|
|
277
|
+
}
|
|
278
|
+
/** Represents a Stream. */
|
|
279
|
+
/** Properties of an OriginMsg. */
|
|
280
|
+
interface IOriginMsg {
|
|
281
|
+
/** OriginMsg type */
|
|
282
|
+
type?: string | null;
|
|
283
|
+
/** OriginMsg id */
|
|
284
|
+
id?: string | null;
|
|
285
|
+
}
|
|
286
|
+
/** Represents an OriginMsg. */
|
|
287
|
+
/** Properties of an ErrorMsg. */
|
|
288
|
+
interface IErrorMsg {
|
|
289
|
+
/** ErrorMsg id */
|
|
290
|
+
id?: string | null;
|
|
291
|
+
/** ErrorMsg code */
|
|
292
|
+
code?: number | null;
|
|
293
|
+
/** ErrorMsg msg */
|
|
294
|
+
msg?: string | null;
|
|
295
|
+
/** ErrorMsg origin */
|
|
296
|
+
origin?: signal_msg.IOriginMsg | null;
|
|
297
|
+
}
|
|
298
|
+
/** Represents an ErrorMsg. */
|
|
299
|
+
/** Properties of an ErrorMsgs. */
|
|
300
|
+
interface IErrorMsgs {
|
|
301
|
+
/** ErrorMsgs globalStatus */
|
|
302
|
+
globalStatus?: string | null;
|
|
303
|
+
/** ErrorMsgs detailStatus */
|
|
304
|
+
detailStatus?: signal_msg.IErrorMsg[] | null;
|
|
305
|
+
}
|
|
306
|
+
/** Represents an ErrorMsgs. */
|
|
307
|
+
/** DataType export enum. */
|
|
308
|
+
enum DataType {
|
|
309
|
+
DATA_TYPE_STREAM = 0,
|
|
310
|
+
DATA_TYPE_PARTICIPANTS = 1,
|
|
311
|
+
DATA_TYPE_CONFERENCE = 2,
|
|
312
|
+
DATA_TYPE_GROUP_LIST = 3,
|
|
313
|
+
DATA_TYPE_GROUP = 4
|
|
314
|
+
}
|
|
315
|
+
/** OptType export enum. */
|
|
316
|
+
enum OptType {
|
|
317
|
+
OPT_TYPE_ADD = 0,
|
|
318
|
+
OPT_TYPE_REMOVE = 1,
|
|
319
|
+
OPT_TYPE_UPDATE = 2
|
|
320
|
+
}
|
|
321
|
+
/** SyncResponseCode export enum. */
|
|
322
|
+
enum SyncResponseCode {
|
|
323
|
+
SYNC_OK = 0,
|
|
324
|
+
SYNC_PART_SUC = 10,
|
|
325
|
+
SYNC_DATA_SIZE_LIMITED = 11,
|
|
326
|
+
SYNC_NOT_SUPPORT_TYPE = 12,
|
|
327
|
+
SYNC_NOT_FOUND = 13,
|
|
328
|
+
SYNC_CHANNEL_NOT_EXIST = 14,
|
|
329
|
+
SYNC_INTERNAL_ERROR = 15
|
|
330
|
+
}
|
|
331
|
+
/** Properties of a GroupParticipant. */
|
|
332
|
+
interface IGroupParticipant {
|
|
333
|
+
/** GroupParticipant uid */
|
|
334
|
+
uid?: string | null;
|
|
335
|
+
/** GroupParticipant pid */
|
|
336
|
+
pid?: string | null;
|
|
337
|
+
/** GroupParticipant userData */
|
|
338
|
+
userData?: string | null;
|
|
339
|
+
}
|
|
340
|
+
/** Represents a GroupParticipant. */
|
|
341
|
+
/** Properties of a GroupAudioInfo. */
|
|
342
|
+
interface IGroupAudioInfo {
|
|
343
|
+
/** GroupAudioInfo label */
|
|
344
|
+
label?: string | null;
|
|
345
|
+
/** GroupAudioInfo audio */
|
|
346
|
+
audio?: signal_msg.IStream | null;
|
|
347
|
+
}
|
|
348
|
+
/** Represents a GroupAudioInfo. */
|
|
349
|
+
/** Properties of a GroupInfo. */
|
|
350
|
+
interface IGroupInfo {
|
|
351
|
+
/** GroupInfo id */
|
|
352
|
+
id?: string | null;
|
|
353
|
+
/** GroupInfo ver */
|
|
354
|
+
ver?: number | null;
|
|
355
|
+
/** GroupInfo participants */
|
|
356
|
+
participants?: signal_msg.IGroupParticipant[] | null;
|
|
357
|
+
/** GroupInfo audioInfo */
|
|
358
|
+
audioInfo?: signal_msg.IGroupAudioInfo | null;
|
|
359
|
+
/** GroupInfo properties */
|
|
360
|
+
properties?: signal_msg.IGroupProperty[] | null;
|
|
361
|
+
}
|
|
362
|
+
/** Properties of a GroupUpdateOpt. */
|
|
363
|
+
interface IGroupUpdateOpt {
|
|
364
|
+
/** GroupUpdateOpt updateAction */
|
|
365
|
+
updateAction?: signal_msg.GroupUpdate | null;
|
|
366
|
+
/** GroupUpdateOpt participants */
|
|
367
|
+
participants?: signal_msg.IGroupParticipant[] | null;
|
|
368
|
+
/** GroupUpdateOpt properties */
|
|
369
|
+
properties?: signal_msg.IGroupProperty[] | null;
|
|
370
|
+
}
|
|
371
|
+
/** Represents a GroupInfo. */
|
|
372
|
+
/** Properties of a SyncFullData. */
|
|
373
|
+
interface ISyncFullData {
|
|
374
|
+
/** SyncFullData ver */
|
|
375
|
+
ver?: number | null;
|
|
376
|
+
/** SyncFullData totalPages */
|
|
377
|
+
totalPages?: number | null;
|
|
378
|
+
/** SyncFullData pagingSeq */
|
|
379
|
+
pagingSeq?: number | null;
|
|
380
|
+
/** SyncFullData groupData */
|
|
381
|
+
groupData?: signal_msg.IGroupPagingData | null;
|
|
382
|
+
/** SyncFullData groupListData */
|
|
383
|
+
groupListData?: signal_msg.IGroupListPagingData | null;
|
|
384
|
+
}
|
|
385
|
+
/** Represents a SyncFullData. */
|
|
386
|
+
/** Properties of a GroupPagingData. */
|
|
387
|
+
interface IGroupPagingData {
|
|
388
|
+
/** GroupPagingData pagingSeq */
|
|
389
|
+
pagingSeq?: number | null;
|
|
390
|
+
/** GroupPagingData curPage */
|
|
391
|
+
curPage?: number | null;
|
|
392
|
+
/** GroupPagingData groupInfos */
|
|
393
|
+
groupInfos?: signal_msg.IGroupInfo[] | null;
|
|
394
|
+
}
|
|
395
|
+
/** Represents a GroupPagingData. */
|
|
396
|
+
/** Properties of a GroupListPagingData. */
|
|
397
|
+
interface IGroupListPagingData {
|
|
398
|
+
/** GroupListPagingData pagingSeq */
|
|
399
|
+
pagingSeq?: number | null;
|
|
400
|
+
/** GroupListPagingData curPage */
|
|
401
|
+
curPage?: number | null;
|
|
402
|
+
/** GroupListPagingData groupIds */
|
|
403
|
+
groupIds?: string[] | null;
|
|
404
|
+
}
|
|
405
|
+
/** Represents a GroupListPagingData. */
|
|
406
|
+
/** Properties of a SyncChangeLog. */
|
|
407
|
+
interface ISyncChangeLog {
|
|
408
|
+
/** SyncChangeLog groupListChangeLogs */
|
|
409
|
+
groupListChangeLogs?: signal_msg.IGroupListChangeLog[] | null;
|
|
410
|
+
/** SyncChangeLog groupChangeLogs */
|
|
411
|
+
groupChangeLogs?: signal_msg.IGroupChangeLog[] | null;
|
|
412
|
+
}
|
|
413
|
+
/** Represents a SyncChangeLog. */
|
|
414
|
+
/** Properties of a SyncDataRequest. */
|
|
415
|
+
interface ISyncDataRequest {
|
|
416
|
+
/** SyncDataRequest type */
|
|
417
|
+
type?: signal_msg.DataType | null;
|
|
418
|
+
/** SyncDataRequest id */
|
|
419
|
+
id?: string | null;
|
|
420
|
+
/** SyncDataRequest ver */
|
|
421
|
+
ver?: number | null;
|
|
422
|
+
/** SyncDataRequest forceFullSync */
|
|
423
|
+
forceFullSync?: boolean | null;
|
|
424
|
+
/** SyncDataRequest supportPagingSync */
|
|
425
|
+
supportPagingSync?: boolean | null;
|
|
426
|
+
}
|
|
427
|
+
/** Represents a SyncDataRequest. */
|
|
428
|
+
/** Properties of a SyncDataResponse. */
|
|
429
|
+
interface ISyncDataResponse {
|
|
430
|
+
/** SyncDataResponse code */
|
|
431
|
+
code?: signal_msg.SyncResponseCode | null;
|
|
432
|
+
/** SyncDataResponse errMsg */
|
|
433
|
+
errMsg?: string | null;
|
|
434
|
+
/** SyncDataResponse fullSync */
|
|
435
|
+
fullSync?: signal_msg.ISyncFullData | null;
|
|
436
|
+
/** SyncDataResponse changeLogs */
|
|
437
|
+
changeLogs?: signal_msg.ISyncChangeLog[] | null;
|
|
438
|
+
}
|
|
439
|
+
/** Represents a SyncDataResponse. */
|
|
440
|
+
/** Properties of a SyncIds. */
|
|
441
|
+
interface ISyncIds {
|
|
442
|
+
/** SyncIds id */
|
|
443
|
+
id?: string | null;
|
|
444
|
+
/** SyncIds ver */
|
|
445
|
+
ver?: number | null;
|
|
446
|
+
}
|
|
447
|
+
/** Represents a SyncIds. */
|
|
448
|
+
/** Properties of a SyncDataByIdsRequest. */
|
|
449
|
+
interface ISyncDataByIdsRequest {
|
|
450
|
+
/** SyncDataByIdsRequest type */
|
|
451
|
+
type?: signal_msg.DataType | null;
|
|
452
|
+
/** SyncDataByIdsRequest ids */
|
|
453
|
+
ids?: signal_msg.ISyncIds[] | null;
|
|
454
|
+
/** SyncDataByIdsRequest forceFullSync */
|
|
455
|
+
forceFullSync?: boolean | null;
|
|
456
|
+
/** SyncDataByIdsRequest supportPagingSync */
|
|
457
|
+
supportPagingSync?: boolean | null;
|
|
458
|
+
}
|
|
459
|
+
/** Represents a SyncDataByIdsRequest. */
|
|
460
|
+
/** Properties of a SyncDataByIdsResponse. */
|
|
461
|
+
interface ISyncDataByIdsResponse {
|
|
462
|
+
/** SyncDataByIdsResponse code */
|
|
463
|
+
code?: signal_msg.SyncResponseCode | null;
|
|
464
|
+
/** SyncDataByIdsResponse errMsg */
|
|
465
|
+
errMsg?: string | null;
|
|
466
|
+
/** SyncDataByIdsResponse notFoundIds */
|
|
467
|
+
notFoundIds?: string[] | null;
|
|
468
|
+
/** SyncDataByIdsResponse fullSync */
|
|
469
|
+
fullSync?: signal_msg.ISyncFullData | null;
|
|
470
|
+
/** SyncDataByIdsResponse changeLogs */
|
|
471
|
+
changeLogs?: signal_msg.ISyncChangeLog[] | null;
|
|
472
|
+
}
|
|
473
|
+
/** Represents a SyncDataByIdsResponse. */
|
|
474
|
+
/** GroupUpdate export enum. */
|
|
475
|
+
enum GroupUpdate {
|
|
476
|
+
GROUP_UPDATE_AUDIO_STREAM_LOST = 0,
|
|
477
|
+
GROUP_UPDATE_AUDIO_STREAM_RECOVER = 1,
|
|
478
|
+
GROUP_UPDATE_ADD_PARTICIPANTS = 2,
|
|
479
|
+
GROUP_UPDATE_REMOVE_PARTICIPANTS = 3,
|
|
480
|
+
GROUP_UPDATE_SET_PROPERTIES = 4,
|
|
481
|
+
GROUP_UPDATE_REMOVE_PROPERTIES = 5
|
|
482
|
+
}
|
|
483
|
+
/** Properties of a GroupUpdateOpt. */
|
|
484
|
+
interface IGroupUpdateOpt {
|
|
485
|
+
/** GroupUpdateOpt updateAction */
|
|
486
|
+
updateAction?: signal_msg.GroupUpdate | null;
|
|
487
|
+
/** GroupUpdateOpt participants */
|
|
488
|
+
participants?: signal_msg.IGroupParticipant[] | null;
|
|
489
|
+
}
|
|
490
|
+
/** Represents a GroupUpdateOpt. */
|
|
491
|
+
/** Properties of a GroupChangeLog. */
|
|
492
|
+
interface IGroupChangeLog {
|
|
493
|
+
/** GroupChangeLog ver */
|
|
494
|
+
ver?: number | null;
|
|
495
|
+
/** GroupChangeLog type */
|
|
496
|
+
type?: signal_msg.OptType | null;
|
|
497
|
+
/** GroupChangeLog id */
|
|
498
|
+
id?: string | null;
|
|
499
|
+
/** GroupChangeLog groupInfo */
|
|
500
|
+
groupInfo?: signal_msg.IGroupInfo | null;
|
|
501
|
+
/** GroupChangeLog updateOpt */
|
|
502
|
+
updateOpt?: signal_msg.IGroupUpdateOpt | null;
|
|
503
|
+
/** GroupChangeLog msgId */
|
|
504
|
+
msgId?: string | null;
|
|
505
|
+
}
|
|
506
|
+
/** Represents a GroupChangeLog. */
|
|
507
|
+
/** GroupListUpdate export enum. */
|
|
508
|
+
enum GroupListUpdate {
|
|
509
|
+
GROUP_LIST_UPDATE_ADD_ID = 0,
|
|
510
|
+
GROUP_LIST_UPDATE_REMOVE_ID = 1
|
|
511
|
+
}
|
|
512
|
+
/** Properties of a GroupListUpdateOpt. */
|
|
513
|
+
interface IGroupListUpdateOpt {
|
|
514
|
+
/** GroupListUpdateOpt updateAction */
|
|
515
|
+
updateAction?: signal_msg.GroupListUpdate | null;
|
|
516
|
+
/** GroupListUpdateOpt id */
|
|
517
|
+
id?: string | null;
|
|
518
|
+
}
|
|
519
|
+
/** Represents a GroupListUpdateOpt. */
|
|
520
|
+
/** Properties of a GroupListChangeLog. */
|
|
521
|
+
interface IGroupListChangeLog {
|
|
522
|
+
/** GroupListChangeLog ver */
|
|
523
|
+
ver?: number | null;
|
|
524
|
+
/** GroupListChangeLog type */
|
|
525
|
+
type?: signal_msg.OptType | null;
|
|
526
|
+
/** GroupListChangeLog updateOpt */
|
|
527
|
+
updateOpt?: signal_msg.IGroupListUpdateOpt | null;
|
|
528
|
+
/** GroupListChangeLog msgId */
|
|
529
|
+
msgId?: string | null;
|
|
530
|
+
}
|
|
531
|
+
/** Properties of a SetGroupPropertiesRequest. */
|
|
532
|
+
interface ISetGroupPropertiesRequest {
|
|
533
|
+
/** SetGroupPropertiesRequest groupId */
|
|
534
|
+
groupId?: string | null;
|
|
535
|
+
/** SetGroupPropertiesRequest properties */
|
|
536
|
+
properties?: signal_msg.IGroupProperty[] | null;
|
|
537
|
+
}
|
|
538
|
+
/** Properties of a SetGroupPropertiesResponse. */
|
|
539
|
+
interface ISetGroupPropertiesResponse {
|
|
540
|
+
/** SetGroupPropertiesResponse code */
|
|
541
|
+
code?: number | null;
|
|
542
|
+
/** SetGroupPropertiesResponse errMsg */
|
|
543
|
+
errMsg?: string | null;
|
|
544
|
+
}
|
|
545
|
+
/** Properties of a RemoveGroupPropertiesRequest. */
|
|
546
|
+
interface IRemoveGroupPropertiesRequest {
|
|
547
|
+
/** RemoveGroupPropertiesRequest code */
|
|
548
|
+
groupId?: string | null;
|
|
549
|
+
/** RemoveGroupPropertiesRequest keys */
|
|
550
|
+
keys?: string[] | null;
|
|
551
|
+
}
|
|
552
|
+
/** Properties of a GroupProperty. */
|
|
553
|
+
interface IGroupProperty {
|
|
554
|
+
/** GroupProperty key */
|
|
555
|
+
key?: string | null;
|
|
556
|
+
/** GroupProperty value */
|
|
557
|
+
value?: string | null;
|
|
558
|
+
}
|
|
559
|
+
interface IRemoveGroupPropertiesResponse {
|
|
560
|
+
/** RemoveGroupPropertiesResponse code */
|
|
561
|
+
code?: number | null;
|
|
562
|
+
/** RemoveGroupPropertiesResponse errMsg */
|
|
563
|
+
errMsg?: string | null;
|
|
564
|
+
}
|
|
565
|
+
/** Represents a GroupListChangeLog. */
|
|
566
|
+
/** Properties of a JoinGroupRequest. */
|
|
567
|
+
interface IJoinGroupRequest {
|
|
568
|
+
/** JoinGroupRequest groupId */
|
|
569
|
+
groupId?: string | null;
|
|
570
|
+
/** JoinGroupRequest userData */
|
|
571
|
+
userData?: string | null;
|
|
572
|
+
/** JoinGroupRequest autoJoinGroupAudio */
|
|
573
|
+
autoJoinGroupAudio?: boolean | null;
|
|
574
|
+
/** JoinGroupRequest autoLeaveChannelAudio */
|
|
575
|
+
autoLeaveChannelAudio?: boolean | null;
|
|
576
|
+
}
|
|
577
|
+
/** Represents a JoinGroupRequest. */
|
|
578
|
+
/** Properties of a JoinGroupResponse. */
|
|
579
|
+
interface IJoinGroupResponse {
|
|
580
|
+
/** JoinGroupResponse code */
|
|
581
|
+
code?: number | null;
|
|
582
|
+
/** JoinGroupResponse errMsg */
|
|
583
|
+
errMsg?: string | null;
|
|
584
|
+
/** JoinGroupResponse group */
|
|
585
|
+
group?: signal_msg.IGroupInfo | null;
|
|
586
|
+
/** JoinGroupResponse joinGroupAudioSuccess */
|
|
587
|
+
joinGroupAudioSuccess?: boolean | null;
|
|
588
|
+
}
|
|
589
|
+
/** Represents a JoinGroupResponse. */
|
|
590
|
+
/** LEAVE_GROUP_REASON_CODE export enum. */
|
|
591
|
+
enum LEAVE_GROUP_REASON_CODE {
|
|
592
|
+
NORMAL_LEAVE = 0
|
|
593
|
+
}
|
|
594
|
+
/** Properties of a LeaveGroupRequest. */
|
|
595
|
+
interface ILeaveGroupRequest {
|
|
596
|
+
/** LeaveGroupRequest groupId */
|
|
597
|
+
groupId?: string | null;
|
|
598
|
+
/** LeaveGroupRequest reasonCode */
|
|
599
|
+
reasonCode?: signal_msg.LEAVE_GROUP_REASON_CODE | null;
|
|
600
|
+
/** LeaveGroupRequest autoJoinChannelAudio */
|
|
601
|
+
autoJoinChannelAudio?: boolean | null;
|
|
602
|
+
/** LeaveGroupRequest autoLeaveGroupAudio */
|
|
603
|
+
autoLeaveGroupAudio?: boolean | null;
|
|
604
|
+
}
|
|
605
|
+
/** Represents a LeaveGroupRequest. */
|
|
606
|
+
/** Properties of a LeaveGroupResponse. */
|
|
607
|
+
interface ILeaveGroupResponse {
|
|
608
|
+
/** LeaveGroupResponse code */
|
|
609
|
+
code?: number | null;
|
|
610
|
+
/** LeaveGroupResponse errMsg */
|
|
611
|
+
errMsg?: string | null;
|
|
612
|
+
/** LeaveGroupResponse joinChannelAudioSuccess */
|
|
613
|
+
joinChannelAudioSuccess?: (boolean | null);
|
|
614
|
+
}
|
|
615
|
+
/** Represents a LeaveGroupResponse. */
|
|
616
|
+
/** DismissGroupReasonCode export enum. */
|
|
617
|
+
enum DismissGroupReasonCode {
|
|
618
|
+
NORMAL_DISMISS = 0
|
|
619
|
+
}
|
|
620
|
+
/** Properties of a DismissGroupRequest. */
|
|
621
|
+
interface IDismissGroupRequest {
|
|
622
|
+
/** DismissGroupRequest groupId */
|
|
623
|
+
groupId?: string | null;
|
|
624
|
+
/** DismissGroupRequest reasonCode */
|
|
625
|
+
reasonCode?: signal_msg.DismissGroupReasonCode | null;
|
|
626
|
+
}
|
|
627
|
+
/** Represents a DismissGroupRequest. */
|
|
628
|
+
/** Properties of a DismissGroupResponse. */
|
|
629
|
+
interface IDismissGroupResponse {
|
|
630
|
+
/** DismissGroupResponse code */
|
|
631
|
+
code?: number | null;
|
|
632
|
+
/** DismissGroupResponse errMsg */
|
|
633
|
+
errMsg?: string | null;
|
|
634
|
+
}
|
|
635
|
+
/** Represents a DismissGroupResponse. */
|
|
636
|
+
/** Properties of an ObserveAllGroupsRequest. */
|
|
637
|
+
interface IObserveAllGroupsRequest {
|
|
638
|
+
}
|
|
639
|
+
/** Represents an ObserveAllGroupsRequest. */
|
|
640
|
+
/** Properties of an ObserveAllGroupsResponse. */
|
|
641
|
+
interface IObserveAllGroupsResponse {
|
|
642
|
+
/** ObserveAllGroupsResponse code */
|
|
643
|
+
code?: number | null;
|
|
644
|
+
/** ObserveAllGroupsResponse errMsg */
|
|
645
|
+
errMsg?: string | null;
|
|
646
|
+
}
|
|
647
|
+
/** Represents an ObserveAllGroupsResponse. */
|
|
648
|
+
/** Properties of an UnobserveAllGroupsRequest. */
|
|
649
|
+
interface IUnobserveAllGroupsRequest {
|
|
650
|
+
}
|
|
651
|
+
/** Represents an UnobserveAllGroupsRequest. */
|
|
652
|
+
/** Properties of an UnobserveAllGroupsResponse. */
|
|
653
|
+
interface IUnobserveAllGroupsResponse {
|
|
654
|
+
/** UnobserveAllGroupsResponse code */
|
|
655
|
+
code?: number | null;
|
|
656
|
+
/** UnobserveAllGroupsResponse errMsg */
|
|
657
|
+
errMsg?: string | null;
|
|
658
|
+
}
|
|
659
|
+
/** Represents an UnobserveAllGroupsResponse. */
|
|
660
|
+
/** Properties of a SetParticipantPropertiesRequest. */
|
|
661
|
+
interface ISetParticipantPropertiesRequest {
|
|
662
|
+
/** SetParticipantPropertiesRequest roomId */
|
|
663
|
+
roomId?: string | null;
|
|
664
|
+
/** SetParticipantPropertiesRequest participantId */
|
|
665
|
+
participantId?: string | null;
|
|
666
|
+
/** SetParticipantPropertiesRequest propertiesJsonStr */
|
|
667
|
+
propertiesJsonStr?: string | null;
|
|
668
|
+
/** SetParticipantPropertiesRequest tid */
|
|
669
|
+
tid?: string | null;
|
|
670
|
+
/** SetParticipantPropertiesRequest traceId */
|
|
671
|
+
traceId?: string | null;
|
|
672
|
+
}
|
|
673
|
+
/** Represents a SetParticipantPropertiesRequest. */
|
|
674
|
+
/** Properties of a RemoveParticipantPropertiesRequest. */
|
|
675
|
+
interface IRemoveParticipantPropertiesRequest {
|
|
676
|
+
/** RemoveParticipantPropertiesRequest roomId */
|
|
677
|
+
roomId?: string | null;
|
|
678
|
+
/** RemoveParticipantPropertiesRequest participantId */
|
|
679
|
+
participantId?: string | null;
|
|
680
|
+
/** RemoveParticipantPropertiesRequest propertiesJsonStr */
|
|
681
|
+
propertiesJsonStr?: string | null;
|
|
682
|
+
/** RemoveParticipantPropertiesRequest tid */
|
|
683
|
+
tid?: string | null;
|
|
684
|
+
/** RemoveParticipantPropertiesRequest traceId */
|
|
685
|
+
traceId?: string | null;
|
|
686
|
+
}
|
|
687
|
+
/** Represents a RemoveParticipantPropertiesRequest. */
|
|
688
|
+
/** Result export enum. */
|
|
689
|
+
enum Result {
|
|
690
|
+
Ok = 0,
|
|
691
|
+
Error = 1
|
|
692
|
+
}
|
|
693
|
+
/** Properties of a Response. */
|
|
694
|
+
interface IResponse {
|
|
695
|
+
/** Response result */
|
|
696
|
+
result?: signal_msg.Result | null;
|
|
697
|
+
/** Response tid */
|
|
698
|
+
tid?: string | null;
|
|
699
|
+
/** Response traceId */
|
|
700
|
+
traceId?: string | null;
|
|
701
|
+
/** Response code */
|
|
702
|
+
code?: number | null;
|
|
703
|
+
/** Response reason */
|
|
704
|
+
reason?: string | null;
|
|
705
|
+
/** Response createPeerConnectionResponse */
|
|
706
|
+
createPeerConnectionResponse?: signal_msg.ICreatePeerConnectionResponse | null;
|
|
707
|
+
/** Response errorMsg */
|
|
708
|
+
errorMsg?: signal_msg.IErrorMsgs | null;
|
|
709
|
+
/** Response queryStreamsVerResponse */
|
|
710
|
+
queryStreamsVerResponse?: signal_msg.IQueryStreamsVerResponse | null;
|
|
711
|
+
/** Response queryStreamsResponse */
|
|
712
|
+
queryStreamsResponse?: signal_msg.IQueryStreamsResponse | null;
|
|
713
|
+
/** Response publishResponse */
|
|
714
|
+
publishResponse?: signal_msg.IPublishResponse | null;
|
|
715
|
+
/** Response subscribeResponse */
|
|
716
|
+
subscribeResponse?: signal_msg.ISubscribeResponse | null;
|
|
717
|
+
/** Response joinGroupResponse */
|
|
718
|
+
joinGroupResponse?: signal_msg.IJoinGroupResponse | null;
|
|
719
|
+
/** Response leaveGroupResponse */
|
|
720
|
+
leaveGroupResponse?: signal_msg.ILeaveGroupResponse | null;
|
|
721
|
+
/** Response dismissGroupResponse */
|
|
722
|
+
dismissGroupResponse?: signal_msg.IDismissGroupResponse | null;
|
|
723
|
+
/** Response observeAllGroupsResponse */
|
|
724
|
+
observeAllGroupsResponse?: signal_msg.IObserveAllGroupsResponse | null;
|
|
725
|
+
/** Response unobserveAllGroupsResponse */
|
|
726
|
+
unobserveAllGroupsResponse?: signal_msg.IUnobserveAllGroupsResponse | null;
|
|
727
|
+
/** Response syncDataResponse */
|
|
728
|
+
syncDataResponse?: signal_msg.ISyncDataResponse | null;
|
|
729
|
+
/** Response syncDataByIdsResponse */
|
|
730
|
+
syncDataByIdsResponse?: signal_msg.ISyncDataByIdsResponse | null;
|
|
731
|
+
setGroupPropertiesResponse?: signal_msg.ISetGroupPropertiesResponse | null;
|
|
732
|
+
}
|
|
733
|
+
/** Represents a Response. */
|
|
734
|
+
/** Properties of a NotificationItem. */
|
|
735
|
+
interface INotificationItem {
|
|
736
|
+
/** NotificationItem event */
|
|
737
|
+
event?: string | null;
|
|
738
|
+
/** NotificationItem streamNotification */
|
|
739
|
+
streamNotification?: signal_msg.IStreamNotification | null;
|
|
740
|
+
/** NotificationItem serverFailoverNotification */
|
|
741
|
+
serverFailoverNotification?: signal_msg.IServerFailoverNotification | null;
|
|
742
|
+
/** NotificationItem progressNotification */
|
|
743
|
+
progressNotification?: signal_msg.IProgressNotification | null;
|
|
744
|
+
/** NotificationItem groupNotification */
|
|
745
|
+
groupNotification?: signal_msg.IGroupChangeLog | null;
|
|
746
|
+
/** NotificationItem groupListNotification */
|
|
747
|
+
groupListNotification?: signal_msg.IGroupListChangeLog | null;
|
|
748
|
+
}
|
|
749
|
+
/** Represents a NotificationItem. */
|
|
750
|
+
/** Properties of a BatchNotification. */
|
|
751
|
+
interface IBatchNotification {
|
|
752
|
+
/** BatchNotification notificationItem */
|
|
753
|
+
notificationItem?: signal_msg.INotificationItem[] | null;
|
|
754
|
+
/** BatchNotification tid */
|
|
755
|
+
tid?: string | null;
|
|
756
|
+
/** BatchNotification traceId */
|
|
757
|
+
traceId?: string | null;
|
|
758
|
+
}
|
|
759
|
+
/** Represents a BatchNotification. */
|
|
760
|
+
/** Properties of a MediaMessage. */
|
|
761
|
+
interface IMediaMessage {
|
|
762
|
+
/** MediaMessage payload */
|
|
763
|
+
payload?: string | null;
|
|
764
|
+
}
|
|
765
|
+
/** Represents a MediaMessage. */
|
|
766
|
+
/** Properties of an AudioStreamTrackDesc. */
|
|
767
|
+
interface IAudioStreamTrackDesc {
|
|
768
|
+
/** AudioStreamTrackDesc streamId */
|
|
769
|
+
streamId?: string | null;
|
|
770
|
+
/** AudioStreamTrackDesc trackId */
|
|
771
|
+
trackId?: string | null;
|
|
772
|
+
/** AudioStreamTrackDesc msid */
|
|
773
|
+
msid?: string | null;
|
|
774
|
+
/** AudioStreamTrackDesc source */
|
|
775
|
+
source?: string | null;
|
|
776
|
+
/** AudioStreamTrackDesc uplinkSsrcGroup */
|
|
777
|
+
uplinkSsrcGroup?: signal_msg.IAudioSsrcSpec[] | null;
|
|
778
|
+
/** AudioStreamTrackDesc format */
|
|
779
|
+
format?: signal_msg.IAudioStreamFormat | null;
|
|
780
|
+
/** AudioStreamTrackDesc autoMix */
|
|
781
|
+
autoMix?: string[] | null;
|
|
782
|
+
/** AudioStreamTrackDesc attributesJsonString */
|
|
783
|
+
attributesJsonString?: string | null;
|
|
784
|
+
}
|
|
785
|
+
/** Represents an AudioStreamTrackDesc. */
|
|
786
|
+
/** Properties of a VideoStreamTrackDesc. */
|
|
787
|
+
interface IVideoStreamTrackDesc {
|
|
788
|
+
/** VideoStreamTrackDesc streamId */
|
|
789
|
+
streamId?: string | null;
|
|
790
|
+
/** VideoStreamTrackDesc trackId */
|
|
791
|
+
trackId?: string | null;
|
|
792
|
+
/** VideoStreamTrackDesc msid */
|
|
793
|
+
msid?: string | null;
|
|
794
|
+
/** VideoStreamTrackDesc source */
|
|
795
|
+
source?: string | null;
|
|
796
|
+
/** VideoStreamTrackDesc logicSsrc */
|
|
797
|
+
logicSsrc?: number[] | null;
|
|
798
|
+
/** VideoStreamTrackDesc uplinkSsrcGroup */
|
|
799
|
+
uplinkSsrcGroup?: signal_msg.IVideoSsrcSpec[] | null;
|
|
800
|
+
/** VideoStreamTrackDesc ssrcParameters */
|
|
801
|
+
ssrcParameters?: signal_msg.IVideoSsrcParameters[] | null;
|
|
802
|
+
/** VideoStreamTrackDesc streamParameters */
|
|
803
|
+
streamParameters?: signal_msg.IVideoParameters | null;
|
|
804
|
+
/** VideoStreamTrackDesc attributesJsonString */
|
|
805
|
+
attributesJsonString?: string | null;
|
|
806
|
+
/** VideoStreamTrackDesc forwardOnly */
|
|
807
|
+
forwardOnly?: boolean | null;
|
|
808
|
+
/** VideoStreamTrackDesc mid */
|
|
809
|
+
mid?: string | null;
|
|
810
|
+
}
|
|
811
|
+
/** Represents a VideoStreamTrackDesc. */
|
|
812
|
+
/** Properties of a MediaStreamTrackDesc. */
|
|
813
|
+
interface IMediaStreamTrackDesc {
|
|
814
|
+
/** MediaStreamTrackDesc audio */
|
|
815
|
+
audio?: signal_msg.IAudioStreamTrackDesc[] | null;
|
|
816
|
+
/** MediaStreamTrackDesc video */
|
|
817
|
+
video?: signal_msg.IVideoStreamTrackDesc[] | null;
|
|
818
|
+
}
|
|
819
|
+
/** Represents a MediaStreamTrackDesc. */
|
|
820
|
+
/** Properties of a StreamVersion. */
|
|
821
|
+
interface IStreamVersion {
|
|
822
|
+
/** StreamVersion streamId */
|
|
823
|
+
streamId?: string | null;
|
|
824
|
+
/** StreamVersion streamVer */
|
|
825
|
+
streamVer?: number | null;
|
|
826
|
+
}
|
|
827
|
+
/** Represents a StreamVersion. */
|
|
828
|
+
/** Properties of a StreamData. */
|
|
829
|
+
interface IStreamData {
|
|
830
|
+
/** StreamData id */
|
|
831
|
+
id?: string | null;
|
|
832
|
+
/** StreamData stream */
|
|
833
|
+
stream?: signal_msg.IStream | null;
|
|
834
|
+
}
|
|
835
|
+
/** Represents a StreamData. */
|
|
836
|
+
/** Properties of an AudioPubOptions. */
|
|
837
|
+
interface IAudioPubOptions {
|
|
838
|
+
/** AudioPubOptions source */
|
|
839
|
+
source?: string | null;
|
|
840
|
+
/** AudioPubOptions format */
|
|
841
|
+
format?: signal_msg.IAudioStreamFormat | null;
|
|
842
|
+
/** AudioPubOptions autoMix */
|
|
843
|
+
autoMix?: string[] | null;
|
|
844
|
+
}
|
|
845
|
+
/** Represents an AudioPubOptions. */
|
|
846
|
+
/** Properties of a VideoPubOptions. */
|
|
847
|
+
interface IVideoPubOptions {
|
|
848
|
+
/** VideoPubOptions source */
|
|
849
|
+
source?: string | null;
|
|
850
|
+
/** VideoPubOptions format */
|
|
851
|
+
format?: signal_msg.IVideoStreamFormat | null;
|
|
852
|
+
/** VideoPubOptions parameters */
|
|
853
|
+
parameters?: signal_msg.IVideoParameters | null;
|
|
854
|
+
/** VideoPubOptions forwardOnly */
|
|
855
|
+
forwardOnly?: boolean | null;
|
|
856
|
+
}
|
|
857
|
+
/** Represents a VideoPubOptions. */
|
|
858
|
+
/** Properties of a MediaPubOptionsSpecify. */
|
|
859
|
+
interface IMediaPubOptionsSpecify {
|
|
860
|
+
/** MediaPubOptionsSpecify audio */
|
|
861
|
+
audio?: signal_msg.IAudioPubOptions | null;
|
|
862
|
+
/** MediaPubOptionsSpecify video */
|
|
863
|
+
video?: signal_msg.IVideoPubOptions | null;
|
|
864
|
+
}
|
|
865
|
+
/** Represents a MediaPubOptionsSpecify. */
|
|
866
|
+
/** Properties of a BatchPublishRequest. */
|
|
867
|
+
interface IBatchPublishRequest {
|
|
868
|
+
/** BatchPublishRequest roomId */
|
|
869
|
+
roomId?: string | null;
|
|
870
|
+
/** BatchPublishRequest participantId */
|
|
871
|
+
participantId?: string | null;
|
|
872
|
+
/** BatchPublishRequest connectionId */
|
|
873
|
+
connectionId?: string | null;
|
|
874
|
+
/** BatchPublishRequest type */
|
|
875
|
+
type?: string | null;
|
|
876
|
+
/** BatchPublishRequest simulcast */
|
|
877
|
+
simulcast?: boolean | null;
|
|
878
|
+
/** BatchPublishRequest simulcastVersion */
|
|
879
|
+
simulcastVersion?: string | null;
|
|
880
|
+
/** BatchPublishRequest supportTemporalLayer */
|
|
881
|
+
supportTemporalLayer?: boolean | null;
|
|
882
|
+
/** BatchPublishRequest clientType */
|
|
883
|
+
clientType?: string | null;
|
|
884
|
+
/** BatchPublishRequest clientVersion */
|
|
885
|
+
clientVersion?: string | null;
|
|
886
|
+
/** BatchPublishRequest media */
|
|
887
|
+
media?: signal_msg.IMediaStreamTrackDesc | null;
|
|
888
|
+
/** BatchPublishRequest event */
|
|
889
|
+
event?: string | null;
|
|
890
|
+
/** BatchPublishRequest tid */
|
|
891
|
+
tid?: string | null;
|
|
892
|
+
/** BatchPublishRequest traceId */
|
|
893
|
+
traceId?: string | null;
|
|
894
|
+
}
|
|
895
|
+
/** Represents a BatchPublishRequest. */
|
|
896
|
+
/** Properties of a BatchUnpublishRequest. */
|
|
897
|
+
interface IBatchUnpublishRequest {
|
|
898
|
+
/** BatchUnpublishRequest roomId */
|
|
899
|
+
roomId?: string | null;
|
|
900
|
+
/** BatchUnpublishRequest participantId */
|
|
901
|
+
participantId?: string | null;
|
|
902
|
+
/** BatchUnpublishRequest connectionId */
|
|
903
|
+
connectionId?: string | null;
|
|
904
|
+
/** BatchUnpublishRequest audio */
|
|
905
|
+
audio?: string[] | null;
|
|
906
|
+
/** BatchUnpublishRequest video */
|
|
907
|
+
video?: string[] | null;
|
|
908
|
+
/** BatchUnpublishRequest tid */
|
|
909
|
+
tid?: string | null;
|
|
910
|
+
/** BatchUnpublishRequest traceId */
|
|
911
|
+
traceId?: string | null;
|
|
912
|
+
}
|
|
913
|
+
/** Represents a BatchUnpublishRequest. */
|
|
914
|
+
/** Properties of a QueryStreamsVerRequest. */
|
|
915
|
+
interface IQueryStreamsVerRequest {
|
|
916
|
+
/** QueryStreamsVerRequest roomId */
|
|
917
|
+
roomId?: string | null;
|
|
918
|
+
/** QueryStreamsVerRequest participantId */
|
|
919
|
+
participantId?: string | null;
|
|
920
|
+
/** QueryStreamsVerRequest streamIds */
|
|
921
|
+
streamIds?: string[] | null;
|
|
922
|
+
/** QueryStreamsVerRequest tid */
|
|
923
|
+
tid?: string | null;
|
|
924
|
+
/** QueryStreamsVerRequest traceId */
|
|
925
|
+
traceId?: string | null;
|
|
926
|
+
}
|
|
927
|
+
/** Represents a QueryStreamsVerRequest. */
|
|
928
|
+
/** Properties of a QueryStreamsVerResponse. */
|
|
929
|
+
interface IQueryStreamsVerResponse {
|
|
930
|
+
/** QueryStreamsVerResponse streamVersions */
|
|
931
|
+
streamVersions?: signal_msg.IStreamVersion[] | null;
|
|
932
|
+
/** QueryStreamsVerResponse totalVer */
|
|
933
|
+
totalVer?: number | null;
|
|
934
|
+
/** QueryStreamsVerResponse msg */
|
|
935
|
+
msg?: string | null;
|
|
936
|
+
}
|
|
937
|
+
/** Represents a QueryStreamsVerResponse. */
|
|
938
|
+
/** Properties of a StreamControlRequest. */
|
|
939
|
+
interface IStreamControlRequest {
|
|
940
|
+
/** StreamControlRequest roomId */
|
|
941
|
+
roomId?: string | null;
|
|
942
|
+
/** StreamControlRequest participantId */
|
|
943
|
+
participantId?: string | null;
|
|
944
|
+
/** StreamControlRequest streamId */
|
|
945
|
+
streamId?: string | null;
|
|
946
|
+
/** StreamControlRequest operation */
|
|
947
|
+
operation?: string | null;
|
|
948
|
+
/** StreamControlRequest data */
|
|
949
|
+
data?: string | null;
|
|
950
|
+
/** StreamControlRequest tid */
|
|
951
|
+
tid?: string | null;
|
|
952
|
+
/** StreamControlRequest traceId */
|
|
953
|
+
traceId?: string | null;
|
|
954
|
+
}
|
|
955
|
+
/** Represents a StreamControlRequest. */
|
|
956
|
+
/** Properties of a QueryStreamsRequest. */
|
|
957
|
+
interface IQueryStreamsRequest {
|
|
958
|
+
/** QueryStreamsRequest roomId */
|
|
959
|
+
roomId?: string | null;
|
|
960
|
+
/** QueryStreamsRequest participantId */
|
|
961
|
+
participantId?: string | null;
|
|
962
|
+
/** QueryStreamsRequest streamIds */
|
|
963
|
+
streamIds?: string[] | null;
|
|
964
|
+
/** QueryStreamsRequest tid */
|
|
965
|
+
tid?: string | null;
|
|
966
|
+
/** QueryStreamsRequest traceId */
|
|
967
|
+
traceId?: string | null;
|
|
968
|
+
}
|
|
969
|
+
/** Represents a QueryStreamsRequest. */
|
|
970
|
+
/** Properties of a QueryStreamsResponse. */
|
|
971
|
+
interface IQueryStreamsResponse {
|
|
972
|
+
/** QueryStreamsResponse totalVer */
|
|
973
|
+
totalVer?: number | null;
|
|
974
|
+
/** QueryStreamsResponse msg */
|
|
975
|
+
msg?: string | null;
|
|
976
|
+
/** QueryStreamsResponse streams */
|
|
977
|
+
streams?: signal_msg.IStreamData[] | null;
|
|
978
|
+
}
|
|
979
|
+
/** Represents a QueryStreamsResponse. */
|
|
980
|
+
/** Properties of a SetStreamPropertiesRequest. */
|
|
981
|
+
interface ISetStreamPropertiesRequest {
|
|
982
|
+
/** SetStreamPropertiesRequest roomId */
|
|
983
|
+
roomId?: string | null;
|
|
984
|
+
/** SetStreamPropertiesRequest streamId */
|
|
985
|
+
streamId?: string | null;
|
|
986
|
+
/** SetStreamPropertiesRequest propertiesJsonStr */
|
|
987
|
+
propertiesJsonStr?: string | null;
|
|
988
|
+
/** SetStreamPropertiesRequest tid */
|
|
989
|
+
tid?: string | null;
|
|
990
|
+
/** SetStreamPropertiesRequest traceId */
|
|
991
|
+
traceId?: string | null;
|
|
992
|
+
}
|
|
993
|
+
/** Represents a SetStreamPropertiesRequest. */
|
|
994
|
+
/** Properties of a PublishRequest. */
|
|
995
|
+
interface IPublishRequest {
|
|
996
|
+
/** PublishRequest roomId */
|
|
997
|
+
roomId?: string | null;
|
|
998
|
+
/** PublishRequest participantId */
|
|
999
|
+
participantId?: string | null;
|
|
1000
|
+
/** PublishRequest type */
|
|
1001
|
+
type?: string | null;
|
|
1002
|
+
/** PublishRequest event */
|
|
1003
|
+
event?: string | null;
|
|
1004
|
+
/** PublishRequest media */
|
|
1005
|
+
media?: signal_msg.IMediaPubOptionsSpecify | null;
|
|
1006
|
+
/** PublishRequest attributesJsonStr */
|
|
1007
|
+
attributesJsonStr?: string | null;
|
|
1008
|
+
/** PublishRequest tid */
|
|
1009
|
+
tid?: string | null;
|
|
1010
|
+
/** PublishRequest traceId */
|
|
1011
|
+
traceId?: string | null;
|
|
1012
|
+
}
|
|
1013
|
+
/** Represents a PublishRequest. */
|
|
1014
|
+
/** Properties of a PublishResponse. */
|
|
1015
|
+
interface IPublishResponse {
|
|
1016
|
+
/** PublishResponse id */
|
|
1017
|
+
id?: string | null;
|
|
1018
|
+
}
|
|
1019
|
+
/** Represents a PublishResponse. */
|
|
1020
|
+
/** Properties of an UnpublishRequest. */
|
|
1021
|
+
interface IUnpublishRequest {
|
|
1022
|
+
/** UnpublishRequest roomId */
|
|
1023
|
+
roomId?: string | null;
|
|
1024
|
+
/** UnpublishRequest participantId */
|
|
1025
|
+
participantId?: string | null;
|
|
1026
|
+
/** UnpublishRequest streamId */
|
|
1027
|
+
streamId?: string | null;
|
|
1028
|
+
/** UnpublishRequest tid */
|
|
1029
|
+
tid?: string | null;
|
|
1030
|
+
/** UnpublishRequest traceId */
|
|
1031
|
+
traceId?: string | null;
|
|
1032
|
+
}
|
|
1033
|
+
/** Represents an UnpublishRequest. */
|
|
1034
|
+
/** Properties of a NetworkHealth. */
|
|
1035
|
+
interface INetworkHealth {
|
|
1036
|
+
/** NetworkHealth receiving */
|
|
1037
|
+
receiving?: boolean | null;
|
|
1038
|
+
/** NetworkHealth lossRate */
|
|
1039
|
+
lossRate?: number | null;
|
|
1040
|
+
/** NetworkHealth timestamp */
|
|
1041
|
+
timestamp?: number | null;
|
|
1042
|
+
/** NetworkHealth cutoff */
|
|
1043
|
+
cutoff?: boolean | null;
|
|
1044
|
+
/** NetworkHealth tid */
|
|
1045
|
+
tid?: string | null;
|
|
1046
|
+
}
|
|
1047
|
+
/** Represents a NetworkHealth. */
|
|
1048
|
+
/** Properties of a StreamMsg. */
|
|
1049
|
+
interface IStreamMsg {
|
|
1050
|
+
/** StreamMsg field */
|
|
1051
|
+
field?: string | null;
|
|
1052
|
+
/** StreamMsg streamVer */
|
|
1053
|
+
streamVer?: number | null;
|
|
1054
|
+
/** StreamMsg expiredMs */
|
|
1055
|
+
expiredMs?: number | null;
|
|
1056
|
+
/** StreamMsg extraValue */
|
|
1057
|
+
extraValue?: string[] | null;
|
|
1058
|
+
/** StreamMsg tid */
|
|
1059
|
+
tid?: string | null;
|
|
1060
|
+
/** StreamMsg networkHealth */
|
|
1061
|
+
networkHealth?: signal_msg.INetworkHealth | null;
|
|
1062
|
+
/** StreamMsg streamStatus */
|
|
1063
|
+
streamStatus?: string | null;
|
|
1064
|
+
/** StreamMsg stream */
|
|
1065
|
+
stream?: signal_msg.IStream | null;
|
|
1066
|
+
/** StreamMsg activeStream */
|
|
1067
|
+
activeStream?: string | null;
|
|
1068
|
+
/** StreamMsg propertiesJsonStr */
|
|
1069
|
+
propertiesJsonStr?: string | null;
|
|
1070
|
+
}
|
|
1071
|
+
/** Represents a StreamMsg. */
|
|
1072
|
+
/** Properties of a StreamNotification. */
|
|
1073
|
+
interface IStreamNotification {
|
|
1074
|
+
/** StreamNotification streamId */
|
|
1075
|
+
streamId?: string | null;
|
|
1076
|
+
/** StreamNotification status */
|
|
1077
|
+
status?: string | null;
|
|
1078
|
+
/** StreamNotification totalVer */
|
|
1079
|
+
totalVer?: number | null;
|
|
1080
|
+
/** StreamNotification msgId */
|
|
1081
|
+
msgId?: string | null;
|
|
1082
|
+
/** StreamNotification ts */
|
|
1083
|
+
ts?: number | null;
|
|
1084
|
+
/** StreamNotification tid */
|
|
1085
|
+
tid?: string | null;
|
|
1086
|
+
/** StreamNotification traceId */
|
|
1087
|
+
traceId?: string | null;
|
|
1088
|
+
/** StreamNotification stream */
|
|
1089
|
+
stream?: signal_msg.IStream | null;
|
|
1090
|
+
/** StreamNotification msg */
|
|
1091
|
+
msg?: signal_msg.IStreamMsg | null;
|
|
1092
|
+
}
|
|
1093
|
+
/** Represents a StreamNotification. */
|
|
1094
|
+
/** Properties of a Candidate. */
|
|
1095
|
+
interface ICandidate {
|
|
1096
|
+
/** Candidate candidate */
|
|
1097
|
+
candidate?: string | null;
|
|
1098
|
+
/** Candidate sdpMlineIndex */
|
|
1099
|
+
sdpMlineIndex?: number | null;
|
|
1100
|
+
/** Candidate sdpMid */
|
|
1101
|
+
sdpMid?: string | null;
|
|
1102
|
+
}
|
|
1103
|
+
/** Represents a Candidate. */
|
|
1104
|
+
/** Properties of a SessionSignaling. */
|
|
1105
|
+
interface ISessionSignaling {
|
|
1106
|
+
/** SessionSignaling type */
|
|
1107
|
+
type?: string | null;
|
|
1108
|
+
/** SessionSignaling sdp */
|
|
1109
|
+
sdp?: string | null;
|
|
1110
|
+
/** SessionSignaling candidate */
|
|
1111
|
+
candidate?: signal_msg.ICandidate | null;
|
|
1112
|
+
/** SessionSignaling optionsJsonStr */
|
|
1113
|
+
optionsJsonStr?: string | null;
|
|
1114
|
+
}
|
|
1115
|
+
/** Represents a SessionSignaling. */
|
|
1116
|
+
/** Properties of a SignalingData. */
|
|
1117
|
+
interface ISignalingData {
|
|
1118
|
+
/** SignalingData type */
|
|
1119
|
+
type?: string | null;
|
|
1120
|
+
/** SignalingData sdp */
|
|
1121
|
+
sdp?: string | null;
|
|
1122
|
+
}
|
|
1123
|
+
/** Represents a SignalingData. */
|
|
1124
|
+
/** Properties of a CreatePeerConnectionRequest. */
|
|
1125
|
+
interface ICreatePeerConnectionRequest {
|
|
1126
|
+
/** CreatePeerConnectionRequest roomId */
|
|
1127
|
+
roomId?: string | null;
|
|
1128
|
+
/** CreatePeerConnectionRequest participantId */
|
|
1129
|
+
participantId?: string | null;
|
|
1130
|
+
/** CreatePeerConnectionRequest connectionId */
|
|
1131
|
+
connectionId?: string | null;
|
|
1132
|
+
/** CreatePeerConnectionRequest tid */
|
|
1133
|
+
tid?: string | null;
|
|
1134
|
+
/** CreatePeerConnectionRequest event */
|
|
1135
|
+
event?: string | null;
|
|
1136
|
+
/** CreatePeerConnectionRequest direction */
|
|
1137
|
+
direction?: string | null;
|
|
1138
|
+
/** CreatePeerConnectionRequest sdpOffer */
|
|
1139
|
+
sdpOffer?: string | null;
|
|
1140
|
+
/** CreatePeerConnectionRequest type */
|
|
1141
|
+
type?: string | null;
|
|
1142
|
+
/** CreatePeerConnectionRequest isOca */
|
|
1143
|
+
isOca?: boolean | null;
|
|
1144
|
+
/** CreatePeerConnectionRequest isFailover */
|
|
1145
|
+
isFailover?: boolean | null;
|
|
1146
|
+
/** CreatePeerConnectionRequest multiPcAdaptInfo */
|
|
1147
|
+
multiPcAdaptInfo?: signal_msg.IMultiPcAdaptRequestInfo | null;
|
|
1148
|
+
/** CreatePeerConnectionRequest pcFormatPreference */
|
|
1149
|
+
pcFormatPreference?: signal_msg.IFormatPreference | null;
|
|
1150
|
+
/** CreatePeerConnectionRequest optionsJsonStr */
|
|
1151
|
+
optionsJsonStr?: string | null;
|
|
1152
|
+
/** CreatePeerConnectionRequest traceId */
|
|
1153
|
+
traceId?: string | null;
|
|
1154
|
+
/** CreatePeerConnectionRequest sfuSsrcGroup */
|
|
1155
|
+
sfuSsrcGroup?: signal_msg.IAudioSsrcSpec[] | null;
|
|
1156
|
+
}
|
|
1157
|
+
/** Represents a CreatePeerConnectionRequest. */
|
|
1158
|
+
/** Properties of a CreatePeerConnectionResponse. */
|
|
1159
|
+
interface ICreatePeerConnectionResponse {
|
|
1160
|
+
/** CreatePeerConnectionResponse connectionId */
|
|
1161
|
+
connectionId?: string | null;
|
|
1162
|
+
/** CreatePeerConnectionResponse sdpAnswer */
|
|
1163
|
+
sdpAnswer?: string | null;
|
|
1164
|
+
}
|
|
1165
|
+
/** Represents a CreatePeerConnectionResponse. */
|
|
1166
|
+
/** Properties of a ClosePeerConnectionRequest. */
|
|
1167
|
+
interface IClosePeerConnectionRequest {
|
|
1168
|
+
/** ClosePeerConnectionRequest roomId */
|
|
1169
|
+
roomId?: string | null;
|
|
1170
|
+
/** ClosePeerConnectionRequest participantId */
|
|
1171
|
+
participantId?: string | null;
|
|
1172
|
+
/** ClosePeerConnectionRequest connectionId */
|
|
1173
|
+
connectionId?: string | null;
|
|
1174
|
+
/** ClosePeerConnectionRequest direction */
|
|
1175
|
+
direction?: string | null;
|
|
1176
|
+
/** ClosePeerConnectionRequest tid */
|
|
1177
|
+
tid?: string | null;
|
|
1178
|
+
/** ClosePeerConnectionRequest traceId */
|
|
1179
|
+
traceId?: string | null;
|
|
1180
|
+
}
|
|
1181
|
+
/** Represents a ClosePeerConnectionRequest. */
|
|
1182
|
+
/** Properties of a SoacRequest. */
|
|
1183
|
+
interface ISoacRequest {
|
|
1184
|
+
/** SoacRequest id */
|
|
1185
|
+
id?: string | null;
|
|
1186
|
+
/** SoacRequest signaling */
|
|
1187
|
+
signaling?: signal_msg.ISessionSignaling | null;
|
|
1188
|
+
/** SoacRequest tid */
|
|
1189
|
+
tid?: string | null;
|
|
1190
|
+
/** SoacRequest traceId */
|
|
1191
|
+
traceId?: string | null;
|
|
1192
|
+
}
|
|
1193
|
+
/** Represents a SoacRequest. */
|
|
1194
|
+
/** Properties of a NotifyAction. */
|
|
1195
|
+
interface INotifyAction {
|
|
1196
|
+
/** NotifyAction actionName */
|
|
1197
|
+
actionName?: string | null;
|
|
1198
|
+
/** NotifyAction connectionId */
|
|
1199
|
+
connectionId?: string | null;
|
|
1200
|
+
/** NotifyAction traceId */
|
|
1201
|
+
traceId?: string | null;
|
|
1202
|
+
}
|
|
1203
|
+
/** Represents a NotifyAction. */
|
|
1204
|
+
/** Properties of a ServerFailoverNotification. */
|
|
1205
|
+
interface IServerFailoverNotification {
|
|
1206
|
+
/** ServerFailoverNotification actions */
|
|
1207
|
+
actions?: signal_msg.INotifyAction[] | null;
|
|
1208
|
+
/** ServerFailoverNotification msgId */
|
|
1209
|
+
msgId?: string | null;
|
|
1210
|
+
/** ServerFailoverNotification tid */
|
|
1211
|
+
tid?: string | null;
|
|
1212
|
+
/** ServerFailoverNotification traceId */
|
|
1213
|
+
traceId?: string | null;
|
|
1214
|
+
}
|
|
1215
|
+
/** Represents a ServerFailoverNotification. */
|
|
1216
|
+
/** Properties of a ProgressNotification. */
|
|
1217
|
+
interface IProgressNotification {
|
|
1218
|
+
/** ProgressNotification id */
|
|
1219
|
+
id?: string | null;
|
|
1220
|
+
/** ProgressNotification status */
|
|
1221
|
+
status?: string | null;
|
|
1222
|
+
/** ProgressNotification data */
|
|
1223
|
+
data?: signal_msg.ISignalingData | null;
|
|
1224
|
+
/** ProgressNotification msgId */
|
|
1225
|
+
msgId?: string | null;
|
|
1226
|
+
/** ProgressNotification tid */
|
|
1227
|
+
tid?: string | null;
|
|
1228
|
+
/** ProgressNotification traceId */
|
|
1229
|
+
traceId?: string | null;
|
|
1230
|
+
}
|
|
1231
|
+
/** Represents a ProgressNotification. */
|
|
1232
|
+
/** Properties of an AudioBatchSubOptions. */
|
|
1233
|
+
interface IAudioBatchSubOptions {
|
|
1234
|
+
/** AudioBatchSubOptions subscriptionId */
|
|
1235
|
+
subscriptionId?: string | null;
|
|
1236
|
+
/** AudioBatchSubOptions from */
|
|
1237
|
+
from?: string | null;
|
|
1238
|
+
/** AudioBatchSubOptions trackId */
|
|
1239
|
+
trackId?: string | null;
|
|
1240
|
+
/** AudioBatchSubOptions ssrcGroup */
|
|
1241
|
+
ssrcGroup?: signal_msg.IAudioSsrcSpec[] | null;
|
|
1242
|
+
/** AudioBatchSubOptions format */
|
|
1243
|
+
format?: signal_msg.IAudioStreamFormat | null;
|
|
1244
|
+
}
|
|
1245
|
+
/** Represents an AudioBatchSubOptions. */
|
|
1246
|
+
/** Properties of a VideoBatchSubOptions. */
|
|
1247
|
+
interface IVideoBatchSubOptions {
|
|
1248
|
+
/** VideoBatchSubOptions subscriptionId */
|
|
1249
|
+
subscriptionId?: string | null;
|
|
1250
|
+
/** VideoBatchSubOptions from */
|
|
1251
|
+
from?: string | null;
|
|
1252
|
+
/** VideoBatchSubOptions trackId */
|
|
1253
|
+
trackId?: string | null;
|
|
1254
|
+
/** VideoBatchSubOptions ssrcGroup */
|
|
1255
|
+
ssrcGroup?: signal_msg.IVideoSsrcSpec[] | null;
|
|
1256
|
+
/** VideoBatchSubOptions parameters */
|
|
1257
|
+
parameters?: signal_msg.IVideoParameters | null;
|
|
1258
|
+
/** VideoBatchSubOptions format */
|
|
1259
|
+
format?: signal_msg.IVideoStreamFormat | null;
|
|
1260
|
+
/** VideoBatchSubOptions subSsrcGroup */
|
|
1261
|
+
subSsrcGroup?: signal_msg.IVideoSsrcSpec | null;
|
|
1262
|
+
}
|
|
1263
|
+
/** Represents a VideoBatchSubOptions. */
|
|
1264
|
+
/** Properties of a MediaBatchSubOptions. */
|
|
1265
|
+
interface IMediaBatchSubOptions {
|
|
1266
|
+
/** MediaBatchSubOptions audio */
|
|
1267
|
+
audio?: signal_msg.IAudioBatchSubOptions[] | null;
|
|
1268
|
+
/** MediaBatchSubOptions video */
|
|
1269
|
+
video?: signal_msg.IVideoBatchSubOptions[] | null;
|
|
1270
|
+
}
|
|
1271
|
+
/** Represents a MediaBatchSubOptions. */
|
|
1272
|
+
/** Properties of an Audio. */
|
|
1273
|
+
interface IAudio {
|
|
1274
|
+
/** Audio from */
|
|
1275
|
+
from?: string | null;
|
|
1276
|
+
}
|
|
1277
|
+
/** Represents an Audio. */
|
|
1278
|
+
/** Properties of a Video. */
|
|
1279
|
+
interface IVideo {
|
|
1280
|
+
/** Video from */
|
|
1281
|
+
from?: string | null;
|
|
1282
|
+
/** Video params */
|
|
1283
|
+
params?: signal_msg.IVideoParameters | null;
|
|
1284
|
+
}
|
|
1285
|
+
/** Represents a Video. */
|
|
1286
|
+
/** Properties of a MediaUpdateDesc. */
|
|
1287
|
+
interface IMediaUpdateDesc {
|
|
1288
|
+
/** MediaUpdateDesc audio */
|
|
1289
|
+
audio?: signal_msg.IAudio | null;
|
|
1290
|
+
/** MediaUpdateDesc video */
|
|
1291
|
+
video?: signal_msg.IVideo | null;
|
|
1292
|
+
}
|
|
1293
|
+
/** Represents a MediaUpdateDesc. */
|
|
1294
|
+
/** Properties of an AudioSubOptions. */
|
|
1295
|
+
interface IAudioSubOptions {
|
|
1296
|
+
/** AudioSubOptions from */
|
|
1297
|
+
from?: string | null;
|
|
1298
|
+
/** AudioSubOptions format */
|
|
1299
|
+
format?: signal_msg.IAudioStreamFormat | null;
|
|
1300
|
+
}
|
|
1301
|
+
/** Represents an AudioSubOptions. */
|
|
1302
|
+
/** Properties of a VideoSubOptions. */
|
|
1303
|
+
interface IVideoSubOptions {
|
|
1304
|
+
/** VideoSubOptions from */
|
|
1305
|
+
from?: string | null;
|
|
1306
|
+
/** VideoSubOptions format */
|
|
1307
|
+
format?: signal_msg.IVideoStreamFormat | null;
|
|
1308
|
+
/** VideoSubOptions parameters */
|
|
1309
|
+
parameters?: signal_msg.IVideoParameters | null;
|
|
1310
|
+
}
|
|
1311
|
+
/** Represents a VideoSubOptions. */
|
|
1312
|
+
/** Properties of a MediaSubOptionsSpecify. */
|
|
1313
|
+
interface IMediaSubOptionsSpecify {
|
|
1314
|
+
/** MediaSubOptionsSpecify audio */
|
|
1315
|
+
audio?: signal_msg.IAudioSubOptions | null;
|
|
1316
|
+
/** MediaSubOptionsSpecify video */
|
|
1317
|
+
video?: signal_msg.IVideoSubOptions | null;
|
|
1318
|
+
}
|
|
1319
|
+
/** Represents a MediaSubOptionsSpecify. */
|
|
1320
|
+
/** Properties of a SubscribeRequest. */
|
|
1321
|
+
interface ISubscribeRequest {
|
|
1322
|
+
/** SubscribeRequest roomId */
|
|
1323
|
+
roomId?: string | null;
|
|
1324
|
+
/** SubscribeRequest participantId */
|
|
1325
|
+
participantId?: string | null;
|
|
1326
|
+
/** SubscribeRequest tid */
|
|
1327
|
+
tid?: string | null;
|
|
1328
|
+
/** SubscribeRequest event */
|
|
1329
|
+
event?: string | null;
|
|
1330
|
+
/** SubscribeRequest media */
|
|
1331
|
+
media?: signal_msg.IMediaSubOptionsSpecify | null;
|
|
1332
|
+
/** SubscribeRequest type */
|
|
1333
|
+
type?: string | null;
|
|
1334
|
+
/** SubscribeRequest propertiesJsonStr */
|
|
1335
|
+
propertiesJsonStr?: string | null;
|
|
1336
|
+
/** SubscribeRequest traceId */
|
|
1337
|
+
traceId?: string | null;
|
|
1338
|
+
}
|
|
1339
|
+
/** Represents a SubscribeRequest. */
|
|
1340
|
+
/** Properties of a SubscribeResponse. */
|
|
1341
|
+
interface ISubscribeResponse {
|
|
1342
|
+
/** SubscribeResponse id */
|
|
1343
|
+
id?: string | null;
|
|
1344
|
+
}
|
|
1345
|
+
/** Represents a SubscribeResponse. */
|
|
1346
|
+
/** Properties of an UnsubscribeRequest. */
|
|
1347
|
+
interface IUnsubscribeRequest {
|
|
1348
|
+
/** UnsubscribeRequest roomId */
|
|
1349
|
+
roomId?: string | null;
|
|
1350
|
+
/** UnsubscribeRequest participantId */
|
|
1351
|
+
participantId?: string | null;
|
|
1352
|
+
/** UnsubscribeRequest subscriptionId */
|
|
1353
|
+
subscriptionId?: string | null;
|
|
1354
|
+
/** UnsubscribeRequest tid */
|
|
1355
|
+
tid?: string | null;
|
|
1356
|
+
/** UnsubscribeRequest traceId */
|
|
1357
|
+
traceId?: string | null;
|
|
1358
|
+
}
|
|
1359
|
+
/** Represents an UnsubscribeRequest. */
|
|
1360
|
+
/** Properties of a BatchSubscribeRequest. */
|
|
1361
|
+
interface IBatchSubscribeRequest {
|
|
1362
|
+
/** BatchSubscribeRequest roomId */
|
|
1363
|
+
roomId?: string | null;
|
|
1364
|
+
/** BatchSubscribeRequest participantId */
|
|
1365
|
+
participantId?: string | null;
|
|
1366
|
+
/** BatchSubscribeRequest connectionId */
|
|
1367
|
+
connectionId?: string | null;
|
|
1368
|
+
/** BatchSubscribeRequest supportTemporalLayer */
|
|
1369
|
+
supportTemporalLayer?: boolean | null;
|
|
1370
|
+
/** BatchSubscribeRequest clientType */
|
|
1371
|
+
clientType?: string | null;
|
|
1372
|
+
/** BatchSubscribeRequest clientVersion */
|
|
1373
|
+
clientVersion?: string | null;
|
|
1374
|
+
/** BatchSubscribeRequest media */
|
|
1375
|
+
media?: signal_msg.IMediaBatchSubOptions | null;
|
|
1376
|
+
/** BatchSubscribeRequest tid */
|
|
1377
|
+
tid?: string | null;
|
|
1378
|
+
/** BatchSubscribeRequest type */
|
|
1379
|
+
type?: string | null;
|
|
1380
|
+
/** BatchSubscribeRequest event */
|
|
1381
|
+
event?: string | null;
|
|
1382
|
+
/** BatchSubscribeRequest propertiesJsonStr */
|
|
1383
|
+
propertiesJsonStr?: string | null;
|
|
1384
|
+
/** BatchSubscribeRequest traceId */
|
|
1385
|
+
traceId?: string | null;
|
|
1386
|
+
}
|
|
1387
|
+
/** Represents a BatchSubscribeRequest. */
|
|
1388
|
+
/** Properties of a BatchUnsubscribeRequest. */
|
|
1389
|
+
interface IBatchUnsubscribeRequest {
|
|
1390
|
+
/** BatchUnsubscribeRequest roomId */
|
|
1391
|
+
roomId?: string | null;
|
|
1392
|
+
/** BatchUnsubscribeRequest participantId */
|
|
1393
|
+
participantId?: string | null;
|
|
1394
|
+
/** BatchUnsubscribeRequest connectionId */
|
|
1395
|
+
connectionId?: string | null;
|
|
1396
|
+
/** BatchUnsubscribeRequest audio */
|
|
1397
|
+
audio?: string[] | null;
|
|
1398
|
+
/** BatchUnsubscribeRequest video */
|
|
1399
|
+
video?: string[] | null;
|
|
1400
|
+
/** BatchUnsubscribeRequest tid */
|
|
1401
|
+
tid?: string | null;
|
|
1402
|
+
/** BatchUnsubscribeRequest traceId */
|
|
1403
|
+
traceId?: string | null;
|
|
1404
|
+
}
|
|
1405
|
+
/** Represents a BatchUnsubscribeRequest. */
|
|
1406
|
+
/** Properties of a SubscriptionControlRequest. */
|
|
1407
|
+
interface ISubscriptionControlRequest {
|
|
1408
|
+
/** SubscriptionControlRequest roomId */
|
|
1409
|
+
roomId?: string | null;
|
|
1410
|
+
/** SubscriptionControlRequest participantId */
|
|
1411
|
+
participantId?: string | null;
|
|
1412
|
+
/** SubscriptionControlRequest subscriptionId */
|
|
1413
|
+
subscriptionId?: string | null;
|
|
1414
|
+
/** SubscriptionControlRequest operation */
|
|
1415
|
+
operation?: string | null;
|
|
1416
|
+
/** SubscriptionControlRequest updateDesc */
|
|
1417
|
+
updateDesc?: signal_msg.IMediaUpdateDesc | null;
|
|
1418
|
+
/** SubscriptionControlRequest track */
|
|
1419
|
+
track?: string | null;
|
|
1420
|
+
/** SubscriptionControlRequest tid */
|
|
1421
|
+
tid?: string | null;
|
|
1422
|
+
/** SubscriptionControlRequest traceId */
|
|
1423
|
+
traceId?: string | null;
|
|
1424
|
+
}
|
|
1425
|
+
/** Represents a SubscriptionControlRequest. */
|
|
1426
|
+
/** Properties of a ParticipantInfo. */
|
|
1427
|
+
interface IParticipantInfo {
|
|
1428
|
+
/** ParticipantInfo id */
|
|
1429
|
+
id?: string | null;
|
|
1430
|
+
/** ParticipantInfo user */
|
|
1431
|
+
user?: string | null;
|
|
1432
|
+
/** ParticipantInfo role */
|
|
1433
|
+
role?: string | null;
|
|
1434
|
+
/** ParticipantInfo ver */
|
|
1435
|
+
ver?: number | null;
|
|
1436
|
+
/** ParticipantInfo propertiesJsonStr */
|
|
1437
|
+
propertiesJsonStr?: string | null;
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
/**
|
|
1442
|
+
* @internal
|
|
1443
|
+
*/
|
|
1444
|
+
declare class Signaling extends EventEmitter<SignalingEvent> {
|
|
1445
|
+
loggedIn: boolean;
|
|
1446
|
+
channel: DingRTCChannel;
|
|
1447
|
+
rpcId: number;
|
|
1448
|
+
reporter: Reporter;
|
|
1449
|
+
constructor(channel: DingRTCChannel);
|
|
1450
|
+
join(joinInfo: JoinParam$1, gslb?: string): Promise<{
|
|
1451
|
+
joinResponse: ISignal_msg.IJoinResponse;
|
|
1452
|
+
iceConfig: {
|
|
1453
|
+
uis: ICEConfig;
|
|
1454
|
+
};
|
|
1455
|
+
}>;
|
|
1456
|
+
leave(): void;
|
|
1457
|
+
private handleUserEvent;
|
|
1458
|
+
private handleSyncEvent;
|
|
1459
|
+
private handleConnectionStateChangeEvent;
|
|
1460
|
+
private handleNotifyEvent;
|
|
1461
|
+
private handleBatchNotifyEvent;
|
|
1462
|
+
createPeerConnection(model: signal_msg.ICreatePeerConnectionRequest): Promise<signal_msg.ICreatePeerConnectionResponse>;
|
|
1463
|
+
closePeerConnection(model: signal_msg.IClosePeerConnectionRequest): Promise<signal_msg.IResponse>;
|
|
1464
|
+
batchSubscribe(model: signal_msg.IBatchSubscribeRequest): Promise<signal_msg.IErrorMsgs>;
|
|
1465
|
+
setGroupProperties(model: signal_msg.ISetGroupPropertiesRequest): Promise<signal_msg.ISetGroupPropertiesResponse>;
|
|
1466
|
+
batchUnSubscribe(model: signal_msg.IBatchUnsubscribeRequest): Promise<signal_msg.IResponse>;
|
|
1467
|
+
batchPublish(model: signal_msg.IBatchPublishRequest): Promise<signal_msg.IErrorMsgs>;
|
|
1468
|
+
batchUnPublish(model: signal_msg.IBatchUnpublishRequest): Promise<signal_msg.IResponse>;
|
|
1469
|
+
publish(model: signal_msg.IPublishRequest): Promise<signal_msg.IPublishResponse>;
|
|
1470
|
+
setParticipantProperties(model: signal_msg.ISetParticipantPropertiesRequest): Promise<signal_msg.IResponse>;
|
|
1471
|
+
soac(model: signal_msg.ISoacRequest): Promise<signal_msg.IResponse>;
|
|
1472
|
+
unpublish(model: signal_msg.IUnpublishRequest): Promise<signal_msg.IResponse>;
|
|
1473
|
+
streamControl(model: signal_msg.IStreamControlRequest): Promise<signal_msg.IResponse>;
|
|
1474
|
+
setStreamProperties(model: signal_msg.ISetStreamPropertiesRequest): Promise<signal_msg.IResponse>;
|
|
1475
|
+
subscribe(model: signal_msg.ISubscribeRequest): Promise<signal_msg.ISubscribeResponse>;
|
|
1476
|
+
unsubscribe(model: signal_msg.IUnsubscribeRequest): Promise<signal_msg.IResponse>;
|
|
1477
|
+
subscriptionControl(model: signal_msg.ISubscriptionControlRequest): Promise<signal_msg.IResponse>;
|
|
1478
|
+
getStreamsVer(model: signal_msg.IQueryStreamsVerRequest): Promise<signal_msg.IQueryStreamsVerResponse>;
|
|
1479
|
+
getStreams(model: signal_msg.IQueryStreamsRequest): Promise<signal_msg.IQueryStreamsResponse>;
|
|
1480
|
+
joinGroup(model: signal_msg.IJoinGroupRequest): Promise<signal_msg.IJoinGroupResponse>;
|
|
1481
|
+
leaveGroup(model: signal_msg.ILeaveGroupRequest): Promise<signal_msg.ILeaveGroupResponse>;
|
|
1482
|
+
dismissGroup(model: signal_msg.IDismissGroupRequest): Promise<signal_msg.IDismissGroupResponse>;
|
|
1483
|
+
syncData(model: signal_msg.ISyncDataRequest): Promise<signal_msg.ISyncDataResponse>;
|
|
1484
|
+
syncDataByIds(model: signal_msg.ISyncDataByIdsRequest): Promise<signal_msg.ISyncDataByIdsResponse>;
|
|
1485
|
+
observeAllGroups(): Promise<signal_msg.IObserveAllGroupsResponse>;
|
|
1486
|
+
unobserveAllGroups(): Promise<signal_msg.IUnobserveAllGroupsResponse>;
|
|
1487
|
+
rpc(method: string, data: Uint8Array, param?: any): Promise<signal_msg.IResponse>;
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
interface VideoTrackStatsInfo {
|
|
1491
|
+
framesSent?: number;
|
|
1492
|
+
lostTimestamp?: number;
|
|
1493
|
+
sentTimestamp?: number;
|
|
1494
|
+
timestamp?: number;
|
|
1495
|
+
bytesSent?: number;
|
|
1496
|
+
packetsSent?: number;
|
|
1497
|
+
packetsSentForLost?: number;
|
|
1498
|
+
packetsLost?: number;
|
|
1499
|
+
qpSum?: number;
|
|
1500
|
+
sendFrameWidth?: number;
|
|
1501
|
+
sendFrameHeight?: number;
|
|
1502
|
+
sendFramesPerSecond?: number;
|
|
1503
|
+
totalEncodeTime?: number;
|
|
1504
|
+
targetBitrate?: number;
|
|
1505
|
+
framesEncoded?: number;
|
|
1506
|
+
retransmittedBytesSent?: number;
|
|
1507
|
+
retransmittedPacketsSent?: number;
|
|
1508
|
+
firCount?: number;
|
|
1509
|
+
pliCount?: number;
|
|
1510
|
+
nackCount?: number;
|
|
1511
|
+
qualityLimitationReason?: string;
|
|
1512
|
+
qualityLimitationDurations?: string;
|
|
1513
|
+
keyFramesEncoded?: number;
|
|
1514
|
+
rid?: string;
|
|
1515
|
+
mid?: string;
|
|
1516
|
+
duration?: number;
|
|
1517
|
+
deltaQbSum?: number;
|
|
1518
|
+
deltaFramesSent?: number;
|
|
1519
|
+
deltaFramesEncoded?: number;
|
|
1520
|
+
deltaKeyFramesEncoded?: number;
|
|
1521
|
+
deltaFirCount?: number;
|
|
1522
|
+
deltaEncodedTime?: number;
|
|
1523
|
+
deltaPliCount?: number;
|
|
1524
|
+
deltaRetransmittedBytesSent?: number;
|
|
1525
|
+
deltaRetransmittedPacketsSent?: number;
|
|
1526
|
+
deltaPacketsSent?: number;
|
|
1527
|
+
deltaPacketsLost?: number;
|
|
1528
|
+
deltaPacketsSentForLost?: number;
|
|
1529
|
+
deltaTimestampForLost?: number;
|
|
1530
|
+
deltaTimestampForSent?: number;
|
|
1531
|
+
}
|
|
1532
|
+
interface VideoSendInfo {
|
|
1533
|
+
codec?: string;
|
|
1534
|
+
timestamp?: number;
|
|
1535
|
+
roundTripTime?: number;
|
|
1536
|
+
captureFrameWidth?: number;
|
|
1537
|
+
targetBitrate?: number;
|
|
1538
|
+
captureFrameHeight?: number;
|
|
1539
|
+
availableOutgoingBitrate?: number;
|
|
1540
|
+
captureFramesPerSecond?: number;
|
|
1541
|
+
sendFramesPerSecond?: number;
|
|
1542
|
+
encodeFramesPerSecond?: number;
|
|
1543
|
+
totalFramesSent?: number;
|
|
1544
|
+
totalFramesEncoded?: number;
|
|
1545
|
+
totalQpSum?: number;
|
|
1546
|
+
totalBytesSent?: number;
|
|
1547
|
+
totalPacketsSent?: number;
|
|
1548
|
+
maxSendFrameWidth?: number;
|
|
1549
|
+
maxSendFrameHeight?: number;
|
|
1550
|
+
totalEncodedTime?: number;
|
|
1551
|
+
totalPacketsLost?: number;
|
|
1552
|
+
source?: VideoSourceInfo;
|
|
1553
|
+
encodeLayers?: number;
|
|
1554
|
+
sendLayers?: number;
|
|
1555
|
+
trackStats?: Map<string, VideoTrackStatsInfo>;
|
|
1556
|
+
}
|
|
1557
|
+
interface AudioSendInfo {
|
|
1558
|
+
timestamp?: number;
|
|
1559
|
+
audioLevel?: number;
|
|
1560
|
+
bytesSent?: number;
|
|
1561
|
+
packetsSent?: number;
|
|
1562
|
+
packetsSentForLost?: number;
|
|
1563
|
+
channels?: number;
|
|
1564
|
+
codec?: string;
|
|
1565
|
+
sampleRate?: number;
|
|
1566
|
+
packetsLost?: number;
|
|
1567
|
+
roundTripTime?: number;
|
|
1568
|
+
}
|
|
1569
|
+
interface VideoReceiveInfo {
|
|
1570
|
+
codec?: string;
|
|
1571
|
+
framesDecoded?: number;
|
|
1572
|
+
framesDropped?: number;
|
|
1573
|
+
framesReceived?: number;
|
|
1574
|
+
packetsLost?: number;
|
|
1575
|
+
packetsReceived?: number;
|
|
1576
|
+
packetsReceivedForLost?: number;
|
|
1577
|
+
frameHeight?: number;
|
|
1578
|
+
frameWidth?: number;
|
|
1579
|
+
timestamp?: number;
|
|
1580
|
+
firCount?: number;
|
|
1581
|
+
pliCount?: number;
|
|
1582
|
+
freezeCount?: number;
|
|
1583
|
+
retransmittedBytesReceived?: number;
|
|
1584
|
+
retransmittedPacketsReceived?: number;
|
|
1585
|
+
framesPerSecond?: number;
|
|
1586
|
+
keyFramesDecoded?: number;
|
|
1587
|
+
bytesReceived?: number;
|
|
1588
|
+
source?: VideoSourceInfo;
|
|
1589
|
+
roundTripTime?: number;
|
|
1590
|
+
sdpFmtpLine?: string;
|
|
1591
|
+
}
|
|
1592
|
+
interface AudioReceiveInfo {
|
|
1593
|
+
packetsLost?: number;
|
|
1594
|
+
codec?: string;
|
|
1595
|
+
packetsReceived?: number;
|
|
1596
|
+
packetsReceivedForLost?: number;
|
|
1597
|
+
timestamp?: number;
|
|
1598
|
+
bytesReceived?: number;
|
|
1599
|
+
audioLevel?: number;
|
|
1600
|
+
decodingNormal?: number;
|
|
1601
|
+
roundTripTime?: number;
|
|
1602
|
+
}
|
|
1603
|
+
interface PublicationMetrics {
|
|
1604
|
+
id?: string;
|
|
1605
|
+
audioMetrics?: AudioSendInfo;
|
|
1606
|
+
videoMetrics?: VideoSendInfo;
|
|
1607
|
+
}
|
|
1608
|
+
interface SubscriptionMetrics {
|
|
1609
|
+
id?: string;
|
|
1610
|
+
audioMetrics?: AudioReceiveInfo;
|
|
1611
|
+
videoMetrics?: VideoReceiveInfo;
|
|
1612
|
+
}
|
|
1613
|
+
interface PeerConnectionMetrics {
|
|
1614
|
+
audioCodec?: string;
|
|
1615
|
+
videoCodec?: string;
|
|
1616
|
+
roundTripTime?: number;
|
|
1617
|
+
sdpFmtpLine?: string;
|
|
1618
|
+
availableOutgoingBitrate?: number;
|
|
1619
|
+
}
|
|
1620
|
+
type Metrics = PublicationMetrics | SubscriptionMetrics | PeerConnectionMetrics;
|
|
1621
|
+
|
|
1622
|
+
interface IMonitorEvent {
|
|
1623
|
+
'video-first-frame': () => void;
|
|
1624
|
+
'audio-first-packet': () => void;
|
|
1625
|
+
'audio-first-frame': () => void;
|
|
1626
|
+
'video-first-packet': () => void;
|
|
1627
|
+
'video-send-stream': (payload: VideoSendReport) => void;
|
|
1628
|
+
'audio-send-stream': (payload: AudioSendReport) => void;
|
|
1629
|
+
'video-recv-stream': (payload: VideoReceiveReport) => void;
|
|
1630
|
+
'audio-recv-stream': (payload: AudioReceiveReport) => void;
|
|
1631
|
+
'audio-net-eq': (payload: AudioNetEQReport) => void;
|
|
1632
|
+
metrics: (payload: Metrics) => void;
|
|
1633
|
+
bwe: (payload: BweReport) => void;
|
|
1634
|
+
'audio-device-buffer': (payload: AudioDeviceBufferReport) => void;
|
|
1635
|
+
}
|
|
1636
|
+
declare abstract class Monitor extends EventEmitter<IMonitorEvent> {
|
|
1637
|
+
private interval;
|
|
1638
|
+
private timer;
|
|
1639
|
+
constructor();
|
|
1640
|
+
abstract makeReport(): void;
|
|
1641
|
+
start(): void;
|
|
1642
|
+
stop(): void;
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
declare class PeerConnectionMonitor extends Monitor {
|
|
1646
|
+
private connectionMetrics;
|
|
1647
|
+
private pc;
|
|
1648
|
+
constructor(connection: PeerConnection);
|
|
1649
|
+
extractMetrics(stats: RTCStatsReport): PeerConnectionMetrics;
|
|
1650
|
+
makeReport(): void;
|
|
1651
|
+
getStats(): Promise<PeerConnectionMetrics>;
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
interface IPublishEvents {
|
|
1655
|
+
ended(): void;
|
|
1656
|
+
exception(error: DingRTCError): void;
|
|
1657
|
+
id(id: string): void;
|
|
1658
|
+
}
|
|
1659
|
+
interface PublicationOptions {
|
|
1660
|
+
tracks?: LocalTrack[];
|
|
1661
|
+
connection: PeerConnection;
|
|
1662
|
+
uid?: string;
|
|
1663
|
+
labels?: string[];
|
|
1664
|
+
}
|
|
1665
|
+
/**
|
|
1666
|
+
* @internal
|
|
1667
|
+
*/
|
|
1668
|
+
declare class Publication extends EventEmitter<IPublishEvents> {
|
|
1669
|
+
uid: string;
|
|
1670
|
+
connection: PeerConnection;
|
|
1671
|
+
tracks: LocalTrack[];
|
|
1672
|
+
id: string;
|
|
1673
|
+
signaling: Signaling;
|
|
1674
|
+
transceiver: RTCRtpTransceiver;
|
|
1675
|
+
metricsMap: Map<string, PublicationMetrics>;
|
|
1676
|
+
audioStatsMap: Map<string, LocalAudioStates>;
|
|
1677
|
+
videoStatsMap: Map<string, LocalVideoStates>;
|
|
1678
|
+
state: PubSubStates;
|
|
1679
|
+
reporter: Reporter;
|
|
1680
|
+
mid: string;
|
|
1681
|
+
encodings: SenderEncoding[];
|
|
1682
|
+
private feedbackIndex;
|
|
1683
|
+
private monitor;
|
|
1684
|
+
constructor(options: PublicationOptions);
|
|
1685
|
+
stop(): Promise<unknown>;
|
|
1686
|
+
mute(): Promise<signal_msg.IResponse>;
|
|
1687
|
+
unmute(): Promise<signal_msg.IResponse>;
|
|
1688
|
+
initInner(id: string): void;
|
|
1689
|
+
private handleMirror;
|
|
1690
|
+
private handleTracEvent;
|
|
1691
|
+
clear(): void;
|
|
1692
|
+
applyOptions(mediaMessages: MediaMessage[]): void;
|
|
1693
|
+
updateOptionzationMode(): void;
|
|
1694
|
+
addTransceiver(transceiver: RTCRtpTransceiver): void;
|
|
1695
|
+
replaceTrack(track: MediaStreamTrack): void;
|
|
1696
|
+
private handleMetrics;
|
|
1697
|
+
getMetrics(from: string): Promise<void>;
|
|
1698
|
+
private onMonitor;
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
interface SessionManagerEvent {
|
|
1702
|
+
'network-quality': (uplink: NetworkQualityType, downlink: NetworkQualityType) => void;
|
|
1703
|
+
}
|
|
1704
|
+
declare class SessionManager extends EventEmitter<SessionManagerEvent> {
|
|
1705
|
+
private client;
|
|
1706
|
+
sessions: Map<string, Publication | Subscription>;
|
|
1707
|
+
private networkQualityInterval;
|
|
1708
|
+
private lastChannelNetworkQuality;
|
|
1709
|
+
private uplink;
|
|
1710
|
+
private downlink;
|
|
1711
|
+
private streamIdToSessionId;
|
|
1712
|
+
channel: Channel;
|
|
1713
|
+
reporter: Reporter;
|
|
1714
|
+
constructor(client: DingRTCClient, channel: Channel);
|
|
1715
|
+
private getOrCreatePeerConnection;
|
|
1716
|
+
private handleRepulish;
|
|
1717
|
+
handleStuckResubscribe(sessions: Subscription[]): Promise<void>;
|
|
1718
|
+
private handleResubscribe;
|
|
1719
|
+
getSessionByStreamId(id: string): Subscription;
|
|
1720
|
+
private handleSubscribeReoffer;
|
|
1721
|
+
private handleServerFailover;
|
|
1722
|
+
private addSession;
|
|
1723
|
+
private getNetworkQuality;
|
|
1724
|
+
private checkChannelNetworkQuality;
|
|
1725
|
+
removeSession(sessionId: string, streamId?: string): void;
|
|
1726
|
+
batchPublish(tracks: LocalTrack[], labels?: string[]): Promise<void>;
|
|
1727
|
+
batchUnPublish(sessions: Publication[]): Promise<void>;
|
|
1728
|
+
batchSubscribe(batchSubscribeParams: IBatchSubscribeParam[]): Promise<IBatchSubscribeResult[]>;
|
|
1729
|
+
batchUnscribe(batchUnsubscribeParam: IBatchSubscribeParam[]): Promise<IBatchSubscribeResult[]>;
|
|
1730
|
+
clear(): void;
|
|
1731
|
+
start(): void;
|
|
1732
|
+
private startNetworkQualityTimer;
|
|
1733
|
+
getLocalAudioStats(from?: string): Promise<LocalAudioStates>;
|
|
1734
|
+
getLocalVideoStats(from?: string): Promise<LocalVideoStatesMap>;
|
|
1735
|
+
getRemoteVideoStats(from?: string): Promise<RemoteVideoStatesMap>;
|
|
1736
|
+
getRemoteAudioStats(from?: string): Promise<RemoteAudioStates>;
|
|
1737
|
+
handleMediaMessage(payload: signal_msg.IMediaMessage): Promise<void>;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
interface IPeerConnectionEvents {
|
|
1741
|
+
ended(): void;
|
|
1742
|
+
track(track: MediaStreamTrack, stream?: MediaStream): void;
|
|
1743
|
+
exception(error: DingRTCError): void;
|
|
1744
|
+
reoffer(): void;
|
|
1745
|
+
}
|
|
1746
|
+
interface PeerConnectionProps {
|
|
1747
|
+
direction?: PCDirection;
|
|
1748
|
+
sessionManager?: SessionManager;
|
|
1749
|
+
}
|
|
1750
|
+
/**
|
|
1751
|
+
* @internal
|
|
1752
|
+
*/
|
|
1753
|
+
declare class PeerConnection extends EventEmitter<IPeerConnectionEvents> {
|
|
1754
|
+
pc: RTCPeerConnection;
|
|
1755
|
+
private pendingTask;
|
|
1756
|
+
signaling: Signaling;
|
|
1757
|
+
state: PeerConnectionState;
|
|
1758
|
+
private exchangeSdpTask;
|
|
1759
|
+
monitor: PeerConnectionMonitor;
|
|
1760
|
+
peerConnectionTimer: number;
|
|
1761
|
+
createPeerConnectionPromise: PromiseLikeObject;
|
|
1762
|
+
peerConnectionStats: PeerConnectionMetrics;
|
|
1763
|
+
reporter: Reporter;
|
|
1764
|
+
createPeerConnectionTimer: number;
|
|
1765
|
+
mcuAudioStream: MediaStream;
|
|
1766
|
+
idToTransceiverMap: Map<string, RTCRtpTransceiver>;
|
|
1767
|
+
mcuAudioTranceiver: RTCRtpTransceiver;
|
|
1768
|
+
idToTransceiversMap: Map<string, RTCRtpTransceiver[]>;
|
|
1769
|
+
mcuAudioTranceivers: RTCRtpTransceiver[];
|
|
1770
|
+
localSDP: SessionDescription;
|
|
1771
|
+
remoteSDP: SessionDescription;
|
|
1772
|
+
subSdpFmtpLines: string[];
|
|
1773
|
+
sessionManager: SessionManager;
|
|
1774
|
+
prevId: string;
|
|
1775
|
+
offerSDP: SessionDescription;
|
|
1776
|
+
simulcastEnabled: boolean;
|
|
1777
|
+
clientFailoverTimer: number;
|
|
1778
|
+
audioSfuSsrcs: signal_msg.IAudioSsrcSpec[];
|
|
1779
|
+
id: string;
|
|
1780
|
+
private enquenTask;
|
|
1781
|
+
direction?: PCDirection;
|
|
1782
|
+
constructor(props: PeerConnectionProps);
|
|
1783
|
+
private startSinglePC;
|
|
1784
|
+
private stopSinglePC;
|
|
1785
|
+
reset(): void;
|
|
1786
|
+
closePeerConnection(): void;
|
|
1787
|
+
private onTrack;
|
|
1788
|
+
fireEndedEvent(): void;
|
|
1789
|
+
private onIceConnectionStateChange;
|
|
1790
|
+
handleClientReoffer(): Promise<never>;
|
|
1791
|
+
addTask(task: () => Promise<void>): void;
|
|
1792
|
+
private onConnectionStateChange;
|
|
1793
|
+
private getPeerConnectionConfig;
|
|
1794
|
+
createPeerConnection(): void;
|
|
1795
|
+
private attachEvents;
|
|
1796
|
+
getStats(): Promise<void>;
|
|
1797
|
+
private detachEvents;
|
|
1798
|
+
private onIceGatheringStateChange;
|
|
1799
|
+
startTask(): Promise<unknown>;
|
|
1800
|
+
private exchangeSDP;
|
|
1801
|
+
reoffer(): Promise<void>;
|
|
1802
|
+
handleHighProfileFallback(): void;
|
|
1803
|
+
handleVideoSubStucked(session: Subscription): void;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
interface ISubscribeEvents {
|
|
1807
|
+
ended(): void;
|
|
1808
|
+
exception(error: DingRTCError): void;
|
|
1809
|
+
id(id: string): void;
|
|
1810
|
+
'audio-first-frame'(): void;
|
|
1811
|
+
}
|
|
1812
|
+
interface SubscriptionOptions {
|
|
1813
|
+
stream?: signal_msg.IStream;
|
|
1814
|
+
connection?: PeerConnection;
|
|
1815
|
+
resolutionInfo?: ResolutionInfo$1;
|
|
1816
|
+
uid?: string;
|
|
1817
|
+
}
|
|
1818
|
+
/**
|
|
1819
|
+
* @internal
|
|
1820
|
+
*/
|
|
1821
|
+
declare class Subscription extends EventEmitter<ISubscribeEvents> {
|
|
1822
|
+
stream: signal_msg.IStream;
|
|
1823
|
+
resolutionInfo: ResolutionInfo$1;
|
|
1824
|
+
ssrc: number;
|
|
1825
|
+
private startTime;
|
|
1826
|
+
uid: string;
|
|
1827
|
+
id: string;
|
|
1828
|
+
state: PubSubStates;
|
|
1829
|
+
private monitor;
|
|
1830
|
+
connection: PeerConnection;
|
|
1831
|
+
private signaling;
|
|
1832
|
+
private _stream;
|
|
1833
|
+
stucked: boolean;
|
|
1834
|
+
reporter?: Reporter;
|
|
1835
|
+
metricsMap: Map<string, SubscriptionMetrics>;
|
|
1836
|
+
audioStatsMap: Map<string, RemoteAudioStates>;
|
|
1837
|
+
videoStatsMap: Map<string, RemoteVideoStates>;
|
|
1838
|
+
transceiver: RTCRtpTransceiver;
|
|
1839
|
+
transceivers?: RTCRtpTransceiver[];
|
|
1840
|
+
constructor(options: SubscriptionOptions);
|
|
1841
|
+
private handleStreamAdd;
|
|
1842
|
+
get mediaStream(): MediaStream;
|
|
1843
|
+
stop(): Promise<void | signal_msg.IResponse>;
|
|
1844
|
+
mute(mediaType: TrackMediaType): Promise<signal_msg.IResponse>;
|
|
1845
|
+
unmute(mediaType: TrackMediaType): Promise<signal_msg.IResponse>;
|
|
1846
|
+
applyOptions(resolutionInfo: ResolutionInfo$1): Promise<signal_msg.IResponse>;
|
|
1847
|
+
reset(): void;
|
|
1848
|
+
clear(): void;
|
|
1849
|
+
addTransceiver(transceiver: RTCRtpTransceiver): void;
|
|
1850
|
+
addTransceivers(transceivers: RTCRtpTransceiver[]): void;
|
|
1851
|
+
handleVideoFirstFrame(): void;
|
|
1852
|
+
private handleMetrics;
|
|
1853
|
+
getMetrics(from: string): Promise<void>;
|
|
1854
|
+
private onMonitor;
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
/**
|
|
1858
|
+
* 频道内的远端用户信息,可以通过 DingRTCClient.remoteUsers 或者 DingRTCClient.on("user-joined") 等事件获取。
|
|
1859
|
+
*
|
|
1860
|
+
* 该对象描述了频道内远端用户的当前状态,包括远端用户 uid、远端是否发布了音频或视频等。
|
|
1861
|
+
*
|
|
1862
|
+
* 如果检测到远端用户已经发布,可以将这个对象的uid传入 DingRTCClient.subscribe 中发起订阅,订阅成功后可以通过本对象的 audioTrack、videoTrack或auxiliaryTrack 字段获取远端音视频轨道对象用于播放。
|
|
1863
|
+
*/
|
|
1864
|
+
declare class User extends EventEmitter {
|
|
1865
|
+
private channel;
|
|
1866
|
+
/**
|
|
1867
|
+
* 远端用户的用户 ID。
|
|
1868
|
+
*/
|
|
1869
|
+
readonly userId: string;
|
|
1870
|
+
/**
|
|
1871
|
+
* @internal
|
|
1872
|
+
*/
|
|
1873
|
+
id: string;
|
|
1874
|
+
/**
|
|
1875
|
+
* 远端用户的用户昵称。
|
|
1876
|
+
*/
|
|
1877
|
+
userName: string;
|
|
1878
|
+
/**
|
|
1879
|
+
* @internal
|
|
1880
|
+
*/
|
|
1881
|
+
version: number;
|
|
1882
|
+
/**
|
|
1883
|
+
* @internal
|
|
1884
|
+
*/
|
|
1885
|
+
readonly streamMap: Map<string, signal_msg.IStream>;
|
|
1886
|
+
/**
|
|
1887
|
+
* 如果成功订阅了远端用户的视频,这里会保存远端的视频轨道对象。
|
|
1888
|
+
*/
|
|
1889
|
+
videoTrack: RemoteVideoTrack;
|
|
1890
|
+
/**
|
|
1891
|
+
* 如果成功订阅了远端用户的桌面共享,这里会保存远端的桌面共享视频轨道对象。
|
|
1892
|
+
*/
|
|
1893
|
+
auxiliaryTrack: RemoteVideoTrack;
|
|
1894
|
+
/**
|
|
1895
|
+
* 如果成功订阅了远端用户的音频,这里会保存远端的音频轨道对象。
|
|
1896
|
+
*/
|
|
1897
|
+
audioTrack: RemoteAudioTrack;
|
|
1898
|
+
/**
|
|
1899
|
+
* @internal
|
|
1900
|
+
*/
|
|
1901
|
+
joinedTime: number;
|
|
1902
|
+
/**
|
|
1903
|
+
* @internal
|
|
1904
|
+
*/
|
|
1905
|
+
properties: any;
|
|
1906
|
+
/**
|
|
1907
|
+
* @internal
|
|
1908
|
+
*/
|
|
1909
|
+
constructor(participant: ISignal_msg.IParticipantInfo, channel: Channel);
|
|
1910
|
+
get relatedStreams(): signal_msg.IStream[];
|
|
1911
|
+
/**
|
|
1912
|
+
* 远端当前是否在发送桌面共享。
|
|
1913
|
+
*/
|
|
1914
|
+
get hasAuxiliary(): boolean;
|
|
1915
|
+
/**
|
|
1916
|
+
* 远端当前是否在发送视频。
|
|
1917
|
+
*/
|
|
1918
|
+
get hasVideo(): boolean;
|
|
1919
|
+
/**
|
|
1920
|
+
* 远端当前是否在发送音频。
|
|
1921
|
+
*/
|
|
1922
|
+
get hasAudio(): boolean;
|
|
1923
|
+
/**
|
|
1924
|
+
* 远端当前是否静音。
|
|
1925
|
+
*/
|
|
1926
|
+
get audioMuted(): boolean;
|
|
1927
|
+
/**
|
|
1928
|
+
* 远端当前是否关闭屏幕共享。
|
|
1929
|
+
*/
|
|
1930
|
+
get auxiliaryMuted(): boolean;
|
|
1931
|
+
/**
|
|
1932
|
+
* 远端当前是否关闭摄像头。
|
|
1933
|
+
*/
|
|
1934
|
+
get videoMuted(): boolean;
|
|
1935
|
+
/**
|
|
1936
|
+
* @internal
|
|
1937
|
+
*/
|
|
1938
|
+
updateNetworkOfUser(newState: string): void;
|
|
1939
|
+
/**
|
|
1940
|
+
* @internal
|
|
1941
|
+
*/
|
|
1942
|
+
update(participant: ISignal_msg.IParticipantInfo): void;
|
|
1943
|
+
/**
|
|
1944
|
+
* @internal
|
|
1945
|
+
*/
|
|
1946
|
+
getRemoteVideoTrack(session: Subscription, auxiliary?: boolean): RemoteVideoTrack;
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
/**
|
|
1950
|
+
* DingRTCClient 事件
|
|
1951
|
+
*/
|
|
1952
|
+
interface IClientEvents {
|
|
1953
|
+
/**
|
|
1954
|
+
* 该回调通知远端用户发布了新的音频轨道或者视频轨道。
|
|
1955
|
+
*
|
|
1956
|
+
* 你可以在该回调中订阅并播放远端用户的音视频轨道。
|
|
1957
|
+
* @param user 用户信息
|
|
1958
|
+
* @param mediaType 媒体类型
|
|
1959
|
+
* @param auxiliary 屏幕共享轨道时为true
|
|
1960
|
+
*/
|
|
1961
|
+
'user-published': (user: User, mediaType: TrackMediaType, auxiliary?: boolean) => void;
|
|
1962
|
+
/**
|
|
1963
|
+
* 该回调通知远端用户取消发布音频轨道或者视频轨道。
|
|
1964
|
+
*
|
|
1965
|
+
* @param user 用户信息
|
|
1966
|
+
* @param mediaType 媒体类型
|
|
1967
|
+
* @param auxiliary 屏幕共享轨道时为true
|
|
1968
|
+
*/
|
|
1969
|
+
'user-unpublished': (user: User, mediaType: TrackMediaType, auxiliary?: boolean) => void;
|
|
1970
|
+
/**
|
|
1971
|
+
* 该回调用于提示用户状态变化。
|
|
1972
|
+
*
|
|
1973
|
+
* 在大部分情况下,你只需要监听 user-published 和 user-unpublished 就可以完成订阅、取消订阅、展示远端用户是否打开了摄像头和麦克风等工作,无需特别关注实际用户状态的变化,SDK 会自动处理用户状态变化。
|
|
1974
|
+
*/
|
|
1975
|
+
'user-info-updated': (uid: string, msg: 'mute-audio' | 'mute-video' | 'unmute-audio' | 'unmute-video') => void;
|
|
1976
|
+
/**
|
|
1977
|
+
* 提示频道内正在说话的远端用户列表,三人及以上时自动开启。
|
|
1978
|
+
* @param uids 正在说话人的uid,第一个为音量最高的人,列表为空时代表无人在说话。
|
|
1979
|
+
*/
|
|
1980
|
+
'volume-indicator': (uids: string[]) => void;
|
|
1981
|
+
/**
|
|
1982
|
+
* 远端用户加入频道回调。
|
|
1983
|
+
* @param user
|
|
1984
|
+
*/
|
|
1985
|
+
'user-joined': (user: User) => void;
|
|
1986
|
+
/**
|
|
1987
|
+
* 远端用户离开频道回调。
|
|
1988
|
+
* @param user
|
|
1989
|
+
*/
|
|
1990
|
+
'user-left': (user: User) => void;
|
|
1991
|
+
/**
|
|
1992
|
+
* SDK 与服务器的连接状态发生改变回调。
|
|
1993
|
+
* @param curState
|
|
1994
|
+
* @param prevState
|
|
1995
|
+
* @param reason
|
|
1996
|
+
*/
|
|
1997
|
+
'connection-state-change': (curState: ConnectionState, prevState: ConnectionState, reason?: DisconnectedReason) => void;
|
|
1998
|
+
/**
|
|
1999
|
+
* SDK 开始尝试重新建立媒体连接(用于发布和订阅)的回调。
|
|
2000
|
+
* @param uid 重新建立的媒体连接所对应的用户 ID。如果是本地 uid 说明是重新发布,如果是远端 uid 说明是重新订阅。
|
|
2001
|
+
*/
|
|
2002
|
+
'media-reconnect-start': (uid: string) => void;
|
|
2003
|
+
/**
|
|
2004
|
+
* SDK 重新建立媒体连接(用于发布和订阅)结束的回调。
|
|
2005
|
+
* @param uid 重新建立的媒体连接所对应的用户 ID。如果是本地 uid 说明是重新发布,如果是远端 uid 说明是重新订阅。
|
|
2006
|
+
*/
|
|
2007
|
+
'media-reconnect-end': (uid: string) => void;
|
|
2008
|
+
/**
|
|
2009
|
+
* 订阅的视频流类型发生改变回调。
|
|
2010
|
+
* 视频流类型改变指视频大流(高码率、高分辨率)变为视频小流(低码率、低分辨率),或视频小流变为视频大流。
|
|
2011
|
+
* @param uid 远端流对应的用户 ID。
|
|
2012
|
+
* @param streamType 改变后的视频流类型: high: 视频大流,即高码率、高分辨率的视频流。low: 视频小流,即低码率、低分辨率的视频流。
|
|
2013
|
+
* @param auxiliary 当为true时代表是订阅的共享流发生变化
|
|
2014
|
+
*/
|
|
2015
|
+
'stream-type-changed': (uid: string, streamType: RemoteStreamType, auxiliary?: boolean) => void;
|
|
2016
|
+
/**
|
|
2017
|
+
* 客户端侧网络质量报告回调,加入频道后每2秒触发一次,仅用来当参考值。
|
|
2018
|
+
* @param uplinkNetworkQuality 上行网络质量
|
|
2019
|
+
* @param downlinkNetworkQuality 下行网络质量
|
|
2020
|
+
*/
|
|
2021
|
+
'network-quality': (uplinkNetworkQuality: NetworkQuality, downlinkNetworkQuality: NetworkQuality) => void;
|
|
2022
|
+
/**
|
|
2023
|
+
* 分组添加事件
|
|
2024
|
+
*/
|
|
2025
|
+
'group-add': (group: Group) => void;
|
|
2026
|
+
/**
|
|
2027
|
+
* 分组移除事件
|
|
2028
|
+
*/
|
|
2029
|
+
'group-remove': (group: Group) => void;
|
|
2030
|
+
/**
|
|
2031
|
+
* 分组成员加入事件
|
|
2032
|
+
*/
|
|
2033
|
+
'group-user-join': (groupId: string, groupUser: GroupUser) => void;
|
|
2034
|
+
/**
|
|
2035
|
+
* 分组成员离开事件
|
|
2036
|
+
*/
|
|
2037
|
+
'group-user-leave': (groupId: string, groupUser: GroupUser) => void;
|
|
2038
|
+
/**
|
|
2039
|
+
* 分组属性变更事件
|
|
2040
|
+
*/
|
|
2041
|
+
'group-info-updated': (groupId: string, updateType: GroupPropertyUpdateTypes, value?: string) => void;
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
/**
|
|
2045
|
+
* 提供音视频通话的核心功能,比如加入频道、发布和订阅音视频轨道等。
|
|
2046
|
+
*
|
|
2047
|
+
* 您可以通过 DingRTC.createClient 创建一个 Client 对象。一个 Client 对象代表一个本地客户端。
|
|
2048
|
+
*/
|
|
2049
|
+
declare class DingRTCClient extends EventEmitter<IClientEvents> {
|
|
2050
|
+
/**
|
|
2051
|
+
* 频道名称。
|
|
2052
|
+
*
|
|
2053
|
+
* 如果本地用户没有加入频道,该属性值为 undefined。
|
|
2054
|
+
*/
|
|
2055
|
+
channelName: string;
|
|
2056
|
+
id: string;
|
|
2057
|
+
private reporter;
|
|
2058
|
+
private channel;
|
|
2059
|
+
private monitor;
|
|
2060
|
+
private syncStatTimer;
|
|
2061
|
+
private clientStatSync;
|
|
2062
|
+
private currentClientState;
|
|
2063
|
+
constructor();
|
|
2064
|
+
/**
|
|
2065
|
+
* 远端用户信息列表,包含频道中各个远端用户的用户 ID 和轨道信息。
|
|
2066
|
+
*
|
|
2067
|
+
* 如果本地用户没有加入频道,该列表为空。
|
|
2068
|
+
*/
|
|
2069
|
+
get remoteUsers(): User[];
|
|
2070
|
+
/**
|
|
2071
|
+
* 分组列表,包含各个分组包含的成员简略信息。
|
|
2072
|
+
*/
|
|
2073
|
+
get groups(): Group[];
|
|
2074
|
+
/**
|
|
2075
|
+
* 本地用户的用户 ID。
|
|
2076
|
+
*
|
|
2077
|
+
* 如果本地用户没有加入频道,该属性值为 undefined。
|
|
2078
|
+
*/
|
|
2079
|
+
get userId(): string;
|
|
2080
|
+
/**
|
|
2081
|
+
* 保存当前正在发布的本地轨道对象列表。
|
|
2082
|
+
* 调用 publish 成功后,发布的轨道对象会自动添加到这个列表中。
|
|
2083
|
+
* 调用 unpublish 成功后,取消发布的轨道对象会自动从这个列表中移除。
|
|
2084
|
+
*/
|
|
2085
|
+
get localTracks(): LocalTrack[];
|
|
2086
|
+
/**
|
|
2087
|
+
* sdk 实例与服务器连接状态。
|
|
2088
|
+
*/
|
|
2089
|
+
get connectionState(): _dingrtc_channel.ConnectionState;
|
|
2090
|
+
private init;
|
|
2091
|
+
/**
|
|
2092
|
+
* 加入频道,在同一个频道内的用户可以互相通话。
|
|
2093
|
+
*
|
|
2094
|
+
* 调用该方法加入频道时,本地会触发 "connection-state-change" 回调。
|
|
2095
|
+
*
|
|
2096
|
+
* 本端加入频道成功后,远端会触发 "user-joined" 回调。
|
|
2097
|
+
*
|
|
2098
|
+
* @param joinInfo 加入频道所需信息
|
|
2099
|
+
* @returns 远端用户列表
|
|
2100
|
+
*/
|
|
2101
|
+
join(joinInfo: JoinParam): Promise<{
|
|
2102
|
+
remoteUsers: User[];
|
|
2103
|
+
timeLeft: number;
|
|
2104
|
+
}>;
|
|
2105
|
+
/**
|
|
2106
|
+
* 设置订阅所有远端用户的视频类型。
|
|
2107
|
+
*
|
|
2108
|
+
* 如果远端用户开启了双流模式,本地用户调用 subscribe 后会直接订阅本方法中 streamType 参数所指定的流类型。如不设置,默认订阅大流
|
|
2109
|
+
* @param streamType 订阅的视频流类型,high 代表大流,low 代表小流
|
|
2110
|
+
*/
|
|
2111
|
+
setRemoteDefaultVideoStreamType(streamType: RemoteStreamType): void;
|
|
2112
|
+
/**
|
|
2113
|
+
* 离开频道,即挂断或退出通话。
|
|
2114
|
+
*
|
|
2115
|
+
* 调用该方法离开频道时,本地会触发 "connection-state-change" 回调。
|
|
2116
|
+
*
|
|
2117
|
+
* 远端会触发 "user-left" 回调。
|
|
2118
|
+
*/
|
|
2119
|
+
leave(): void;
|
|
2120
|
+
/**
|
|
2121
|
+
* 发布本地音视频轨道至频道中。
|
|
2122
|
+
*
|
|
2123
|
+
* 发布音视频轨道之后,远端会触发 "user-published" 回调。
|
|
2124
|
+
* @param tracks 通过 DingRTC.createMicrophoneAudioTrack / DingRTC.createCameraTrack 或其他方法创建的本地 Track 对象。
|
|
2125
|
+
*/
|
|
2126
|
+
publish(tracks: LocalTrack | LocalTrack[]): Promise<void>;
|
|
2127
|
+
/**
|
|
2128
|
+
* 取消发布本地音视频轨道。
|
|
2129
|
+
*
|
|
2130
|
+
* 取消发布音视频轨道之后,远端会触发 "user-unpublished" 回调。
|
|
2131
|
+
* @param tracks 要取消发布的轨道。如果留空,会将所有发布过的音视频轨道取消发布。
|
|
2132
|
+
*/
|
|
2133
|
+
unpublish(tracks?: LocalTrack | LocalTrack[]): Promise<void>;
|
|
2134
|
+
/**
|
|
2135
|
+
* 订阅远端用户的音视频轨道。
|
|
2136
|
+
* @param uid 远端用户id
|
|
2137
|
+
* @param mediaType 订阅的轨道媒体类型
|
|
2138
|
+
* @param auxiliary 如果订阅视频轨道,是否是订阅桌面共享视频流
|
|
2139
|
+
*/
|
|
2140
|
+
subscribe(uid: string, mediaType: TrackMediaType, auxiliary?: boolean): Promise<RemoteTrack>;
|
|
2141
|
+
/**
|
|
2142
|
+
* 批量订阅远端用户的音视频轨道
|
|
2143
|
+
* @param {SubscribeParam[]} batchSubscribeParam
|
|
2144
|
+
* @returns void
|
|
2145
|
+
*/
|
|
2146
|
+
batchSubscribe(batchSubscribeParam: SubscribeParam[]): Promise<SubscribeResult[]>;
|
|
2147
|
+
/**
|
|
2148
|
+
* 取消订阅远端用户的音视频轨道。
|
|
2149
|
+
* @param uid 远端用户id。
|
|
2150
|
+
* @param mediaType 取消订阅的轨道媒体类型。
|
|
2151
|
+
* @param auxiliary 如果是订阅视频轨道,是否是订阅桌面共享视频流
|
|
2152
|
+
*/
|
|
2153
|
+
unsubscribe(uid: string, mediaType?: TrackMediaType, auxiliary?: boolean): Promise<void>;
|
|
2154
|
+
/**
|
|
2155
|
+
* 批量取消订阅远端用户的音视频轨道
|
|
2156
|
+
* @param {UnsubscribeParam[]} batchUnsubscribeParam
|
|
2157
|
+
* @returns void
|
|
2158
|
+
*/
|
|
2159
|
+
batchUnsubscribe(batchUnsubscribeParam: UnsubscribeParam[]): Promise<void> | Promise<IBatchSubscribeResult[]>;
|
|
2160
|
+
/**
|
|
2161
|
+
* 获取本地音频相关信息。
|
|
2162
|
+
*/
|
|
2163
|
+
getLocalAudioStats(): Promise<LocalAudioStates>;
|
|
2164
|
+
/**
|
|
2165
|
+
* 获取本地视频相关信息。
|
|
2166
|
+
*/
|
|
2167
|
+
getLocalVideoStats(): Promise<LocalVideoStatesMap>;
|
|
2168
|
+
/**
|
|
2169
|
+
* 设置订阅特定远端用户的视频类型。
|
|
2170
|
+
*
|
|
2171
|
+
* @param uid 远端用户的 ID。
|
|
2172
|
+
* @param streamType 订阅远端视频流模式 high 高分辨率、高码率的视频流; low 低分辨率、低码率的视频流; FHD 超高清流,1080P收费档; HD 高清流,720P收费档; SD 标清,480P收费档; LD 流畅,480P收费档;
|
|
2173
|
+
* @param auxiliary 当为true时代表要调整的是订阅的共享流
|
|
2174
|
+
*/
|
|
2175
|
+
setRemoteVideoStreamType(uid: string, streamType: RemoteStreamType, auxiliary?: boolean): Promise<void>;
|
|
2176
|
+
/**
|
|
2177
|
+
* 获取远端用户的视频统计信息。
|
|
2178
|
+
*/
|
|
2179
|
+
getRemoteVideoStats(): Promise<RemoteVideoStatesMap>;
|
|
2180
|
+
/**
|
|
2181
|
+
* 获取远端用户的音频统计信息。
|
|
2182
|
+
*/
|
|
2183
|
+
getRemoteAudioStats(): Promise<RemoteAudioStates>;
|
|
2184
|
+
/**
|
|
2185
|
+
* 获取远端用户的上下行网络质量
|
|
2186
|
+
*/
|
|
2187
|
+
getRemoteNetworkQuality(): Record<string, {
|
|
2188
|
+
downlinkNetworkQuality: NetworkQualityType;
|
|
2189
|
+
uplinkNetworkQuality: NetworkQualityType;
|
|
2190
|
+
}>;
|
|
2191
|
+
private handleConnectionChangeEvent;
|
|
2192
|
+
private sendClientStatToRemote;
|
|
2193
|
+
private handleVisibilitychange;
|
|
2194
|
+
private handleNetworkQuality;
|
|
2195
|
+
private handlePageUnload;
|
|
2196
|
+
private addEventListeners;
|
|
2197
|
+
private removeEventListeners;
|
|
2198
|
+
/**
|
|
2199
|
+
* 加入指定分组
|
|
2200
|
+
*/
|
|
2201
|
+
joinGroup(config: JoinGroupConfig): Promise<void>;
|
|
2202
|
+
/**
|
|
2203
|
+
* 离开指定分组
|
|
2204
|
+
*/
|
|
2205
|
+
leaveGroup(groupId: string): Promise<void>;
|
|
2206
|
+
setGroupName(groupId: string, name: string): Promise<signal_msg.ISetGroupPropertiesResponse>;
|
|
2207
|
+
/**
|
|
2208
|
+
* 订阅指定分组音频
|
|
2209
|
+
*/
|
|
2210
|
+
subscribeGroup(groupId: string): Promise<RemoteAudioTrack>;
|
|
2211
|
+
/**
|
|
2212
|
+
* 取消订阅指定分组音频
|
|
2213
|
+
*/
|
|
2214
|
+
unsubscribeGroup(groupId: string): Promise<void>;
|
|
2215
|
+
/**
|
|
2216
|
+
* 混音音频轨道到指定分组
|
|
2217
|
+
*/
|
|
2218
|
+
mixAudioToGroup(track: LocalAudioTrack, mixed: boolean, groupId?: string): Promise<void>;
|
|
2219
|
+
/**
|
|
2220
|
+
* 解散指定分组
|
|
2221
|
+
*/
|
|
2222
|
+
dismissGroup(groupId: string): Promise<void>;
|
|
2223
|
+
register(plugin: ISharedChannelInstance): void;
|
|
2224
|
+
ungister(plugin: ISharedChannelInstance): void;
|
|
2225
|
+
}
|
|
2226
|
+
|
|
2227
|
+
type GroupEventAction = 'add' | 'remove' | 'user-join' | 'user-leave' | 'info-updated';
|
|
2228
|
+
interface GroupManagerEvent {
|
|
2229
|
+
group: (action: GroupEventAction, group: Group | string, payload?: GroupUser | signal_msg.IGroupProperty | string) => void;
|
|
2230
|
+
}
|
|
2231
|
+
declare class GroupManager extends EventEmitter<GroupManagerEvent> {
|
|
2232
|
+
private channel;
|
|
2233
|
+
groupIds: Set<string>;
|
|
2234
|
+
groups: Map<string, signal_msg.IGroupInfo>;
|
|
2235
|
+
default: signal_msg.IGroupInfo;
|
|
2236
|
+
listVer: number;
|
|
2237
|
+
client: DingRTCClient;
|
|
2238
|
+
constructor(channel: Channel);
|
|
2239
|
+
get joinedIds(): Set<unknown>;
|
|
2240
|
+
private parseGroup;
|
|
2241
|
+
get groupList(): Group[];
|
|
2242
|
+
init(groupIds: string[], listVer: number): void;
|
|
2243
|
+
clear(): void;
|
|
2244
|
+
join(config: JoinGroupConfig): Promise<signal_msg.IJoinGroupResponse>;
|
|
2245
|
+
leave(config: LeaveGroupConfig): Promise<signal_msg.ILeaveGroupResponse>;
|
|
2246
|
+
dismiss(groupId: string): Promise<signal_msg.IDismissGroupResponse>;
|
|
2247
|
+
addUser(user: signal_msg.IGroupParticipant, groupId: string): void;
|
|
2248
|
+
removeUser(user: signal_msg.IGroupParticipant, groupId: string): void;
|
|
2249
|
+
observerAllGroup(): Promise<signal_msg.IObserveAllGroupsResponse>;
|
|
2250
|
+
unobserverAllGroup(): Promise<signal_msg.IUnobserveAllGroupsResponse>;
|
|
2251
|
+
setProperties(groupId: string, properties: signal_msg.IGroupProperty): Promise<signal_msg.ISetGroupPropertiesResponse>;
|
|
2252
|
+
handleGroupListEvents(payload: signal_msg.IGroupListChangeLog, fromSync?: boolean): void;
|
|
2253
|
+
handleGroupEvents(payload: signal_msg.IGroupChangeLog, fromSync?: boolean): void;
|
|
2254
|
+
syncGroup(groupId: string): Promise<void>;
|
|
2255
|
+
batchSyncGroup(groupIds: string[]): Promise<void>;
|
|
2256
|
+
syncGroupList(): void;
|
|
2257
|
+
handleSyncEvent(payload: ISignal_msg.ISyncNotification): void;
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
type UserEventAction = 'join' | 'leave';
|
|
2261
|
+
interface UserManagerEvent {
|
|
2262
|
+
user: (action: UserEventAction, user: User) => void;
|
|
2263
|
+
}
|
|
2264
|
+
declare class UserManager extends EventEmitter<UserManagerEvent> {
|
|
2265
|
+
private channel;
|
|
2266
|
+
users: Map<string, User>;
|
|
2267
|
+
currentUid: string;
|
|
2268
|
+
currentPid: string;
|
|
2269
|
+
reporter: Reporter;
|
|
2270
|
+
constructor(channel: Channel);
|
|
2271
|
+
get remoteUsers(): User[];
|
|
2272
|
+
init(participants: ISignal_msg.IParticipantInfo[], currentPid: string): void;
|
|
2273
|
+
clear(): void;
|
|
2274
|
+
private handleEvent;
|
|
2275
|
+
setParticipantProperties(stats: string): Promise<signal_msg.IResponse>;
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
type StreamEventAction = 'add' | 'remove' | 'update' | 'volumeActive';
|
|
2279
|
+
type DeviceAction = 'mute-video' | 'unmute-video' | 'mute-audio' | 'unmute-audio';
|
|
2280
|
+
interface StreamEventPlayload {
|
|
2281
|
+
id?: string;
|
|
2282
|
+
owners?: string[];
|
|
2283
|
+
owner?: string;
|
|
2284
|
+
auxiliary?: boolean;
|
|
2285
|
+
updateStatus?: DeviceAction;
|
|
2286
|
+
mediaType?: TrackMediaType$1;
|
|
2287
|
+
properties?: any;
|
|
2288
|
+
}
|
|
2289
|
+
interface StreamManagerEvent {
|
|
2290
|
+
stream: (action: StreamEventAction, payload: StreamEventPlayload) => void;
|
|
2291
|
+
}
|
|
2292
|
+
declare class StreamManager extends EventEmitter<StreamManagerEvent> {
|
|
2293
|
+
streams: Map<string, signal_msg.IStream>;
|
|
2294
|
+
totalVer: number;
|
|
2295
|
+
reporter: Reporter;
|
|
2296
|
+
signaling: Signaling;
|
|
2297
|
+
constructor(channel: Channel);
|
|
2298
|
+
clear(): void;
|
|
2299
|
+
init(streams: signal_msg.IStream[], version: number): void;
|
|
2300
|
+
private add;
|
|
2301
|
+
private remove;
|
|
2302
|
+
getStreamByTrackId(trackId: string): signal_msg.IStream;
|
|
2303
|
+
handleEvent(payload: signal_msg.IStreamNotification, fromSync?: boolean): void;
|
|
2304
|
+
sync(): Promise<void>;
|
|
2305
|
+
handleSyncEvent(payload: ISignal_msg.ISyncNotification): void;
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
/**
|
|
2309
|
+
* @internal
|
|
2310
|
+
*/
|
|
2311
|
+
declare class Channel extends EventEmitter<ChannelEvens> {
|
|
2312
|
+
signaling: Signaling;
|
|
2313
|
+
sessionManager: SessionManager;
|
|
2314
|
+
groupManager: GroupManager;
|
|
2315
|
+
userManager: UserManager;
|
|
2316
|
+
streamManager: StreamManager;
|
|
2317
|
+
remoteAudioTrack: RemoteAudioTrack;
|
|
2318
|
+
internalChannel: DingRTCChannel;
|
|
2319
|
+
reporter: Reporter;
|
|
2320
|
+
roomId: string;
|
|
2321
|
+
defaultVideoStreamType: RemoteStreamType;
|
|
2322
|
+
client: DingRTCClient;
|
|
2323
|
+
subscribedAudioStream: string;
|
|
2324
|
+
micMixedGroups: Set<string>;
|
|
2325
|
+
iceConfig: ICEConfig;
|
|
2326
|
+
constructor(client: DingRTCClient, reporter: Reporter);
|
|
2327
|
+
get localTracks(): LocalTrack[];
|
|
2328
|
+
get groups(): Group[];
|
|
2329
|
+
handleStreamEvent(action: StreamEventAction, payload: StreamEventPlayload): void;
|
|
2330
|
+
handleGroupEvent(action: GroupEventAction, group: Group | string, extraPayload?: GroupUser | signal_msg.IGroupProperty | string): void;
|
|
2331
|
+
handleUserEvent(action: UserEventAction, payload: User): void;
|
|
2332
|
+
getStream(param: SubscribeActionParam): signal_msg.IStream;
|
|
2333
|
+
private handleSubscribeParam;
|
|
2334
|
+
join(joinInfo: JoinParam): Promise<ISignal_msg.IJoinResponse>;
|
|
2335
|
+
private handleJoinResponse;
|
|
2336
|
+
private setIceConfig;
|
|
2337
|
+
clear(): void;
|
|
2338
|
+
leave(): void;
|
|
2339
|
+
publish(tracks: LocalTrack[]): Promise<void>;
|
|
2340
|
+
unpublish(tracks: LocalTrack[]): Promise<void>;
|
|
2341
|
+
private getRemoteTrack;
|
|
2342
|
+
batchSubscribe(batchSubscribeParams: SubscribeActionParam[]): Promise<SubscribeResult[]>;
|
|
2343
|
+
batchUnsubscribe(batchUnsubscribeParam: SubscribeActionParam[]): Promise<void> | Promise<IBatchSubscribeResult[]>;
|
|
2344
|
+
private updateSubscribedAudioStream;
|
|
2345
|
+
subscribeGroup(groupId: string): Promise<RemoteAudioTrack>;
|
|
2346
|
+
unsubscribeGroup(groupId: string): Promise<void>;
|
|
2347
|
+
setRemoteStreamType(uid: string, profile: RemoteStreamType, auxiliary?: boolean): Promise<signal_msg.IResponse>;
|
|
2348
|
+
joinGroup(config: JoinGroupConfig): Promise<void>;
|
|
2349
|
+
leaveGroup(config: LeaveGroupConfig): Promise<void>;
|
|
2350
|
+
dismissGroup(groupId: string): Promise<void>;
|
|
2351
|
+
mixGroupAudio(streamId: string, label: string, operation: 'mix' | 'unmix'): Promise<signal_msg.IResponse>;
|
|
2352
|
+
setGroupProperties(groupId: string, properties: signal_msg.IGroupProperty): Promise<signal_msg.ISetGroupPropertiesResponse>;
|
|
2353
|
+
publishToGroup(track: LocalAudioTrack, groupId?: string, autoUnpublishFromChannel?: boolean): Promise<void>;
|
|
2354
|
+
unpublishFromGroup(track: LocalAudioTrack, groupId: string, autoPublishToChannel?: boolean): Promise<void>;
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
/**
|
|
2358
|
+
* @internal
|
|
2359
|
+
*/
|
|
2360
|
+
declare enum AudioSourceState {
|
|
2361
|
+
Playing = "playing",// 播放中
|
|
2362
|
+
Paused = "paused",// 暂停
|
|
2363
|
+
Stopped = "stopped"
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
declare const TRACK_EVENT_NAME = "onertc_internal_track_event";
|
|
2367
|
+
|
|
2368
|
+
/**
|
|
2369
|
+
* NOTE 不能直接使用自定的分辨率组合,而是需要使用owt自带的capability resolution
|
|
2370
|
+
* @internal
|
|
2371
|
+
*/
|
|
2372
|
+
declare const FALLBACK_SUB_VIDEO_PROFILE: {
|
|
2373
|
+
height: number;
|
|
2374
|
+
width: number;
|
|
2375
|
+
};
|
|
2376
|
+
/**
|
|
2377
|
+
* 视频采集规格
|
|
2378
|
+
*/
|
|
2379
|
+
type VideoDimension = 'VD_120x120' | 'VD_160x120' | 'VD_180x180' | 'VD_240x180' | 'VD_320x180' | 'VD_240x240' | 'VD_320x240' | 'VD_424x240' | 'VD_360x360' | 'VD_480x360' | 'VD_640x360' | 'VD_480x480' | 'VD_640x480' | 'VD_840x480' | 'VD_960x540' | 'VD_960x720' | 'VD_1280x720' | 'VD_1920x1080' | 'VD_2560x1440';
|
|
2380
|
+
/**
|
|
2381
|
+
* 订阅远端视频流模式
|
|
2382
|
+
* high 高分辨率、高码率的视频流;
|
|
2383
|
+
* low 低分辨率、低码率的视频流;
|
|
2384
|
+
* FHD 超高清流,1080P收费档;
|
|
2385
|
+
* HD 高清流,720P收费档;
|
|
2386
|
+
* SD 标清,480P收费档;
|
|
2387
|
+
* LD 流畅,480P收费档;
|
|
2388
|
+
*/
|
|
2389
|
+
type RemoteStreamType = 'high' | 'low' | 'FHD' | 'HD' | 'SD' | 'LD';
|
|
2390
|
+
type TrackMediaType = 'audio' | 'video';
|
|
2391
|
+
/**
|
|
2392
|
+
* 创建麦克风音频流时的配置对象
|
|
2393
|
+
*/
|
|
2394
|
+
interface MicrophoneAudioTrackConfig {
|
|
2395
|
+
/**
|
|
2396
|
+
* 是否开启回声消除
|
|
2397
|
+
*/
|
|
2398
|
+
AEC?: boolean;
|
|
2399
|
+
/**
|
|
2400
|
+
* 是否开启自动增益
|
|
2401
|
+
*/
|
|
2402
|
+
AGC?: boolean;
|
|
2403
|
+
/**
|
|
2404
|
+
* 是否开启噪声抑制
|
|
2405
|
+
*/
|
|
2406
|
+
ANS?: boolean;
|
|
2407
|
+
/**
|
|
2408
|
+
* 设备 id
|
|
2409
|
+
*/
|
|
2410
|
+
deviceId?: string;
|
|
2411
|
+
}
|
|
2412
|
+
/**
|
|
2413
|
+
* 创建摄像头视频流时的配置对象
|
|
2414
|
+
*/
|
|
2415
|
+
interface CameraVideoTrackConfig extends VideoEncoderConfiguration {
|
|
2416
|
+
/**
|
|
2417
|
+
* 指定摄像头的设备ID。
|
|
2418
|
+
*
|
|
2419
|
+
* 你可以通过 getCameras 来获取当前的摄像头设备列表。
|
|
2420
|
+
*/
|
|
2421
|
+
deviceId?: string;
|
|
2422
|
+
/**
|
|
2423
|
+
* 移动端指定使用前置/后置摄像头来采集视频。
|
|
2424
|
+
* user: 前置摄像头
|
|
2425
|
+
* environment: 后置摄像头
|
|
2426
|
+
*/
|
|
2427
|
+
facingMode?: 'user' | 'environment';
|
|
2428
|
+
}
|
|
2429
|
+
type OptimizationMode = 'detail' | 'motion' | 'balanced';
|
|
2430
|
+
/**
|
|
2431
|
+
* 调整视频编码的配置对象
|
|
2432
|
+
*/
|
|
2433
|
+
interface VideoEncoderConfiguration {
|
|
2434
|
+
/**
|
|
2435
|
+
* 帧率,最大值30
|
|
2436
|
+
*/
|
|
2437
|
+
frameRate?: number;
|
|
2438
|
+
/**
|
|
2439
|
+
* 最大码率,单位Kbps
|
|
2440
|
+
*/
|
|
2441
|
+
maxBitrate?: number;
|
|
2442
|
+
/**
|
|
2443
|
+
* 视频采集规格
|
|
2444
|
+
*/
|
|
2445
|
+
dimension?: VideoDimension;
|
|
2446
|
+
/**
|
|
2447
|
+
* 视频传输优化模式:
|
|
2448
|
+
* balanced: 默认传输优化模式,对于共享流会是清晰优先,对于其他类型视频流,会兼顾清晰和流畅,弱网下会调整帧率和分辨率;
|
|
2449
|
+
* detail: 清晰优先,大部分情况下不会降低分辨率,可能会降低帧率;
|
|
2450
|
+
* motion: 流畅优先,大部分情况下不会降低帧率,可能会降低发送的分辨率;
|
|
2451
|
+
*/
|
|
2452
|
+
optimizationMode?: OptimizationMode;
|
|
2453
|
+
/**
|
|
2454
|
+
* 视频推流镜像仅影响远端播放,若有CVO将会在角度旋转后进行播放;
|
|
2455
|
+
*/
|
|
2456
|
+
mirror?: boolean;
|
|
2457
|
+
}
|
|
2458
|
+
/**
|
|
2459
|
+
* 调整音频编码的配置对象
|
|
2460
|
+
*/
|
|
2461
|
+
/**
|
|
2462
|
+
* 创建屏幕共享流时的配置对象
|
|
2463
|
+
*/
|
|
2464
|
+
interface ScreenVideoTrackConfig extends VideoEncoderConfiguration {
|
|
2465
|
+
/**
|
|
2466
|
+
* 默认选中的共享内容类型,支持设为标签页、应用窗口、或屏幕。
|
|
2467
|
+
*/
|
|
2468
|
+
displaySurface?: 'browser' | 'window' | 'monitor';
|
|
2469
|
+
/**
|
|
2470
|
+
* 是否允许采集系统音频:'include' 允许,'exclude' 不允许
|
|
2471
|
+
*/
|
|
2472
|
+
systemAudio?: 'include' | 'exclude';
|
|
2473
|
+
}
|
|
2474
|
+
interface BufferSourceAudioTrackConfig {
|
|
2475
|
+
/**
|
|
2476
|
+
* 自定义轨道源
|
|
2477
|
+
*/
|
|
2478
|
+
source: string | AudioBuffer;
|
|
2479
|
+
/**
|
|
2480
|
+
* 是否缓存线上文件
|
|
2481
|
+
*/
|
|
2482
|
+
cache?: boolean;
|
|
2483
|
+
}
|
|
2484
|
+
/**
|
|
2485
|
+
* 播放视频配置参数
|
|
2486
|
+
*/
|
|
2487
|
+
interface VideoPlayerConfig {
|
|
2488
|
+
/**
|
|
2489
|
+
* 视频填充类型
|
|
2490
|
+
*/
|
|
2491
|
+
fit?: 'contain' | 'cover' | 'fill';
|
|
2492
|
+
/**
|
|
2493
|
+
* 是否镜像播放
|
|
2494
|
+
*/
|
|
2495
|
+
mirror?: boolean;
|
|
2496
|
+
}
|
|
2497
|
+
/**
|
|
2498
|
+
* 创建自定义视频轨道时的配置参数
|
|
2499
|
+
*/
|
|
2500
|
+
interface CustomVideoTrackConfig extends VideoEncoderConfiguration {
|
|
2501
|
+
/**
|
|
2502
|
+
* 您维护的 MediaStreamTrack 对象。
|
|
2503
|
+
*/
|
|
2504
|
+
mediaStreamTrack: MediaStreamTrack;
|
|
2505
|
+
}
|
|
2506
|
+
/**
|
|
2507
|
+
* 创建自定义音频轨道时的配置参数
|
|
2508
|
+
*/
|
|
2509
|
+
interface CustomAudioTrackConfig {
|
|
2510
|
+
/**
|
|
2511
|
+
* 您维护的 MediaStreamTrack 对象。
|
|
2512
|
+
*/
|
|
2513
|
+
mediaStreamTrack: MediaStreamTrack;
|
|
2514
|
+
}
|
|
2515
|
+
/**
|
|
2516
|
+
* 本地客户端全局配置信息
|
|
2517
|
+
*/
|
|
2518
|
+
interface GlobalClientConfigInfo {
|
|
2519
|
+
/**
|
|
2520
|
+
* @param gslb gslb(Global Server Load Balancing)服务地址。
|
|
2521
|
+
*/
|
|
2522
|
+
gslb?: string | string[];
|
|
2523
|
+
simulcast?: boolean;
|
|
2524
|
+
audioSFU?: boolean;
|
|
2525
|
+
}
|
|
2526
|
+
/**
|
|
2527
|
+
* 加入频道所需信息
|
|
2528
|
+
*/
|
|
2529
|
+
interface JoinParam {
|
|
2530
|
+
/**
|
|
2531
|
+
* @param userName 用户名称,长度不超过64个字节。
|
|
2532
|
+
*/
|
|
2533
|
+
userName: string;
|
|
2534
|
+
/**
|
|
2535
|
+
* @param uid 标识用户的 ID,字符内容只允许[A-Za-z0-9_-],长度不超过64个字符。
|
|
2536
|
+
*/
|
|
2537
|
+
uid: string;
|
|
2538
|
+
/**
|
|
2539
|
+
* @param appId 您在 DingRTC 项目的 AppId。
|
|
2540
|
+
*/
|
|
2541
|
+
appId: string;
|
|
2542
|
+
/**
|
|
2543
|
+
* @param channel 频道 id,字符内容只允许[A-Za-z0-9_-],长度不超过64个字符。
|
|
2544
|
+
*/
|
|
2545
|
+
channel: string;
|
|
2546
|
+
/**
|
|
2547
|
+
* @param token 用于鉴权的 token
|
|
2548
|
+
*/
|
|
2549
|
+
token: string;
|
|
2550
|
+
}
|
|
2551
|
+
/**
|
|
2552
|
+
* sdk 连接状态
|
|
2553
|
+
*/
|
|
2554
|
+
type ConnectionState = 'disconnected' | 'connecting' | 'reconnecting' | 'connected' | 'disconnecting';
|
|
2555
|
+
/**
|
|
2556
|
+
* 设备信息
|
|
2557
|
+
*/
|
|
2558
|
+
interface DeviceInfo {
|
|
2559
|
+
/**
|
|
2560
|
+
* 采集设备的设备信息。
|
|
2561
|
+
* @param device
|
|
2562
|
+
*/
|
|
2563
|
+
device: MediaDeviceInfo;
|
|
2564
|
+
/**
|
|
2565
|
+
* 采集设备当前的插拔状态。
|
|
2566
|
+
* "active": 该设备已经插入。
|
|
2567
|
+
* "inactive": 该设备已经被拔出。
|
|
2568
|
+
* @param state
|
|
2569
|
+
*/
|
|
2570
|
+
state: 'active' | 'inactive';
|
|
2571
|
+
}
|
|
2572
|
+
/**
|
|
2573
|
+
* 本地音频轨道的统计信息
|
|
2574
|
+
*/
|
|
2575
|
+
interface LocalAudioStates {
|
|
2576
|
+
/**
|
|
2577
|
+
* 音频的编码格式。
|
|
2578
|
+
*/
|
|
2579
|
+
codec?: string;
|
|
2580
|
+
/**
|
|
2581
|
+
* 发送的音频总字节数 (bytes)。
|
|
2582
|
+
*/
|
|
2583
|
+
sendBytes?: number;
|
|
2584
|
+
/**
|
|
2585
|
+
* 发送的音频总包数。
|
|
2586
|
+
*/
|
|
2587
|
+
sendPackets?: number;
|
|
2588
|
+
/**
|
|
2589
|
+
* 采集的声道数
|
|
2590
|
+
*/
|
|
2591
|
+
channelCount?: number;
|
|
2592
|
+
/**
|
|
2593
|
+
* 音频采样率
|
|
2594
|
+
*/
|
|
2595
|
+
sampleRate?: number;
|
|
2596
|
+
/**
|
|
2597
|
+
* 发送的音频总丢包数。
|
|
2598
|
+
*/
|
|
2599
|
+
sendPacketsLost?: number;
|
|
2600
|
+
/**
|
|
2601
|
+
* 调用时的时间戳
|
|
2602
|
+
*/
|
|
2603
|
+
timestamp?: number;
|
|
2604
|
+
/**
|
|
2605
|
+
* 往返时延
|
|
2606
|
+
*/
|
|
2607
|
+
rtt?: number;
|
|
2608
|
+
/**
|
|
2609
|
+
* @internal 音频能量
|
|
2610
|
+
*/
|
|
2611
|
+
audioLevel?: number;
|
|
2612
|
+
/**
|
|
2613
|
+
* 发送码率
|
|
2614
|
+
*/
|
|
2615
|
+
sendBitrate?: number;
|
|
2616
|
+
}
|
|
2617
|
+
/**
|
|
2618
|
+
* 本地视频轨道的统计信息
|
|
2619
|
+
*/
|
|
2620
|
+
interface LocalVideoStates {
|
|
2621
|
+
/**
|
|
2622
|
+
* 视频采集帧率(fps), Safari 和 Firefox 上无法获取该值。
|
|
2623
|
+
*/
|
|
2624
|
+
captureFrameRate?: number;
|
|
2625
|
+
/**
|
|
2626
|
+
* 视频采集的分辨率
|
|
2627
|
+
*/
|
|
2628
|
+
captureResolution?: Resolution;
|
|
2629
|
+
/**
|
|
2630
|
+
* 视频发送的分辨率
|
|
2631
|
+
*/
|
|
2632
|
+
sendResolution?: Resolution;
|
|
2633
|
+
/**
|
|
2634
|
+
* 视频编码格式。
|
|
2635
|
+
*/
|
|
2636
|
+
codec?: string;
|
|
2637
|
+
/**
|
|
2638
|
+
* 视频发送码率 (bps)。
|
|
2639
|
+
*/
|
|
2640
|
+
sendBitrate?: number;
|
|
2641
|
+
/**
|
|
2642
|
+
* 发送的视频总字节数 (bytes)。
|
|
2643
|
+
*/
|
|
2644
|
+
sendBytes?: number;
|
|
2645
|
+
/**
|
|
2646
|
+
* 发送的视频总包数。
|
|
2647
|
+
*/
|
|
2648
|
+
sendPackets?: number;
|
|
2649
|
+
/**
|
|
2650
|
+
* 发送的视频总丢包数。
|
|
2651
|
+
*/
|
|
2652
|
+
sendPacketsLost?: number;
|
|
2653
|
+
/**
|
|
2654
|
+
* 视频发送帧率(fps)。
|
|
2655
|
+
*/
|
|
2656
|
+
sendFrameRate?: number;
|
|
2657
|
+
/**
|
|
2658
|
+
* 发送端编码出的带有QP值的帧的数量
|
|
2659
|
+
*/
|
|
2660
|
+
qpSum?: number;
|
|
2661
|
+
/**
|
|
2662
|
+
* 本地传输可用码率
|
|
2663
|
+
*/
|
|
2664
|
+
outgingBitrate?: number;
|
|
2665
|
+
/**
|
|
2666
|
+
* 目标发送码率
|
|
2667
|
+
*/
|
|
2668
|
+
targetBitrate?: number;
|
|
2669
|
+
/**
|
|
2670
|
+
* 编码帧率
|
|
2671
|
+
*/
|
|
2672
|
+
encodeFrameRate?: number;
|
|
2673
|
+
/**
|
|
2674
|
+
* 调用时的时间戳
|
|
2675
|
+
*/
|
|
2676
|
+
timestamp?: number;
|
|
2677
|
+
/**
|
|
2678
|
+
* 往返时延
|
|
2679
|
+
*/
|
|
2680
|
+
rtt?: number;
|
|
2681
|
+
encodeLayers?: number;
|
|
2682
|
+
sendLayers?: number;
|
|
2683
|
+
}
|
|
2684
|
+
/**
|
|
2685
|
+
* 本地视频轨道的统计信息
|
|
2686
|
+
*/
|
|
2687
|
+
interface LocalVideoStatesMap {
|
|
2688
|
+
uplinkProfile?: any[];
|
|
2689
|
+
downlinkProfile?: any[];
|
|
2690
|
+
/**
|
|
2691
|
+
* 视频数据统计信息
|
|
2692
|
+
*/
|
|
2693
|
+
camera?: LocalVideoStates;
|
|
2694
|
+
/**
|
|
2695
|
+
* 桌面共享统计信息
|
|
2696
|
+
*/
|
|
2697
|
+
auxiliary?: LocalVideoStates;
|
|
2698
|
+
}
|
|
2699
|
+
/**
|
|
2700
|
+
* 远端视频轨道的统计数据,包括连接、传输等基本信息。
|
|
2701
|
+
*/
|
|
2702
|
+
interface RemoteVideoStates {
|
|
2703
|
+
/**
|
|
2704
|
+
* 视频解码帧率。
|
|
2705
|
+
*/
|
|
2706
|
+
decodeFrameRate?: number;
|
|
2707
|
+
/**
|
|
2708
|
+
* 接收视频的分辨率。
|
|
2709
|
+
*/
|
|
2710
|
+
receiveResolution?: Resolution;
|
|
2711
|
+
/**
|
|
2712
|
+
* 视频编码格式。
|
|
2713
|
+
*/
|
|
2714
|
+
codec?: string;
|
|
2715
|
+
/**
|
|
2716
|
+
* 视频发送码率 (bps)。
|
|
2717
|
+
*/
|
|
2718
|
+
receiveBitrate?: number;
|
|
2719
|
+
/**
|
|
2720
|
+
* 接收的视频总字节数 (bytes)。
|
|
2721
|
+
*/
|
|
2722
|
+
receiveBytes?: number;
|
|
2723
|
+
/**
|
|
2724
|
+
* 接收的视频总包数。
|
|
2725
|
+
*/
|
|
2726
|
+
receivePackets?: number;
|
|
2727
|
+
/**
|
|
2728
|
+
* 接收的视频总丢包数。
|
|
2729
|
+
*/
|
|
2730
|
+
receivePacketsLost?: number;
|
|
2731
|
+
/**
|
|
2732
|
+
* 视频发送帧率(fps)。
|
|
2733
|
+
*/
|
|
2734
|
+
receiveFrameRate?: number;
|
|
2735
|
+
/**
|
|
2736
|
+
* 调用时的时间戳
|
|
2737
|
+
*/
|
|
2738
|
+
timestamp?: number;
|
|
2739
|
+
/**
|
|
2740
|
+
* 往返时延
|
|
2741
|
+
*/
|
|
2742
|
+
rtt?: number;
|
|
2743
|
+
}
|
|
2744
|
+
/**
|
|
2745
|
+
* 远端音频轨道的统计数据,包括连接、传输等基本信息。
|
|
2746
|
+
*/
|
|
2747
|
+
interface RemoteAudioStates {
|
|
2748
|
+
/**
|
|
2749
|
+
* 音频编码格式。
|
|
2750
|
+
*/
|
|
2751
|
+
codec?: string;
|
|
2752
|
+
/**
|
|
2753
|
+
* 音频发送码率 (bps)。
|
|
2754
|
+
*/
|
|
2755
|
+
receiveBitrate?: number;
|
|
2756
|
+
/**
|
|
2757
|
+
* 接收的音频总字节数 (bytes)。
|
|
2758
|
+
*/
|
|
2759
|
+
receiveBytes?: number;
|
|
2760
|
+
/**
|
|
2761
|
+
* 接收的音频总包数。
|
|
2762
|
+
*/
|
|
2763
|
+
receivePackets?: number;
|
|
2764
|
+
/**
|
|
2765
|
+
* 接收的音频总丢包数。
|
|
2766
|
+
*/
|
|
2767
|
+
receivePacketsLost?: number;
|
|
2768
|
+
/**
|
|
2769
|
+
* 调用时的时间戳
|
|
2770
|
+
*/
|
|
2771
|
+
timestamp?: number;
|
|
2772
|
+
/**
|
|
2773
|
+
* 往返时延
|
|
2774
|
+
*/
|
|
2775
|
+
rtt?: number;
|
|
2776
|
+
/**
|
|
2777
|
+
* @internal 音频能量
|
|
2778
|
+
*/
|
|
2779
|
+
audioLevel?: number;
|
|
2780
|
+
}
|
|
2781
|
+
/**
|
|
2782
|
+
* 远端视频流统计信息,uid 为 key,对应该用户的视频统计信息
|
|
2783
|
+
*/
|
|
2784
|
+
interface RemoteVideoStatesMap {
|
|
2785
|
+
[uid: string]: {
|
|
2786
|
+
camera?: RemoteVideoStates;
|
|
2787
|
+
auxiliary?: RemoteVideoStates;
|
|
2788
|
+
};
|
|
2789
|
+
}
|
|
2790
|
+
/**
|
|
2791
|
+
* RtcEngine 全局事件
|
|
2792
|
+
*/
|
|
2793
|
+
interface IGlobalEvent {
|
|
2794
|
+
/**
|
|
2795
|
+
* 视频采集设备状态变化
|
|
2796
|
+
*
|
|
2797
|
+
* @example
|
|
2798
|
+
* ```typescript
|
|
2799
|
+
* RtcEngine.on('camera-changed', (info) => {
|
|
2800
|
+
* console.log(info);
|
|
2801
|
+
* })
|
|
2802
|
+
* ```
|
|
2803
|
+
*
|
|
2804
|
+
* @param info 变化的设备
|
|
2805
|
+
*/
|
|
2806
|
+
'camera-changed': (info: DeviceInfo) => void;
|
|
2807
|
+
/**
|
|
2808
|
+
* 音频采集设备状态变化
|
|
2809
|
+
*
|
|
2810
|
+
* @example
|
|
2811
|
+
* ```typescript
|
|
2812
|
+
* RtcEngine.on('microphone-changed', (info) => {
|
|
2813
|
+
* console.log(info);
|
|
2814
|
+
* })
|
|
2815
|
+
* ```
|
|
2816
|
+
*
|
|
2817
|
+
* @param info
|
|
2818
|
+
* @returns
|
|
2819
|
+
*/
|
|
2820
|
+
'microphone-changed': (info: DeviceInfo) => void;
|
|
2821
|
+
/**
|
|
2822
|
+
* 音频播放设备变化
|
|
2823
|
+
*
|
|
2824
|
+
* @example
|
|
2825
|
+
* ```typescript
|
|
2826
|
+
* RtcEngine.on('playback-device-changed', (info) => {
|
|
2827
|
+
* console.log(info);
|
|
2828
|
+
* })
|
|
2829
|
+
* ```
|
|
2830
|
+
*
|
|
2831
|
+
* @param info
|
|
2832
|
+
* @returns
|
|
2833
|
+
*/
|
|
2834
|
+
'playback-device-changed': (info: DeviceInfo) => void;
|
|
2835
|
+
/**
|
|
2836
|
+
* 音频自动播放失败
|
|
2837
|
+
*
|
|
2838
|
+
* @example
|
|
2839
|
+
* ```typescript
|
|
2840
|
+
* RtcEngine.on('autoplay-failed', (track) => {
|
|
2841
|
+
* console.log(track);
|
|
2842
|
+
* })
|
|
2843
|
+
* ```
|
|
2844
|
+
*
|
|
2845
|
+
* @param track
|
|
2846
|
+
* @returns
|
|
2847
|
+
*/
|
|
2848
|
+
'autoplay-failed': (track: LocalTrack | RemoteTrack) => void;
|
|
2849
|
+
}
|
|
2850
|
+
/**
|
|
2851
|
+
* 与服务器断开连接的原因
|
|
2852
|
+
*/
|
|
2853
|
+
type DisconnectedReason = 'leave' | 'network_error' | 'server_error' | 'uid_banned' | 'uid_replaced' | 'channel_banned' | 'timeout';
|
|
2854
|
+
/**
|
|
2855
|
+
* -0 网络状态未知
|
|
2856
|
+
* -1 网络极佳
|
|
2857
|
+
* -2 网络较好
|
|
2858
|
+
* -3 网络一般
|
|
2859
|
+
* -4 网络较差
|
|
2860
|
+
* -5 网络极差
|
|
2861
|
+
* -6 网络已断开
|
|
2862
|
+
*/
|
|
2863
|
+
type NetworkQuality = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
2864
|
+
interface ICommonExceptionEvent {
|
|
2865
|
+
exception(info: DingRTCError): void;
|
|
2866
|
+
}
|
|
2867
|
+
/**
|
|
2868
|
+
* -debug 输出所有日志
|
|
2869
|
+
* -info 输出info、error、warn日志
|
|
2870
|
+
* -warn 输出error、warn日志
|
|
2871
|
+
* -error 输出error日志
|
|
2872
|
+
* -none 不输出日志
|
|
2873
|
+
*/
|
|
2874
|
+
type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
|
|
2875
|
+
/**
|
|
2876
|
+
* 订阅用户音视频轨道
|
|
2877
|
+
* @required uid 远端用户id
|
|
2878
|
+
* @required mediaType 订阅的轨道媒体类型
|
|
2879
|
+
* @optional auxiliary 如果订阅视频轨道,是否订阅共享视频流
|
|
2880
|
+
*/
|
|
2881
|
+
interface SubscribeParam {
|
|
2882
|
+
uid: string;
|
|
2883
|
+
mediaType: TrackMediaType;
|
|
2884
|
+
auxiliary?: boolean;
|
|
2885
|
+
}
|
|
2886
|
+
/**
|
|
2887
|
+
* 取消订阅用户音视频轨道
|
|
2888
|
+
* @required uid 远端用户id
|
|
2889
|
+
* @required mediaType 取消订阅的轨道媒体类型
|
|
2890
|
+
* @optional auxiliary 如果取消订阅视频轨道,是否取消订阅共享
|
|
2891
|
+
*/
|
|
2892
|
+
interface UnsubscribeParam {
|
|
2893
|
+
uid: string;
|
|
2894
|
+
mediaType: TrackMediaType;
|
|
2895
|
+
auxiliary?: boolean;
|
|
2896
|
+
}
|
|
2897
|
+
interface SubscribeResult {
|
|
2898
|
+
uid: string;
|
|
2899
|
+
auxiliary?: boolean;
|
|
2900
|
+
error?: DingRTCError;
|
|
2901
|
+
track?: RemoteTrack;
|
|
2902
|
+
}
|
|
2903
|
+
interface GroupAudioRoute {
|
|
2904
|
+
publishAudioToGroup?: boolean;
|
|
2905
|
+
unpublishAudioFromChannel?: boolean;
|
|
2906
|
+
}
|
|
2907
|
+
interface JoinGroupConfig {
|
|
2908
|
+
groupId: string;
|
|
2909
|
+
userData?: string;
|
|
2910
|
+
publishAudioToGroup?: boolean;
|
|
2911
|
+
}
|
|
2912
|
+
interface LeaveGroupConfig {
|
|
2913
|
+
groupId: string;
|
|
2914
|
+
publishAudioToChannel?: boolean;
|
|
2915
|
+
}
|
|
2916
|
+
interface GroupUser {
|
|
2917
|
+
userId: string;
|
|
2918
|
+
userData?: string;
|
|
2919
|
+
}
|
|
2920
|
+
interface Group {
|
|
2921
|
+
joined?: boolean;
|
|
2922
|
+
users?: GroupUser[];
|
|
2923
|
+
id: string;
|
|
2924
|
+
audioPublished?: boolean;
|
|
2925
|
+
}
|
|
2926
|
+
type GroupPropertyUpdateTypes = 'set-name' | 'remove-name';
|
|
2927
|
+
interface ISharedChannelInstance {
|
|
2928
|
+
attach(channel: DingRTCChannel, client: Channel): void;
|
|
2929
|
+
detach(channel: DingRTCChannel): void;
|
|
2930
|
+
}
|
|
2931
|
+
interface ChannelEvens {
|
|
2932
|
+
'suscribedAudio': (subscribed: boolean, audioGroupStreamId: string) => void;
|
|
2933
|
+
}
|
|
2934
|
+
|
|
2935
|
+
interface ITrackEvent extends ICommonExceptionEvent {
|
|
2936
|
+
/**
|
|
2937
|
+
* 音频或视频轨道被终止,终止的原因可能是:
|
|
2938
|
+
* - 摄像头被拔出
|
|
2939
|
+
* - 麦克风被拔出
|
|
2940
|
+
* - 用户主动停止了屏幕共享
|
|
2941
|
+
* - 用户主动关闭了底层的 MediaStreamTrack
|
|
2942
|
+
* - 媒体设备故障
|
|
2943
|
+
* - 正在使用中的媒体设备的权限被收回
|
|
2944
|
+
* @returns
|
|
2945
|
+
*/
|
|
2946
|
+
'track-ended': () => void;
|
|
2947
|
+
/**
|
|
2948
|
+
* 音频或视频首帧解码时触发。
|
|
2949
|
+
* @returns
|
|
2950
|
+
*/
|
|
2951
|
+
'first-frame-decoded': () => void;
|
|
2952
|
+
/**
|
|
2953
|
+
* @internal 内部轨道事件
|
|
2954
|
+
*/
|
|
2955
|
+
[TRACK_EVENT_NAME]: (action: TRACK_EVENT_ACTION, payload?: Track | boolean) => void;
|
|
2956
|
+
}
|
|
2957
|
+
declare class Track extends EventEmitter<ITrackEvent> {
|
|
2958
|
+
/**
|
|
2959
|
+
* 媒体轨道类型
|
|
2960
|
+
*/
|
|
2961
|
+
trackMediaType: TrackMediaType;
|
|
2962
|
+
/**
|
|
2963
|
+
* @internal
|
|
2964
|
+
*/
|
|
2965
|
+
source?: VideoSourceInfo | AudioSourceInfo;
|
|
2966
|
+
/**
|
|
2967
|
+
* @internal
|
|
2968
|
+
*/
|
|
2969
|
+
protected logger: {
|
|
2970
|
+
webtracking: {
|
|
2971
|
+
commonInfo: _dingrtc_shared.LogCommonInfo;
|
|
2972
|
+
updateCommonInfo(commonInfo: _dingrtc_shared.LogCommonInfo): void;
|
|
2973
|
+
gslbAccess(success: boolean, message: string): void;
|
|
2974
|
+
send(param: any): void;
|
|
2975
|
+
};
|
|
2976
|
+
sender: {
|
|
2977
|
+
logging: {
|
|
2978
|
+
commonInfo: _dingrtc_shared.LogCommonInfo;
|
|
2979
|
+
cache: any[];
|
|
2980
|
+
slsClient: {
|
|
2981
|
+
logService: _dingrtc_shared.LogServiceDTO;
|
|
2982
|
+
cache: any[];
|
|
2983
|
+
statsCache: any[];
|
|
2984
|
+
tokenManager: {
|
|
2985
|
+
credential: _dingrtc_shared.CredentialsDto;
|
|
2986
|
+
updating: boolean;
|
|
2987
|
+
requesting: boolean;
|
|
2988
|
+
commonInfo: _dingrtc_shared.LogCommonInfo;
|
|
2989
|
+
securityToken: _dingrtc_shared.SecurityTokenDTO;
|
|
2990
|
+
delayTimerId: number;
|
|
2991
|
+
checkTokenTimerId: number;
|
|
2992
|
+
startTime: number;
|
|
2993
|
+
stopUpdateToken(): void;
|
|
2994
|
+
requestStsToken(): void;
|
|
2995
|
+
delayRequest(delayTime?: number): void;
|
|
2996
|
+
stopDelayTimer(): void;
|
|
2997
|
+
updateSecurityToken(securityToken: _dingrtc_shared.SecurityTokenDTO): void;
|
|
2998
|
+
updateCredential(credential: _dingrtc_shared.CredentialsDto): void;
|
|
2999
|
+
checkToken(): void;
|
|
3000
|
+
stopCheckTokenTimer(): void;
|
|
3001
|
+
eventMap: Record<string | symbol, {
|
|
3002
|
+
fn: (...args: any[]) => void;
|
|
3003
|
+
once: boolean;
|
|
3004
|
+
}[]>;
|
|
3005
|
+
listenerCount(event: string | symbol): number;
|
|
3006
|
+
emit<T extends string | symbol>(event: T, ...args: any[]): boolean;
|
|
3007
|
+
on<T extends string | symbol>(event: T, fn: (...args: any[]) => void): /*elided*/ any;
|
|
3008
|
+
once<T extends string | symbol>(event: T, fn: (...args: any[]) => void): /*elided*/ any;
|
|
3009
|
+
off<T extends string | symbol>(event: T, fn?: (...args: any[]) => void): void;
|
|
3010
|
+
removeAllListeners(event?: string | symbol): void;
|
|
3011
|
+
};
|
|
3012
|
+
eventTriggedTimer: number;
|
|
3013
|
+
cycleStatsTimer: number;
|
|
3014
|
+
cycleStatsInterval: number;
|
|
3015
|
+
eventTriggedInterval: number;
|
|
3016
|
+
readonly securityToken: string;
|
|
3017
|
+
stopUpdateToken(): void;
|
|
3018
|
+
send(param: any): void;
|
|
3019
|
+
sendStats(param: any): void;
|
|
3020
|
+
flush(): void;
|
|
3021
|
+
upload(isFlush?: boolean, source?: string): Promise<unknown>;
|
|
3022
|
+
clear(): void;
|
|
3023
|
+
};
|
|
3024
|
+
updateCommonInfo(commonInfo: _dingrtc_shared.LogCommonInfo): void;
|
|
3025
|
+
start(slsConfig: _dingrtc_shared.SLSClientConfig): void;
|
|
3026
|
+
stop(): void;
|
|
3027
|
+
send(param: any): void;
|
|
3028
|
+
clear(): void;
|
|
3029
|
+
realSend(param: any): void;
|
|
3030
|
+
};
|
|
3031
|
+
statsConfig: _dingrtc_shared.StatsConfig;
|
|
3032
|
+
simpleLogger(log: string): void;
|
|
3033
|
+
start(slsConfig: _dingrtc_shared.SLSClientConfig): void;
|
|
3034
|
+
stop(): void;
|
|
3035
|
+
readonly securityToken: string;
|
|
3036
|
+
updateSecurityToken(securityToken: _dingrtc_shared.SecurityTokenDTO): void;
|
|
3037
|
+
sendMetric(param: any): void;
|
|
3038
|
+
sendEvent(param: any): void;
|
|
3039
|
+
exception(error: DingRTCError): void;
|
|
3040
|
+
};
|
|
3041
|
+
wtJoin(init: boolean, elapse?: number, success?: boolean, message?: string): void;
|
|
3042
|
+
wtReJoin(init: boolean, elapse?: number, success?: boolean, message?: string): void;
|
|
3043
|
+
wtGslb(event: string, message?: string): void;
|
|
3044
|
+
simpleLogger(log: string): void;
|
|
3045
|
+
wtLeave(reason: string): void;
|
|
3046
|
+
leave(): void;
|
|
3047
|
+
publish(init: boolean, track: any, sessionId: string, elapse: number): void;
|
|
3048
|
+
unpublish(sessionId: string): void;
|
|
3049
|
+
exception(error: DingRTCError): void;
|
|
3050
|
+
getTrackId(capabilities: any, resolutionInfo: _dingrtc_shared.ResolutionInfo): string;
|
|
3051
|
+
sendEvent(eventType: "JOIN_CHANNEL" | "JOIN_CHANNEL_SUCCESS" | "JOIN_CHANNEL_FAILED" | "REJOIN_CHANNEL" | "REJOIN_CHANNEL_SUCCESS" | "REJOIN_CHANNEL_FAILED" | "LEAVE_CHANNEL" | "PUBLISH_INIT" | "PUBLISH_REDAY" | "PUBLISH_SUCCESS" | "PUBLISH_FAILED" | "SEND_STREAM" | "PUBLISH_STOP" | "SUBSCRIBE_INIT" | "SUBSCRIBE_STOP" | "FIRST_DRAW" | "AUDIO_DEVICE_ERROR" | "VIDEO_SEND_STATS" | "VIDEO_DEVICE_START" | "VIDEO_BWE" | "SUBSCRIBE_READY" | "VIDEO_DEVICE_ERROR" | "APP_BACKGROUND" | "SUBSCRIBE_FIALED" | "SUBSCRIBE_SUCCESS" | "RECEIVE_FIRST_FRAME" | "LOCAL_CONTROL" | "APP_FOREGROUND" | "AUDIO_DEVICE_START" | "AUDIO_DEVICE_STOP" | "VIDEO_DEVICE_STOP" | "SCREEN_DEVICE_START" | "SCREEN_DEVICE_STOP" | "NETWORK_TYPE_CHANGE" | "AUDIO_SEND_STATS" | "VIDEO_RENDER_FPS" | "ICE_STATS" | "SYSTEM_INFO" | "SEND_BWE" | "AUDIO_RECV_STATS" | "VIDEO_RECV_STATS" | "VIDEO_RECV_FIRST_FRAME" | "VIDEO_RECV_FIRST_PACK" | "AUDIO_RECV_FIRST_PACK" | "AUDIO_NET_EQ" | "AUDIO_DEVICE_BUFFER" | "USER_EVENT" | "STREAM_EVENT" | "CONNECTION_EVENT" | "SYNC_EVENT" | "EXCEPTION" | "SIMPLE_LOGGER"): void;
|
|
3052
|
+
subscribe(param: _dingrtc_shared.SubscribeParam): void;
|
|
3053
|
+
join(init: boolean, elapse?: number, success?: boolean, reason?: string): void;
|
|
3054
|
+
rejoin(init: boolean, elapse?: number, success?: boolean, reason?: string): void;
|
|
3055
|
+
localControl(mt: _dingrtc_shared.TrackMediaType, mute: boolean, sessionId: string): void;
|
|
3056
|
+
usersEvent(uid: string, state: "join" | "leave" | "setProperties", payload?: string): void;
|
|
3057
|
+
streamsEvent(streamId: string, state: string): void;
|
|
3058
|
+
connectionsEvent(sessionId: string, action: string): void;
|
|
3059
|
+
syncEvent(syncType: "stream" | "user", clientUids: string[], serverIds: string[]): void;
|
|
3060
|
+
videoFirstFrame(param: _dingrtc_shared.VideoFirstFrameParam): void;
|
|
3061
|
+
videoFirstPacket(param: _dingrtc_shared.VideoFirstPacketParam): void;
|
|
3062
|
+
audioFirstPacket(param: _dingrtc_shared.AudioFirstPacketParam): void;
|
|
3063
|
+
unsubscribe(param: _dingrtc_shared.IUnsubscribeParam): void;
|
|
3064
|
+
};
|
|
3065
|
+
/**
|
|
3066
|
+
* @internal
|
|
3067
|
+
*/
|
|
3068
|
+
protected sourceNode: MediaStreamAudioSourceNode;
|
|
3069
|
+
/**
|
|
3070
|
+
* @internal
|
|
3071
|
+
*/
|
|
3072
|
+
protected audioContext: AudioContext;
|
|
3073
|
+
/**
|
|
3074
|
+
* @internal
|
|
3075
|
+
*/
|
|
3076
|
+
protected analyser: AnalyserNode;
|
|
3077
|
+
/**
|
|
3078
|
+
* @internal
|
|
3079
|
+
*/
|
|
3080
|
+
trackSettings: MediaTrackSettings;
|
|
3081
|
+
/**
|
|
3082
|
+
* @internal sfu 音频流
|
|
3083
|
+
*/
|
|
3084
|
+
sfuStream: MediaStream;
|
|
3085
|
+
/**
|
|
3086
|
+
* @internal
|
|
3087
|
+
*/
|
|
3088
|
+
protected mediaStreamTrack: MediaStreamTrack;
|
|
3089
|
+
/**
|
|
3090
|
+
* @internal
|
|
3091
|
+
*/
|
|
3092
|
+
protected trackId: string;
|
|
3093
|
+
/**
|
|
3094
|
+
* @internal
|
|
3095
|
+
* 视频源镜像推流
|
|
3096
|
+
*/
|
|
3097
|
+
sourceMirror: boolean;
|
|
3098
|
+
/**
|
|
3099
|
+
* @internal
|
|
3100
|
+
*/
|
|
3101
|
+
constructor(mediaStreamTrack?: MediaStreamTrack, mediaStream?: MediaStream);
|
|
3102
|
+
/**
|
|
3103
|
+
* 媒体轨道是否正在播放
|
|
3104
|
+
*/
|
|
3105
|
+
get isPlaying(): boolean;
|
|
3106
|
+
/**
|
|
3107
|
+
* 获取流轨道 id
|
|
3108
|
+
* @returns 流轨道 id
|
|
3109
|
+
*/
|
|
3110
|
+
getTrackId(): string;
|
|
3111
|
+
/**
|
|
3112
|
+
* @internal
|
|
3113
|
+
*/
|
|
3114
|
+
protected setMediaStreamTrack(track: MediaStreamTrack, stream?: MediaStream): void;
|
|
3115
|
+
/**
|
|
3116
|
+
* 替换音视频轨道
|
|
3117
|
+
* @param track 音视频轨道
|
|
3118
|
+
* @param stopOldTrack 是否停止上一个轨道
|
|
3119
|
+
*/
|
|
3120
|
+
replaceTrack(track: MediaStreamTrack, stopOldTrack?: boolean): void;
|
|
3121
|
+
/**
|
|
3122
|
+
* @internal
|
|
3123
|
+
*/
|
|
3124
|
+
protected replaceTrackInner(track: MediaStreamTrack, stream?: MediaStream, updated?: boolean): void;
|
|
3125
|
+
/**
|
|
3126
|
+
* 设置媒体源类型(内部使用)
|
|
3127
|
+
* @param source 媒体源类型
|
|
3128
|
+
* @internal
|
|
3129
|
+
*/
|
|
3130
|
+
setSource(source: VideoSourceInfo | AudioSourceInfo): void;
|
|
3131
|
+
/**
|
|
3132
|
+
* 停止播放
|
|
3133
|
+
*/
|
|
3134
|
+
stop(element?: string | HTMLElement): void;
|
|
3135
|
+
protected innnerPlay(param: InnerPlayConfig): void;
|
|
3136
|
+
/**
|
|
3137
|
+
* 获取媒体轨道
|
|
3138
|
+
* @returns 媒体轨道
|
|
3139
|
+
*/
|
|
3140
|
+
getMediaStreamTrack(): MediaStreamTrack;
|
|
3141
|
+
}
|
|
3142
|
+
|
|
3143
|
+
/**
|
|
3144
|
+
* 音频源类型枚举
|
|
3145
|
+
* @internal
|
|
3146
|
+
*/
|
|
3147
|
+
declare enum AudioSourceInfo {
|
|
3148
|
+
/**
|
|
3149
|
+
* 麦克风
|
|
3150
|
+
*/
|
|
3151
|
+
MIC = "mic",
|
|
3152
|
+
/**
|
|
3153
|
+
* 桌面共享音频
|
|
3154
|
+
*/
|
|
3155
|
+
SCREENCAST = "screen-cast",
|
|
3156
|
+
/**
|
|
3157
|
+
* 混合类型
|
|
3158
|
+
*/
|
|
3159
|
+
MIXED = "mixed"
|
|
3160
|
+
}
|
|
3161
|
+
/**
|
|
3162
|
+
* 视频源类型枚举
|
|
3163
|
+
* @internal
|
|
3164
|
+
*/
|
|
3165
|
+
declare enum VideoSourceInfo {
|
|
3166
|
+
/**
|
|
3167
|
+
* 摄像头
|
|
3168
|
+
*/
|
|
3169
|
+
CAMERA = "camera",
|
|
3170
|
+
/**
|
|
3171
|
+
* 桌面共享
|
|
3172
|
+
*/
|
|
3173
|
+
SCREENCAST = "screen-cast",
|
|
3174
|
+
/**
|
|
3175
|
+
* 混合类型
|
|
3176
|
+
*/
|
|
3177
|
+
MIXED = "mixed"
|
|
3178
|
+
}
|
|
3179
|
+
interface LocalTrackConfig {
|
|
3180
|
+
/**
|
|
3181
|
+
* 音视频采集设备ID。
|
|
3182
|
+
*
|
|
3183
|
+
*/
|
|
3184
|
+
deviceId?: string;
|
|
3185
|
+
/**
|
|
3186
|
+
* 帧率,最大值30
|
|
3187
|
+
*/
|
|
3188
|
+
frameRate?: number;
|
|
3189
|
+
/**
|
|
3190
|
+
* 最大码率,单位Kbps
|
|
3191
|
+
*/
|
|
3192
|
+
maxBitrate?: number;
|
|
3193
|
+
/**
|
|
3194
|
+
* 视频采集规格
|
|
3195
|
+
*/
|
|
3196
|
+
dimension?: VideoDimension;
|
|
3197
|
+
/**
|
|
3198
|
+
* 视频传输优化模式:
|
|
3199
|
+
* balanced: 默认传输优化模式,对于共享流会是清晰优先,对于其他类型视频流,会兼顾清晰和流畅,弱网下会调整帧率和分辨率;
|
|
3200
|
+
* detail: 清晰优先,大部分情况下不会降低分辨率,可能会降低帧率;
|
|
3201
|
+
* motion: 流畅优先,大部分情况下不会降低帧率,可能会降低发送的分辨率;
|
|
3202
|
+
*/
|
|
3203
|
+
optimizationMode?: 'detail' | 'motion' | 'balanced';
|
|
3204
|
+
/**
|
|
3205
|
+
* 移动端指定使用前置/后置摄像头来采集视频。
|
|
3206
|
+
* user: 前置摄像头
|
|
3207
|
+
* environment: 后置摄像头
|
|
3208
|
+
*/
|
|
3209
|
+
facingMode?: 'user' | 'environment';
|
|
3210
|
+
/**
|
|
3211
|
+
* 自定义轨道源
|
|
3212
|
+
*/
|
|
3213
|
+
source?: string | AudioBuffer;
|
|
3214
|
+
/**
|
|
3215
|
+
* 是否缓存线上文件
|
|
3216
|
+
*/
|
|
3217
|
+
cache?: boolean;
|
|
3218
|
+
/**
|
|
3219
|
+
* 您维护的 MediaStreamTrack 对象。
|
|
3220
|
+
*/
|
|
3221
|
+
mediaStreamTrack?: MediaStreamTrack;
|
|
3222
|
+
/**
|
|
3223
|
+
* 视频源镜像推流
|
|
3224
|
+
*/
|
|
3225
|
+
mirror?: boolean;
|
|
3226
|
+
}
|
|
3227
|
+
interface Resolution {
|
|
3228
|
+
width: number;
|
|
3229
|
+
height: number;
|
|
3230
|
+
}
|
|
3231
|
+
declare enum NetworkQualityType {
|
|
3232
|
+
UNKNOWN = 0,
|
|
3233
|
+
GREAT = 1,
|
|
3234
|
+
GOOD = 2,
|
|
3235
|
+
NORMAL = 3,
|
|
3236
|
+
POOR = 4,
|
|
3237
|
+
BAD = 5,
|
|
3238
|
+
DISCONNECTED = 6
|
|
3239
|
+
}
|
|
3240
|
+
interface SignalingEvent {
|
|
3241
|
+
'connection-state-change': (currentState: ConnectionState, prevState: ConnectionState, reason?: DisconnectedReason) => void;
|
|
3242
|
+
user: (action: UserEventAction$1, participant: signal_msg.IParticipantInfo) => void;
|
|
3243
|
+
serverFailover: (payload: signal_msg.IServerFailoverNotification) => void;
|
|
3244
|
+
stream: (payload: signal_msg.IStreamNotification) => void;
|
|
3245
|
+
progress: (payload: signal_msg.IProgressNotification) => void;
|
|
3246
|
+
sync: (payload: signal_msg.ISyncNotification) => void;
|
|
3247
|
+
'batch-notify': (payload: signal_msg.IBatchNotification) => void;
|
|
3248
|
+
'media-message': (payload: signal_msg.IMediaMessage) => void;
|
|
3249
|
+
group: (payload: signal_msg.IGroupChangeLog) => void;
|
|
3250
|
+
'group-list': (payload: signal_msg.IGroupListChangeLog) => void;
|
|
3251
|
+
}
|
|
3252
|
+
interface ICEConfig {
|
|
3253
|
+
password?: string;
|
|
3254
|
+
level: number;
|
|
3255
|
+
port?: number;
|
|
3256
|
+
iceServerList?: string[];
|
|
3257
|
+
username?: string;
|
|
3258
|
+
}
|
|
3259
|
+
declare enum PubSubStates {
|
|
3260
|
+
Idle = 0,
|
|
3261
|
+
Processing = 1,
|
|
3262
|
+
End = 2
|
|
3263
|
+
}
|
|
3264
|
+
declare enum PeerConnectionState {
|
|
3265
|
+
New = 0,
|
|
3266
|
+
Idle = 1,
|
|
3267
|
+
Processing = 2,
|
|
3268
|
+
Ended = 3
|
|
3269
|
+
}
|
|
3270
|
+
type PCDirection = 'uplink' | 'downlink';
|
|
3271
|
+
interface ResolutionInfo {
|
|
3272
|
+
resolutionLevel: number;
|
|
3273
|
+
resolution: Resolution;
|
|
3274
|
+
}
|
|
3275
|
+
interface IBatchSubscribeParam {
|
|
3276
|
+
stream?: signal_msg.IStream;
|
|
3277
|
+
track?: RemoteTrack;
|
|
3278
|
+
error?: DingRTCError;
|
|
3279
|
+
streamType?: RemoteStreamType;
|
|
3280
|
+
uid?: string;
|
|
3281
|
+
session?: Subscription;
|
|
3282
|
+
profileFallback?: boolean;
|
|
3283
|
+
resolutionInfo?: ResolutionInfo;
|
|
3284
|
+
}
|
|
3285
|
+
interface IBatchSubscribeResult {
|
|
3286
|
+
subscription?: Subscription;
|
|
3287
|
+
error?: DingRTCError;
|
|
3288
|
+
stream?: signal_msg.IStream;
|
|
3289
|
+
resolutionInfo?: ResolutionInfo;
|
|
3290
|
+
uid?: string;
|
|
3291
|
+
id?: string;
|
|
3292
|
+
}
|
|
3293
|
+
type RidType = 'lld' | 'ld' | 'sd' | 'hd' | 'fhd';
|
|
3294
|
+
interface MediaMessage {
|
|
3295
|
+
rid: RidType;
|
|
3296
|
+
mid: string;
|
|
3297
|
+
profile: number;
|
|
3298
|
+
bitrate: number;
|
|
3299
|
+
framerate: number;
|
|
3300
|
+
codec: number;
|
|
3301
|
+
index: number;
|
|
3302
|
+
}
|
|
3303
|
+
interface SenderEncoding {
|
|
3304
|
+
rid?: RidType;
|
|
3305
|
+
maxFramerate: number;
|
|
3306
|
+
maxBitrate: number;
|
|
3307
|
+
minBitrate: number;
|
|
3308
|
+
scaleResolutionDownBy: number;
|
|
3309
|
+
active: boolean;
|
|
3310
|
+
targetWidth?: number;
|
|
3311
|
+
targetHeight?: number;
|
|
3312
|
+
priority?: string;
|
|
3313
|
+
}
|
|
3314
|
+
interface SubscribeActionParam {
|
|
3315
|
+
uid?: string;
|
|
3316
|
+
groupId?: string;
|
|
3317
|
+
auxiliary?: boolean;
|
|
3318
|
+
mediaType?: TrackMediaType;
|
|
3319
|
+
action?: 'subscribe' | 'unsubscribe';
|
|
3320
|
+
}
|
|
3321
|
+
interface SubscribeActionParam {
|
|
3322
|
+
uid?: string;
|
|
3323
|
+
groupId?: string;
|
|
3324
|
+
auxiliary?: boolean;
|
|
3325
|
+
mediaType?: TrackMediaType;
|
|
3326
|
+
action?: 'subscribe' | 'unsubscribe';
|
|
3327
|
+
}
|
|
3328
|
+
type TRACK_EVENT_ACTION = 'replace' | 'mute' | 'unmute' | 'stop' | 'republish' | 'optimizationMode' | 'mirror';
|
|
3329
|
+
interface InnerPlayConfig {
|
|
3330
|
+
element?: string | HTMLElement;
|
|
3331
|
+
config?: VideoPlayerConfig;
|
|
3332
|
+
updated?: boolean;
|
|
3333
|
+
}
|
|
3334
|
+
|
|
3335
|
+
/**
|
|
3336
|
+
* LocalTrack 是 Web SDK 中定义本地音视频轨道的基础类,可用于本地播放和发布。
|
|
3337
|
+
*
|
|
3338
|
+
* SDK 通过不同的方式创建不同的 LocalTrack,返回不同的 LocalTrack 派生类对象
|
|
3339
|
+
*/
|
|
3340
|
+
declare class LocalTrack extends Track {
|
|
3341
|
+
protected deviceId?: string;
|
|
3342
|
+
/**
|
|
3343
|
+
* 本地媒体轨道当前的静音状态。
|
|
3344
|
+
*/
|
|
3345
|
+
muted: boolean;
|
|
3346
|
+
/**
|
|
3347
|
+
* 最大码率,单位Kbps
|
|
3348
|
+
*/
|
|
3349
|
+
maxBitrate?: number;
|
|
3350
|
+
/**
|
|
3351
|
+
* 本地轨道当前的启用状态。
|
|
3352
|
+
*/
|
|
3353
|
+
enabled: boolean;
|
|
3354
|
+
/**
|
|
3355
|
+
* @internal
|
|
3356
|
+
*/
|
|
3357
|
+
config: LocalTrackConfig;
|
|
3358
|
+
/**
|
|
3359
|
+
* @internal
|
|
3360
|
+
*/
|
|
3361
|
+
protected isClosed: boolean;
|
|
3362
|
+
/**
|
|
3363
|
+
* @internal
|
|
3364
|
+
*/
|
|
3365
|
+
constructor(mediaStreamTrack?: MediaStreamTrack, deviceId?: string);
|
|
3366
|
+
/**
|
|
3367
|
+
* @internal
|
|
3368
|
+
*/
|
|
3369
|
+
protected setMediaStreamTrack(track: MediaStreamTrack): void;
|
|
3370
|
+
play(element?: string | HTMLElement, config?: VideoPlayerConfig): void;
|
|
3371
|
+
/**
|
|
3372
|
+
* 启用/禁用该轨道。
|
|
3373
|
+
*
|
|
3374
|
+
* 轨道禁用后,播放和发布都将被停止。
|
|
3375
|
+
*
|
|
3376
|
+
* @param enabled 是否启用该轨道
|
|
3377
|
+
* - true: 启用该轨道。
|
|
3378
|
+
* - false: 禁用该轨道。
|
|
3379
|
+
*/
|
|
3380
|
+
setEnabled(enabled: boolean): Promise<void>;
|
|
3381
|
+
/**
|
|
3382
|
+
* 关闭本地轨道,并释放相关采集设备。
|
|
3383
|
+
*
|
|
3384
|
+
* 一旦本地轨道被关闭,就无法再次使用。如需再次使用本地轨道,需要重新创建。
|
|
3385
|
+
*/
|
|
3386
|
+
close(): void;
|
|
3387
|
+
/**
|
|
3388
|
+
* 发送或暂停发送该轨道的媒体数据。
|
|
3389
|
+
*
|
|
3390
|
+
* 如果该轨道已发布,调用 setMuted(true) 后,远端会触发 user-unpublished 事件。再调用 setMuted(false) 后,远端会触发 user-published 事件。
|
|
3391
|
+
* @param muted 发送或暂停发送该轨道的媒体数据
|
|
3392
|
+
* - true: 发送媒体数据
|
|
3393
|
+
* - false: 暂停发送媒体数据
|
|
3394
|
+
*/
|
|
3395
|
+
setMuted(muted: boolean): Promise<void>;
|
|
3396
|
+
private getAudioTrack;
|
|
3397
|
+
private getVideoTrack;
|
|
3398
|
+
private updateNewTrack;
|
|
3399
|
+
/**
|
|
3400
|
+
* 更新设置轨道使用的媒体设备, 移动端时可通过设置为user、environment来切换前置、后置摄像头
|
|
3401
|
+
* @param deviceId 设备 id
|
|
3402
|
+
*/
|
|
3403
|
+
setDevice(deviceId: string): Promise<void>;
|
|
3404
|
+
/**
|
|
3405
|
+
* 获取本地轨道的来源描述
|
|
3406
|
+
* @returns 音频或视频轨道描述
|
|
3407
|
+
*/
|
|
3408
|
+
getTrackLabel(): string;
|
|
3409
|
+
/**
|
|
3410
|
+
* 获取上行最大码率
|
|
3411
|
+
* @returns 上行最大码率
|
|
3412
|
+
*/
|
|
3413
|
+
getMaxBitrate(): number;
|
|
3414
|
+
}
|
|
3415
|
+
/**
|
|
3416
|
+
* LocalVideoTrack 为本地视频轨道的基础类,提供了本地视频轨道的主要功能。
|
|
3417
|
+
*/
|
|
3418
|
+
declare class LocalVideoTrack extends LocalTrack {
|
|
3419
|
+
/**
|
|
3420
|
+
* @internal
|
|
3421
|
+
*/
|
|
3422
|
+
constructor(mediaStreamTrack: MediaStreamTrack, deviceId?: string, config?: LocalTrackConfig);
|
|
3423
|
+
get optimizationMode(): "detail" | "motion" | "balanced";
|
|
3424
|
+
/**
|
|
3425
|
+
* 更新视频轨道编码设置,调整画面质量
|
|
3426
|
+
* @param config 视频编码配置
|
|
3427
|
+
*/
|
|
3428
|
+
setEncoderConfiguration(config: VideoEncoderConfiguration): Promise<void>;
|
|
3429
|
+
/**
|
|
3430
|
+
* 获取当前渲染的视频帧数据
|
|
3431
|
+
* @remarks 只有在播放后才能调用此方法,如果没有调用 play 则返回空数据
|
|
3432
|
+
* @returns 'image/png' 类型的 dataURL
|
|
3433
|
+
*/
|
|
3434
|
+
getCurrentFrameData(): string;
|
|
3435
|
+
/**
|
|
3436
|
+
* 在页面上播放媒体轨道
|
|
3437
|
+
* @param element 指定一个 DOM 元素,SDK 将在这个元素下创建video元素播放视频轨道,支持 2 种类型
|
|
3438
|
+
* - string: 指定该 DOM 元素的 ID 值。
|
|
3439
|
+
* - HTMLElement: 直接传入一个 DOM 元素对象。
|
|
3440
|
+
* @param config 视频媒体播放参数
|
|
3441
|
+
*/
|
|
3442
|
+
play(element: string | HTMLElement, config?: VideoPlayerConfig): void;
|
|
3443
|
+
}
|
|
3444
|
+
/**
|
|
3445
|
+
* 基础本地音频轨道,提供了本地音频轨道的主要功能。
|
|
3446
|
+
*/
|
|
3447
|
+
declare class LocalAudioTrack extends LocalTrack {
|
|
3448
|
+
/**
|
|
3449
|
+
* @internal
|
|
3450
|
+
*/
|
|
3451
|
+
constructor(mediaStreamTrack: MediaStreamTrack, deviceId?: string);
|
|
3452
|
+
/**
|
|
3453
|
+
* 设置播放音量大小
|
|
3454
|
+
* @param volume 音量值,范围 [0, 1],0 代表静音,1 代表原始音量。
|
|
3455
|
+
*/
|
|
3456
|
+
setVolume(volume: number): void;
|
|
3457
|
+
/**
|
|
3458
|
+
* 获取当前播放音量大小
|
|
3459
|
+
* @returns 当前播放音量大小
|
|
3460
|
+
*/
|
|
3461
|
+
getVolume(): number;
|
|
3462
|
+
/**
|
|
3463
|
+
* 获取本地音频轨道的音量等级。
|
|
3464
|
+
* @returns 音量等级值,范围 [0, 1],1 代表理论最大音量。通常该值大于 0.6 代表用户在持续说话。
|
|
3465
|
+
*/
|
|
3466
|
+
getVolumeLevel(): number;
|
|
3467
|
+
/**
|
|
3468
|
+
* 播放本地音频轨道。
|
|
3469
|
+
*/
|
|
3470
|
+
play(): void;
|
|
3471
|
+
}
|
|
3472
|
+
/**
|
|
3473
|
+
* 本地摄像头视频轨道,继承于 LocalVideoTrack,并在此基础上提供了更换采集设备/调整编码参数的功能。
|
|
3474
|
+
*/
|
|
3475
|
+
declare class CameraVideoTrack extends LocalVideoTrack {
|
|
3476
|
+
/**
|
|
3477
|
+
* @internal
|
|
3478
|
+
*/
|
|
3479
|
+
constructor(mediaStreamTrack: MediaStreamTrack, config: CameraVideoTrackConfig);
|
|
3480
|
+
}
|
|
3481
|
+
/**
|
|
3482
|
+
* 本地麦克风音频轨道
|
|
3483
|
+
*/
|
|
3484
|
+
declare class MicrophoneAudioTrack extends LocalAudioTrack {
|
|
3485
|
+
/**
|
|
3486
|
+
* @internal
|
|
3487
|
+
*/
|
|
3488
|
+
constructor(mediaStreamTrack: MediaStreamTrack, config?: MicrophoneAudioTrackConfig);
|
|
3489
|
+
/**
|
|
3490
|
+
* 设置播放音量大小
|
|
3491
|
+
* @param volume 音量值,范围 [0, 1],0 代表静音,1 代表原始音量。
|
|
3492
|
+
*/
|
|
3493
|
+
setVolume(volume: number): void;
|
|
3494
|
+
/**
|
|
3495
|
+
* 获取当前播放音量大小
|
|
3496
|
+
* @returns 当前播放音量大小
|
|
3497
|
+
* @internal
|
|
3498
|
+
*/
|
|
3499
|
+
getVolume(): number;
|
|
3500
|
+
}
|
|
3501
|
+
|
|
3502
|
+
/**
|
|
3503
|
+
* 远端轨道对象的基础类,为远端音频轨道 RemoteAudioTrack 和远端视频轨道 RemoteVideoTrack 提供一些公共的方法。
|
|
3504
|
+
*/
|
|
3505
|
+
declare class RemoteTrack extends Track {
|
|
3506
|
+
protected readonly userId: string;
|
|
3507
|
+
/**
|
|
3508
|
+
* @internal
|
|
3509
|
+
*/
|
|
3510
|
+
subscription: Subscription;
|
|
3511
|
+
/**
|
|
3512
|
+
* @internal
|
|
3513
|
+
*/
|
|
3514
|
+
constructor(mediaStreamTrack: MediaStreamTrack, userId: string, mediaStream?: MediaStream);
|
|
3515
|
+
getUserId(): string;
|
|
3516
|
+
private onFirstFrame;
|
|
3517
|
+
/**
|
|
3518
|
+
* @internal
|
|
3519
|
+
*/
|
|
3520
|
+
attachSubscription(subscription: Subscription): void;
|
|
3521
|
+
}
|
|
3522
|
+
/**
|
|
3523
|
+
* 远端音频轨道,调用 subscribe 后通过 DingRTCRemoteUser.audioTrack 对象获取
|
|
3524
|
+
*/
|
|
3525
|
+
declare class RemoteAudioTrack extends RemoteTrack {
|
|
3526
|
+
/**
|
|
3527
|
+
* 扬声器关联设备Id
|
|
3528
|
+
*/
|
|
3529
|
+
deviceId: string;
|
|
3530
|
+
/**
|
|
3531
|
+
* @internal
|
|
3532
|
+
*/
|
|
3533
|
+
constructor(mediaStreamTrack: MediaStreamTrack, userId: string, mediaStream?: MediaStream);
|
|
3534
|
+
getMediaStreamTrack(): MediaStreamTrack;
|
|
3535
|
+
/**
|
|
3536
|
+
* 替换音视频轨道
|
|
3537
|
+
* @param track 音视频轨道
|
|
3538
|
+
* @param stopOldTrack 是否停止上一个轨道
|
|
3539
|
+
*/
|
|
3540
|
+
replaceStream(stream: MediaStream, stopOldTrack?: boolean): void;
|
|
3541
|
+
/**
|
|
3542
|
+
* 设置播放音量大小
|
|
3543
|
+
* @param volume 音量值,范围 [0, 1],0 代表静音,1 代表原始音量。
|
|
3544
|
+
*/
|
|
3545
|
+
setVolume(volume: number): void;
|
|
3546
|
+
/**
|
|
3547
|
+
* 获取当前播放音量大小
|
|
3548
|
+
* @returns 当前播放音量大小
|
|
3549
|
+
*/
|
|
3550
|
+
getVolume(): number;
|
|
3551
|
+
/**
|
|
3552
|
+
* 设置声音输出设备
|
|
3553
|
+
* @param deviceId 设备标识, 通过 getSpeakers() 获取。
|
|
3554
|
+
*/
|
|
3555
|
+
setSpeaker(deviceId: string): Promise<void>;
|
|
3556
|
+
/**
|
|
3557
|
+
* 获取远端音频轨道的音量等级。
|
|
3558
|
+
*/
|
|
3559
|
+
getVolumeLevel(): number;
|
|
3560
|
+
/**
|
|
3561
|
+
* 播放远端音频轨道。
|
|
3562
|
+
*/
|
|
3563
|
+
play(): void;
|
|
3564
|
+
}
|
|
3565
|
+
/**
|
|
3566
|
+
* 远端视频轨道。
|
|
3567
|
+
*
|
|
3568
|
+
* 调用 subscribe 后通过 DingRTCRemoteUser.videoTrack 对象获取。
|
|
3569
|
+
*/
|
|
3570
|
+
declare class RemoteVideoTrack extends RemoteTrack {
|
|
3571
|
+
/**
|
|
3572
|
+
* @internal
|
|
3573
|
+
*/
|
|
3574
|
+
constructor(mediaStreamTrack: MediaStreamTrack, userId: string);
|
|
3575
|
+
/**
|
|
3576
|
+
* 在页面上播放媒体轨道
|
|
3577
|
+
* @param element 指定一个 DOM 元素,SDK 将在这个元素下创建video元素播放视频轨道,支持 2 种类型
|
|
3578
|
+
* - string: 指定该 DOM 元素的 ID 值。
|
|
3579
|
+
* - HTMLElement: 直接传入一个 DOM 元素对象。
|
|
3580
|
+
* @param config 视频媒体播放参数
|
|
3581
|
+
*/
|
|
3582
|
+
play(element: string | HTMLElement, config?: VideoPlayerConfig): void;
|
|
3583
|
+
/**
|
|
3584
|
+
* @internal
|
|
3585
|
+
* 响应镜像播放
|
|
3586
|
+
*/
|
|
3587
|
+
setSourceMirror(mirror: boolean): void;
|
|
3588
|
+
/**
|
|
3589
|
+
* 获取当前视频帧数据
|
|
3590
|
+
* @returns 'image/png' 类型的 dataURL
|
|
3591
|
+
*/
|
|
3592
|
+
getCurrentFrameData(): string;
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3595
|
+
/**
|
|
3596
|
+
*
|
|
3597
|
+
* Copyright (c) Alibaba-inc. All rights reserved.
|
|
3598
|
+
*
|
|
3599
|
+
* 音视频通信RTC(Real-Time Communication)是阿里云覆盖全球的实时音视频开发平台,提供高可用、高品质、超低延时的实时网络服务,适用于在线教育、互动娱乐、视频会议、保险定损、调度指挥等场景。
|
|
3600
|
+
* 使用阿里云RTC web SDK,您可以在Web端快速搭建互通互联的实时音视频应用。
|
|
3601
|
+
*
|
|
3602
|
+
* @remarks 请务必使用 HTTPS 协议或者 localhost,否则 SDK 无法正常工作。
|
|
3603
|
+
*
|
|
3604
|
+
* @packageDocumentation
|
|
3605
|
+
*/
|
|
3606
|
+
/**
|
|
3607
|
+
* DingRTC 是 Web SDK 中所有可调用方法的入口。
|
|
3608
|
+
* @public
|
|
3609
|
+
*/
|
|
3610
|
+
declare class DingRTC extends EventEmitter<IGlobalEvent> {
|
|
3611
|
+
VERSION: string;
|
|
3612
|
+
/**
|
|
3613
|
+
* @internal
|
|
3614
|
+
*/
|
|
3615
|
+
constructor();
|
|
3616
|
+
/**
|
|
3617
|
+
* 创建一个客户端实例以进行 RTC 通信
|
|
3618
|
+
*/
|
|
3619
|
+
createClient(): DingRTCClient;
|
|
3620
|
+
/**
|
|
3621
|
+
* 检查 DingRtc Web SDK 对正在使用的浏览器的适配情况。
|
|
3622
|
+
*
|
|
3623
|
+
* @remarks 该方法必须在创建客户端对象 createClient 之前调用。
|
|
3624
|
+
* @returns 是否支持当前浏览器。
|
|
3625
|
+
*/
|
|
3626
|
+
checkSystemRequirements(): boolean;
|
|
3627
|
+
/**
|
|
3628
|
+
* 获取 DingRtc Web SDK 对正在使用的浏览器支持的编解码格式。
|
|
3629
|
+
*
|
|
3630
|
+
* @remarks 部分安卓手机h264与其他平台存在无法互通问题,对于这部分建议使用VP8
|
|
3631
|
+
* @returns 支持的音视频编解码格式
|
|
3632
|
+
*/
|
|
3633
|
+
getSupportedCodec(): Promise<{
|
|
3634
|
+
audio: string[];
|
|
3635
|
+
video: string[];
|
|
3636
|
+
}>;
|
|
3637
|
+
/**
|
|
3638
|
+
* 通过摄像头采集的视频创建一个视频轨道。
|
|
3639
|
+
* @param config 采集视频的配置,包括采集设备、编码配置等。
|
|
3640
|
+
* @returns 视频轨道
|
|
3641
|
+
*/
|
|
3642
|
+
createCameraVideoTrack(config: CameraVideoTrackConfig): Promise<CameraVideoTrack>;
|
|
3643
|
+
/**
|
|
3644
|
+
* 通过麦克风采集的音频创建一个音频轨道。
|
|
3645
|
+
* @param config 麦克风采集音频的配置,包括采集设备、音频编码配置等
|
|
3646
|
+
* @returns 音频轨道
|
|
3647
|
+
*/
|
|
3648
|
+
createMicrophoneAudioTrack(config?: MicrophoneAudioTrackConfig): Promise<MicrophoneAudioTrack>;
|
|
3649
|
+
/**
|
|
3650
|
+
* 创建一个自定义的视频轨道。
|
|
3651
|
+
* 你可以使用这个方法将自己维护的 MediaStreamTrack 转换成一个可以用于 SDK 的视频轨道。
|
|
3652
|
+
* @param config 自定义视频轨道的配置
|
|
3653
|
+
* @returns 自定义视频轨道
|
|
3654
|
+
*/
|
|
3655
|
+
createCustomVideoTrack(config: CustomVideoTrackConfig): Promise<LocalVideoTrack>;
|
|
3656
|
+
/**
|
|
3657
|
+
* 创建一个自定义的音频轨道。
|
|
3658
|
+
* 你可以使用这个方法将自己维护的 MediaStreamTrack 转换成一个可以用于 SDK 的音频轨道。
|
|
3659
|
+
* @param config 自定义音频的配置
|
|
3660
|
+
* @returns 自定义音频轨道
|
|
3661
|
+
*/
|
|
3662
|
+
createCustomAudioTrack(config: CustomAudioTrackConfig): Promise<LocalAudioTrack>;
|
|
3663
|
+
/**
|
|
3664
|
+
* 创建用于屏幕共享的视频轨道。
|
|
3665
|
+
* @param config 屏幕共享的视频配置,包括编码配置、采集配置等。
|
|
3666
|
+
* @returns 如果 config.withAudio 为 'enable',则返回一个数组,第一个元素是屏幕共享的视频轨道,第二个元素是屏幕共享的音频轨道。否则返回一个数组,只有一个元素,即屏幕共享的视频轨道。
|
|
3667
|
+
*/
|
|
3668
|
+
createScreenVideoTrack(config: ScreenVideoTrackConfig): Promise<(LocalVideoTrack | LocalAudioTrack)[]>;
|
|
3669
|
+
/**
|
|
3670
|
+
* 同时创建麦克风音频轨道和摄像头视频轨道。
|
|
3671
|
+
* 通过麦克风采集的音频创建一个音频轨道,同时通过摄像头采集的视频创建一个视频轨道。
|
|
3672
|
+
* @param videoConfig 采集音频的配置,包括采集设备、编码配置等。
|
|
3673
|
+
* @param audioConfig 采集视频的配置,包括采集设备、编码配置等。
|
|
3674
|
+
* @returns 创建的音频轨道和视频轨道
|
|
3675
|
+
*/
|
|
3676
|
+
createMicrophoneAndCameraTracks(videoConfig: CameraVideoTrackConfig, audioConfig: MicrophoneAudioTrackConfig): Promise<(CameraVideoTrack | MicrophoneAudioTrack)[]>;
|
|
3677
|
+
/**
|
|
3678
|
+
* 该方法枚举可用的视频输入设备,比如摄像头。
|
|
3679
|
+
* 调用成功后 SDK 会通过 MediaDeviceInfo 对象返回可用的视频输入设备。
|
|
3680
|
+
* @returns 本地所有的视频输入设备列表
|
|
3681
|
+
*/
|
|
3682
|
+
getCameras(): Promise<MediaDeviceInfo[]>;
|
|
3683
|
+
/**
|
|
3684
|
+
* 该方法枚举可用的媒体输入和输出设备,比如麦克风、摄像头、耳机等。 调用成功后 SDK 会通过 MediaDeviceInfo 对象返回可用的媒体设备。
|
|
3685
|
+
*
|
|
3686
|
+
* @remarks - 调用本方法会暂时打开摄像头和麦克风以触发浏览器的媒体设备权限申请。在 Chrome 81+、Firefox、 Safari 等浏览器上,没有媒体设备权限时无法获取到准确的设备信息。
|
|
3687
|
+
* - 即使是对于同一设备,SDK 返回的 MediaDeviceInfo.deviceId 也可能会发生变化,例如用户清除 Cookie 后,deviceId 就会被重置,不建议基于 deviceId 开发业务逻辑。
|
|
3688
|
+
*
|
|
3689
|
+
* @returns {MediaDeviceInfo}
|
|
3690
|
+
*/
|
|
3691
|
+
getDevices(): Promise<MediaDeviceInfo[]>;
|
|
3692
|
+
/**
|
|
3693
|
+
* 该方法枚举可用的音频播放设备,比如扬声器。
|
|
3694
|
+
* 调用成功后 SDK 会通过 MediaDeviceInfo 对象返回可用的音频播放设备。
|
|
3695
|
+
* @returns {MediaDeviceInfo}
|
|
3696
|
+
*/
|
|
3697
|
+
getPlaybackDevices(): Promise<MediaDeviceInfo[]>;
|
|
3698
|
+
/**
|
|
3699
|
+
* 该方法枚举可用的音频输入设备,比如麦克风。
|
|
3700
|
+
* 调用成功后 SDK 会通过 MediaDeviceInfo 对象返回可用的音频输入设备。
|
|
3701
|
+
* @returns {MediaDeviceInfo}
|
|
3702
|
+
*/
|
|
3703
|
+
getMicrophones(): Promise<MediaDeviceInfo[]>;
|
|
3704
|
+
/**
|
|
3705
|
+
* 设置 SDK 的日志输出级别。
|
|
3706
|
+
* @param level 日志输出级别
|
|
3707
|
+
*/
|
|
3708
|
+
setLogLevel(level: LogLevel): void;
|
|
3709
|
+
/**
|
|
3710
|
+
* 设置sdk 集成选项设置
|
|
3711
|
+
* @param config 配置参数
|
|
3712
|
+
*/
|
|
3713
|
+
setClientConfig(config: GlobalClientConfigInfo): void;
|
|
3714
|
+
}
|
|
3715
|
+
declare const _default: DingRTC;
|
|
3716
|
+
|
|
3717
|
+
export { AudioSourceInfo, AudioSourceState, type BufferSourceAudioTrackConfig, CameraVideoTrack, type CameraVideoTrackConfig, type ChannelEvens, type ConnectionState, type CustomAudioTrackConfig, type CustomVideoTrackConfig, type DeviceInfo, DingRTCClient, type DisconnectedReason, FALLBACK_SUB_VIDEO_PROFILE, type GlobalClientConfigInfo, type Group, type GroupAudioRoute, type GroupPropertyUpdateTypes, type GroupUser, type IClientEvents, type ICommonExceptionEvent, type IGlobalEvent, type ISharedChannelInstance, type JoinGroupConfig, type JoinParam, type LeaveGroupConfig, type LocalAudioStates, LocalAudioTrack, LocalTrack, type LocalVideoStates, type LocalVideoStatesMap, LocalVideoTrack, type LogLevel, MicrophoneAudioTrack, type MicrophoneAudioTrackConfig, type NetworkQuality, type OptimizationMode, type RemoteAudioStates, RemoteAudioTrack, type RemoteStreamType, RemoteTrack, User as RemoteUser, type RemoteVideoStates, type RemoteVideoStatesMap, RemoteVideoTrack, type ScreenVideoTrackConfig, type SubscribeParam, type SubscribeResult, Track, type TrackMediaType, type UnsubscribeParam, type VideoDimension, type VideoEncoderConfiguration, type VideoPlayerConfig, VideoSourceInfo, _default as default };
|