mediasoup-client 3.6.59 → 3.6.60

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.
Files changed (86) hide show
  1. package/README.md +17 -3
  2. package/lib/Consumer.d.ts +3 -3
  3. package/lib/Consumer.d.ts.map +1 -1
  4. package/lib/DataConsumer.d.ts +3 -3
  5. package/lib/DataConsumer.d.ts.map +1 -1
  6. package/lib/DataProducer.d.ts +3 -3
  7. package/lib/DataProducer.d.ts.map +1 -1
  8. package/lib/Device.d.ts +3 -3
  9. package/lib/Device.d.ts.map +1 -1
  10. package/lib/EnhancedEventEmitter.d.ts +1 -1
  11. package/lib/EnhancedEventEmitter.d.ts.map +1 -1
  12. package/lib/Producer.d.ts +4 -4
  13. package/lib/Producer.d.ts.map +1 -1
  14. package/lib/RtpParameters.d.ts +11 -11
  15. package/lib/RtpParameters.d.ts.map +1 -1
  16. package/lib/SctpParameters.d.ts +4 -4
  17. package/lib/SctpParameters.d.ts.map +1 -1
  18. package/lib/Transport.d.ts +11 -11
  19. package/lib/Transport.d.ts.map +1 -1
  20. package/lib/handlers/Chrome55.js +6 -6
  21. package/lib/handlers/Chrome67.js +6 -6
  22. package/lib/handlers/Chrome70.d.ts.map +1 -1
  23. package/lib/handlers/Chrome70.js +10 -7
  24. package/lib/handlers/Chrome74.d.ts.map +1 -1
  25. package/lib/handlers/Chrome74.js +10 -7
  26. package/lib/handlers/Edge11.js +6 -6
  27. package/lib/handlers/FakeHandler.d.ts +1 -1
  28. package/lib/handlers/FakeHandler.d.ts.map +1 -1
  29. package/lib/handlers/FakeHandler.js +6 -6
  30. package/lib/handlers/Firefox60.d.ts.map +1 -1
  31. package/lib/handlers/Firefox60.js +10 -7
  32. package/lib/handlers/HandlerInterface.d.ts +11 -11
  33. package/lib/handlers/HandlerInterface.d.ts.map +1 -1
  34. package/lib/handlers/ReactNative.js +6 -6
  35. package/lib/handlers/Safari11.js +6 -6
  36. package/lib/handlers/Safari12.d.ts.map +1 -1
  37. package/lib/handlers/Safari12.js +10 -7
  38. package/lib/index.d.ts +1 -1
  39. package/lib/index.js +1 -1
  40. package/lib/scalabilityModes.d.ts +1 -1
  41. package/lib/scalabilityModes.d.ts.map +1 -1
  42. package/npm-scripts.js +124 -28
  43. package/package.json +17 -5
  44. package/.eslintrc.js +0 -243
  45. package/.github/FUNDING.yml +0 -12
  46. package/.github/ISSUE_TEMPLATE/Bug_Report.md +0 -24
  47. package/.github/ISSUE_TEMPLATE/Feature_Request.md +0 -7
  48. package/.github/ISSUE_TEMPLATE/Support_Question.md +0 -12
  49. package/.travis.yml +0 -26
  50. package/src/Consumer.ts +0 -334
  51. package/src/DataConsumer.ts +0 -271
  52. package/src/DataProducer.ts +0 -291
  53. package/src/Device.ts +0 -584
  54. package/src/EnhancedEventEmitter.ts +0 -133
  55. package/src/Logger.ts +0 -47
  56. package/src/Producer.ts +0 -534
  57. package/src/RtpParameters.ts +0 -326
  58. package/src/SctpParameters.ts +0 -74
  59. package/src/Transport.ts +0 -1275
  60. package/src/errors.ts +0 -45
  61. package/src/handlers/Chrome55.ts +0 -866
  62. package/src/handlers/Chrome67.ts +0 -951
  63. package/src/handlers/Chrome70.ts +0 -964
  64. package/src/handlers/Chrome74.ts +0 -1058
  65. package/src/handlers/Edge11.ts +0 -667
  66. package/src/handlers/FakeHandler.ts +0 -448
  67. package/src/handlers/Firefox60.ts +0 -1040
  68. package/src/handlers/HandlerInterface.ts +0 -162
  69. package/src/handlers/ReactNative.ts +0 -886
  70. package/src/handlers/Safari11.ts +0 -944
  71. package/src/handlers/Safari12.ts +0 -1009
  72. package/src/handlers/ortc/edgeUtils.ts +0 -77
  73. package/src/handlers/sdp/MediaSection.ts +0 -836
  74. package/src/handlers/sdp/RemoteSdp.ts +0 -474
  75. package/src/handlers/sdp/commonUtils.ts +0 -259
  76. package/src/handlers/sdp/plainRtpUtils.ts +0 -58
  77. package/src/handlers/sdp/planBUtils.ts +0 -227
  78. package/src/handlers/sdp/unifiedPlanUtils.ts +0 -188
  79. package/src/index.ts +0 -28
  80. package/src/ortc.ts +0 -1169
  81. package/src/scalabilityModes.ts +0 -27
  82. package/src/types.ts +0 -11
  83. package/src/utils.ts +0 -18
  84. package/test/fakeParameters.js +0 -701
  85. package/test/test.js +0 -1672
  86. package/tsconfig.json +0 -17
@@ -1,326 +0,0 @@
1
- /**
2
- * The RTP capabilities define what mediasoup or an endpoint can receive at
3
- * media level.
4
- */
5
-
6
- export type RtpCapabilities =
7
- {
8
- /**
9
- * Supported media and RTX codecs.
10
- */
11
- codecs?: RtpCodecCapability[];
12
- /**
13
- * Supported RTP header extensions.
14
- */
15
- headerExtensions?: RtpHeaderExtension[];
16
- }
17
-
18
- /**
19
- * Media kind ('audio' or 'video').
20
- */
21
- export type MediaKind = 'audio' | 'video';
22
-
23
- /**
24
- * Provides information on the capabilities of a codec within the RTP
25
- * capabilities. The list of media codecs supported by mediasoup and their
26
- * settings is defined in the supportedRtpCapabilities.ts file.
27
- *
28
- * Exactly one RtpCodecCapability will be present for each supported combination
29
- * of parameters that requires a distinct value of preferredPayloadType. For
30
- * example:
31
- *
32
- * - Multiple H264 codecs, each with their own distinct 'packetization-mode' and
33
- * 'profile-level-id' values.
34
- * - Multiple VP9 codecs, each with their own distinct 'profile-id' value.
35
- *
36
- * RtpCodecCapability entries in the mediaCodecs array of RouterOptions do not
37
- * require preferredPayloadType field (if unset, mediasoup will choose a random
38
- * one). If given, make sure it's in the 96-127 range.
39
- */
40
- export type RtpCodecCapability =
41
- {
42
- /**
43
- * Media kind.
44
- */
45
- kind: MediaKind;
46
- /**
47
- * The codec MIME media type/subtype (e.g. 'audio/opus', 'video/VP8').
48
- */
49
- mimeType: string;
50
- /**
51
- * The preferred RTP payload type.
52
- */
53
- preferredPayloadType?: number;
54
- /**
55
- * Codec clock rate expressed in Hertz.
56
- */
57
- clockRate: number;
58
- /**
59
- * The number of channels supported (e.g. two for stereo). Just for audio.
60
- * Default 1.
61
- */
62
- channels?: number;
63
- /**
64
- * Codec specific parameters. Some parameters (such as 'packetization-mode'
65
- * and 'profile-level-id' in H264 or 'profile-id' in VP9) are critical for
66
- * codec matching.
67
- */
68
- parameters?: any;
69
- /**
70
- * Transport layer and codec-specific feedback messages for this codec.
71
- */
72
- rtcpFeedback?: RtcpFeedback[];
73
- }
74
-
75
- /**
76
- * Direction of RTP header extension.
77
- */
78
- export type RtpHeaderExtensionDirection = 'sendrecv' | 'sendonly' | 'recvonly' | 'inactive';
79
-
80
- /**
81
- * Provides information relating to supported header extensions. The list of
82
- * RTP header extensions supported by mediasoup is defined in the
83
- * supportedRtpCapabilities.ts file.
84
- *
85
- * mediasoup does not currently support encrypted RTP header extensions. The
86
- * direction field is just present in mediasoup RTP capabilities (retrieved via
87
- * router.rtpCapabilities or mediasoup.getSupportedRtpCapabilities()). It's
88
- * ignored if present in endpoints' RTP capabilities.
89
- */
90
- export type RtpHeaderExtension =
91
- {
92
- /**
93
- * Media kind.
94
- */
95
- kind: MediaKind;
96
- /*
97
- * The URI of the RTP header extension, as defined in RFC 5285.
98
- */
99
- uri: string;
100
- /**
101
- * The preferred numeric identifier that goes in the RTP packet. Must be
102
- * unique.
103
- */
104
- preferredId: number;
105
- /**
106
- * If true, it is preferred that the value in the header be encrypted as per
107
- * RFC 6904. Default false.
108
- */
109
- preferredEncrypt?: boolean;
110
- /**
111
- * If 'sendrecv', mediasoup supports sending and receiving this RTP extension.
112
- * 'sendonly' means that mediasoup can send (but not receive) it. 'recvonly'
113
- * means that mediasoup can receive (but not send) it.
114
- */
115
- direction?: RtpHeaderExtensionDirection;
116
- }
117
-
118
- /**
119
- * The RTP send parameters describe a media stream received by mediasoup from
120
- * an endpoint through its corresponding mediasoup Producer. These parameters
121
- * may include a mid value that the mediasoup transport will use to match
122
- * received RTP packets based on their MID RTP extension value.
123
- *
124
- * mediasoup allows RTP send parameters with a single encoding and with multiple
125
- * encodings (simulcast). In the latter case, each entry in the encodings array
126
- * must include a ssrc field or a rid field (the RID RTP extension value). Check
127
- * the Simulcast and SVC sections for more information.
128
- *
129
- * The RTP receive parameters describe a media stream as sent by mediasoup to
130
- * an endpoint through its corresponding mediasoup Consumer. The mid value is
131
- * unset (mediasoup does not include the MID RTP extension into RTP packets
132
- * being sent to endpoints).
133
- *
134
- * There is a single entry in the encodings array (even if the corresponding
135
- * producer uses simulcast). The consumer sends a single and continuous RTP
136
- * stream to the endpoint and spatial/temporal layer selection is possible via
137
- * consumer.setPreferredLayers().
138
- *
139
- * As an exception, previous bullet is not true when consuming a stream over a
140
- * PipeTransport, in which all RTP streams from the associated producer are
141
- * forwarded verbatim through the consumer.
142
- *
143
- * The RTP receive parameters will always have their ssrc values randomly
144
- * generated for all of its encodings (and optional rtx: { ssrc: XXXX } if the
145
- * endpoint supports RTX), regardless of the original RTP send parameters in
146
- * the associated producer. This applies even if the producer's encodings have
147
- * rid set.
148
- */
149
- export type RtpParameters =
150
- {
151
- /**
152
- * The MID RTP extension value as defined in the BUNDLE specification.
153
- */
154
- mid?: string;
155
- /**
156
- * Media and RTX codecs in use.
157
- */
158
- codecs: RtpCodecParameters[];
159
- /**
160
- * RTP header extensions in use.
161
- */
162
- headerExtensions?: RtpHeaderExtensionParameters[];
163
- /**
164
- * Transmitted RTP streams and their settings.
165
- */
166
- encodings?: RtpEncodingParameters[];
167
- /**
168
- * Parameters used for RTCP.
169
- */
170
- rtcp?: RtcpParameters;
171
- }
172
-
173
- /**
174
- * Provides information on codec settings within the RTP parameters. The list
175
- * of media codecs supported by mediasoup and their settings is defined in the
176
- * supportedRtpCapabilities.ts file.
177
- */
178
- export type RtpCodecParameters =
179
- {
180
- /**
181
- * The codec MIME media type/subtype (e.g. 'audio/opus', 'video/VP8').
182
- */
183
- mimeType: string;
184
- /**
185
- * The value that goes in the RTP Payload Type Field. Must be unique.
186
- */
187
- payloadType: number;
188
- /**
189
- * Codec clock rate expressed in Hertz.
190
- */
191
- clockRate: number;
192
- /**
193
- * The number of channels supported (e.g. two for stereo). Just for audio.
194
- * Default 1.
195
- */
196
- channels?: number;
197
- /**
198
- * Codec-specific parameters available for signaling. Some parameters (such
199
- * as 'packetization-mode' and 'profile-level-id' in H264 or 'profile-id' in
200
- * VP9) are critical for codec matching.
201
- */
202
- parameters?: any;
203
- /**
204
- * Transport layer and codec-specific feedback messages for this codec.
205
- */
206
- rtcpFeedback?: RtcpFeedback[];
207
- }
208
-
209
- /**
210
- * Provides information on RTCP feedback messages for a specific codec. Those
211
- * messages can be transport layer feedback messages or codec-specific feedback
212
- * messages. The list of RTCP feedbacks supported by mediasoup is defined in the
213
- * supportedRtpCapabilities.ts file.
214
- */
215
- export type RtcpFeedback =
216
- {
217
- /**
218
- * RTCP feedback type.
219
- */
220
- type: string;
221
- /**
222
- * RTCP feedback parameter.
223
- */
224
- parameter?: string;
225
- }
226
-
227
- /**
228
- * Provides information relating to an encoding, which represents a media RTP
229
- * stream and its associated RTX stream (if any).
230
- */
231
- export type RtpEncodingParameters =
232
- {
233
- /**
234
- * The media SSRC.
235
- */
236
- ssrc?: number;
237
- /**
238
- * The RID RTP extension value. Must be unique.
239
- */
240
- rid?: string;
241
- /**
242
- * Codec payload type this encoding affects. If unset, first media codec is
243
- * chosen.
244
- */
245
- codecPayloadType?: number;
246
- /**
247
- * RTX stream information. It must contain a numeric ssrc field indicating
248
- * the RTX SSRC.
249
- */
250
- rtx?: { ssrc: number };
251
- /**
252
- * It indicates whether discontinuous RTP transmission will be used. Useful
253
- * for audio (if the codec supports it) and for video screen sharing (when
254
- * static content is being transmitted, this option disables the RTP
255
- * inactivity checks in mediasoup). Default false.
256
- */
257
- dtx?: boolean;
258
- /**
259
- * Number of spatial and temporal layers in the RTP stream (e.g. 'L1T3').
260
- * See webrtc-svc.
261
- */
262
- scalabilityMode?: string;
263
- /**
264
- * Others.
265
- */
266
- scaleResolutionDownBy?: number;
267
- maxBitrate?: number;
268
- maxFramerate?: number;
269
- adaptivePtime?: boolean;
270
- priority?: 'very-low' | 'low' | 'medium' | 'high';
271
- networkPriority?: 'very-low' | 'low' | 'medium' | 'high';
272
- }
273
-
274
- /**
275
- * Defines a RTP header extension within the RTP parameters. The list of RTP
276
- * header extensions supported by mediasoup is defined in the
277
- * supportedRtpCapabilities.ts file.
278
- *
279
- * mediasoup does not currently support encrypted RTP header extensions and no
280
- * parameters are currently considered.
281
- */
282
- export type RtpHeaderExtensionParameters =
283
- {
284
- /**
285
- * The URI of the RTP header extension, as defined in RFC 5285.
286
- */
287
- uri: string;
288
- /**
289
- * The numeric identifier that goes in the RTP packet. Must be unique.
290
- */
291
- id: number;
292
- /**
293
- * If true, the value in the header is encrypted as per RFC 6904. Default false.
294
- */
295
- encrypt?: boolean;
296
- /**
297
- * Configuration parameters for the header extension.
298
- */
299
- parameters?: any;
300
- }
301
-
302
- /**
303
- * Provides information on RTCP settings within the RTP parameters.
304
- *
305
- * If no cname is given in a producer's RTP parameters, the mediasoup transport
306
- * will choose a random one that will be used into RTCP SDES messages sent to
307
- * all its associated consumers.
308
- *
309
- * mediasoup assumes reducedSize to always be true.
310
- */
311
- export type RtcpParameters =
312
- {
313
- /**
314
- * The Canonical Name (CNAME) used by RTCP (e.g. in SDES messages).
315
- */
316
- cname?: string;
317
- /**
318
- * Whether reduced size RTCP RFC 5506 is configured (if true) or compound RTCP
319
- * as specified in RFC 3550 (if false). Default true.
320
- */
321
- reducedSize?: boolean;
322
- /**
323
- * Whether RTCP-mux is used. Default true.
324
- */
325
- mux?: boolean;
326
- }
@@ -1,74 +0,0 @@
1
- export type SctpCapabilities =
2
- {
3
- numStreams: NumSctpStreams;
4
- }
5
-
6
- export type NumSctpStreams =
7
- {
8
- /**
9
- * Initially requested number of outgoing SCTP streams.
10
- */
11
- OS: number;
12
- /**
13
- * Maximum number of incoming SCTP streams.
14
- */
15
- MIS: number;
16
- }
17
-
18
- export type SctpParameters =
19
- {
20
- /**
21
- * Must always equal 5000.
22
- */
23
- port: number;
24
- /**
25
- * Initially requested number of outgoing SCTP streams.
26
- */
27
- OS: number;
28
- /**
29
- * Maximum number of incoming SCTP streams.
30
- */
31
- MIS: number;
32
- /**
33
- * Maximum allowed size for SCTP messages.
34
- */
35
- maxMessageSize: number;
36
- }
37
-
38
- /**
39
- * SCTP stream parameters describe the reliability of a certain SCTP stream.
40
- * If ordered is true then maxPacketLifeTime and maxRetransmits must be
41
- * false.
42
- * If ordered if false, only one of maxPacketLifeTime or maxRetransmits
43
- * can be true.
44
- */
45
- export type SctpStreamParameters =
46
- {
47
- /**
48
- * SCTP stream id.
49
- */
50
- streamId?: number;
51
- /**
52
- * Whether data messages must be received in order. if true the messages will
53
- * be sent reliably. Default true.
54
- */
55
- ordered?: boolean;
56
- /**
57
- * When ordered is false indicates the time (in milliseconds) after which a
58
- * SCTP packet will stop being retransmitted.
59
- */
60
- maxPacketLifeTime?: number;
61
- /**
62
- * When ordered is false indicates the maximum number of times a packet will
63
- * be retransmitted.
64
- */
65
- maxRetransmits?: number;
66
- /**
67
- * A label which can be used to distinguish this DataChannel from others.
68
- */
69
- label?: string;
70
- /**
71
- * Name of the sub-protocol used by this DataChannel.
72
- */
73
- protocol?: string;
74
- }