|
@@ -6,6 +6,8 @@ import { expandSourcesFromJson } from '../xmpp/JingleHelperFunctions';
|
6
|
6
|
|
7
|
7
|
import SDP from './SDP';
|
8
|
8
|
|
|
9
|
+/* eslint-disable max-len*/
|
|
10
|
+
|
9
|
11
|
/**
|
10
|
12
|
* @param {string} xml - raw xml of the stanza
|
11
|
13
|
*/
|
|
@@ -18,7 +20,6 @@ describe('SDP', () => {
|
18
|
20
|
FeatureFlags.init({ });
|
19
|
21
|
});
|
20
|
22
|
describe('toJingle', () => {
|
21
|
|
- /* eslint-disable max-len*/
|
22
|
23
|
const testSdp = [
|
23
|
24
|
'v=0\r\n',
|
24
|
25
|
'o=thisisadapterortc 2719486166053431 0 IN IP4 127.0.0.1\r\n',
|
|
@@ -79,7 +80,6 @@ describe('SDP', () => {
|
79
|
80
|
'a=ssrc-group:FID 4004 4005\r\n',
|
80
|
81
|
'a=rtcp-mux\r\n'
|
81
|
82
|
].join('');
|
82
|
|
- /* eslint-enable max-len*/
|
83
|
83
|
|
84
|
84
|
it('correctly groups ssrcs lines that are not in order', () => {
|
85
|
85
|
const sdp = new SDP(testSdp);
|
|
@@ -95,7 +95,7 @@ describe('SDP', () => {
|
95
|
95
|
sid: 'temp-sid'
|
96
|
96
|
});
|
97
|
97
|
|
98
|
|
- sdp.toJingle(accept, false);
|
|
98
|
+ sdp.toJingle(accept, 'responder');
|
99
|
99
|
|
100
|
100
|
const { nodeTree } = accept;
|
101
|
101
|
const videoSources = nodeTree.querySelectorAll('description[media=\'video\']>source');
|
|
@@ -118,7 +118,7 @@ describe('SDP', () => {
|
118
|
118
|
sid: 'temp-sid'
|
119
|
119
|
});
|
120
|
120
|
|
121
|
|
- sdp.toJingle(accept, false);
|
|
121
|
+ sdp.toJingle(accept, 'responder');
|
122
|
122
|
|
123
|
123
|
const { nodeTree } = accept;
|
124
|
124
|
|
|
@@ -135,8 +135,869 @@ describe('SDP', () => {
|
135
|
135
|
});
|
136
|
136
|
});
|
137
|
137
|
|
|
138
|
+ describe('toJingle for multiple m-lines', () => {
|
|
139
|
+ const testSdp = [
|
|
140
|
+ 'v=0\r\n',
|
|
141
|
+ 'o=- 6251210045590020951 2 IN IP4 127.0.0.1\r\n',
|
|
142
|
+ 's=-\r\n',
|
|
143
|
+ 't=0 0\r\n',
|
|
144
|
+ 'a=msid-semantic: WMS\r\n',
|
|
145
|
+ 'a=group:BUNDLE 0 1 2\r\n',
|
|
146
|
+ 'm=audio 9 UDP/TLS/RTP/SAVPF 111 126\r\n',
|
|
147
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
148
|
+ 'a=rtpmap:111 opus/48000/2\r\n',
|
|
149
|
+ 'a=rtpmap:126 telephone-event/8000\r\n',
|
|
150
|
+ 'a=fmtp:111 minptime=10;useinbandfec=1\r\n',
|
|
151
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
152
|
+ 'a=rtcp-fb:111 transport-cc\r\n',
|
|
153
|
+ 'a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n',
|
|
154
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
155
|
+ 'a=setup:active\r\n',
|
|
156
|
+ 'a=mid:0\r\n',
|
|
157
|
+ 'a=msid:- 5caf9eeb-f846-43cf-8868-78ed2e0fea74\r\n',
|
|
158
|
+ 'a=sendrecv\r\n',
|
|
159
|
+ 'a=ice-ufrag:gi+W\r\n',
|
|
160
|
+ 'a=ice-pwd:NmFZJ6NWoC2gjagIudLFWI8Q\r\n',
|
|
161
|
+ 'a=fingerprint:sha-256 41:1D:49:50:40:0D:68:9F:C6:AB:B2:14:98:67:E7:06:70:F0:B2:4A:5C:AB:03:F3:89:AF:B0:11:AF:05:2D:D6\r\n',
|
|
162
|
+ 'a=ice-options:trickle\r\n',
|
|
163
|
+ 'a=ssrc:3134174615 cname:Ypjacq/wapOqDJKy\r\n',
|
|
164
|
+ 'a=rtcp-mux\r\n',
|
|
165
|
+ 'a=extmap-allow-mixed\r\n',
|
|
166
|
+ 'm=video 9 UDP/TLS/RTP/SAVPF 101 97 100 96 107 99 41 42\r\n',
|
|
167
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
168
|
+ 'a=rtpmap:101 VP9/90000\r\n',
|
|
169
|
+ 'a=rtpmap:97 rtx/90000\r\n',
|
|
170
|
+ 'a=rtpmap:100 VP8/90000\r\n',
|
|
171
|
+ 'a=rtpmap:96 rtx/90000\r\n',
|
|
172
|
+ 'a=rtpmap:107 H264/90000\r\n',
|
|
173
|
+ 'a=rtpmap:99 rtx/90000\r\n',
|
|
174
|
+ 'a=rtpmap:41 AV1/90000\r\n',
|
|
175
|
+ 'a=rtpmap:42 rtx/90000\r\n',
|
|
176
|
+ 'a=fmtp:101 profile-id=0\r\n',
|
|
177
|
+ 'a=fmtp:97 apt=101\r\n',
|
|
178
|
+ 'a=fmtp:96 apt=100\r\n',
|
|
179
|
+ 'a=fmtp:107 ;level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\n',
|
|
180
|
+ 'a=fmtp:99 apt=107\r\n',
|
|
181
|
+ 'a=fmtp:41 level-idx=5;profile=0;tier=0\r\n',
|
|
182
|
+ 'a=fmtp:42 apt=41\r\n',
|
|
183
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
184
|
+ 'a=rtcp-fb:101 ccm fir\r\n',
|
|
185
|
+ 'a=rtcp-fb:101 nack\r\n',
|
|
186
|
+ 'a=rtcp-fb:101 nack pli\r\n',
|
|
187
|
+ 'a=rtcp-fb:101 transport-cc\r\n',
|
|
188
|
+ 'a=rtcp-fb:97 ccm fir\r\n',
|
|
189
|
+ 'a=rtcp-fb:97 nack\r\n',
|
|
190
|
+ 'a=rtcp-fb:97 nack pli\r\n',
|
|
191
|
+ 'a=rtcp-fb:100 ccm fir\r\n',
|
|
192
|
+ 'a=rtcp-fb:100 nack\r\n',
|
|
193
|
+ 'a=rtcp-fb:100 nack pli\r\n',
|
|
194
|
+ 'a=rtcp-fb:100 transport-cc\r\n',
|
|
195
|
+ 'a=rtcp-fb:96 ccm fir\r\n',
|
|
196
|
+ 'a=rtcp-fb:96 nack\r\n',
|
|
197
|
+ 'a=rtcp-fb:96 nack pli\r\n',
|
|
198
|
+ 'a=rtcp-fb:107 ccm fir\r\n',
|
|
199
|
+ 'a=rtcp-fb:107 nack\r\n',
|
|
200
|
+ 'a=rtcp-fb:107 nack pli\r\n',
|
|
201
|
+ 'a=rtcp-fb:107 transport-cc\r\n',
|
|
202
|
+ 'a=rtcp-fb:41 ccm fir\r\n',
|
|
203
|
+ 'a=rtcp-fb:41 nack\r\n',
|
|
204
|
+ 'a=rtcp-fb:41 nack pli\r\n',
|
|
205
|
+ 'a=rtcp-fb:41 transport-cc\r\n',
|
|
206
|
+ 'a=rtcp-fb:42 ccm fir\r\n',
|
|
207
|
+ 'a=rtcp-fb:42 nack\r\n',
|
|
208
|
+ 'a=rtcp-fb:42 nack pli\r\n',
|
|
209
|
+ 'a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n',
|
|
210
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
211
|
+ 'a=setup:active\r\n',
|
|
212
|
+ 'a=mid:1\r\n',
|
|
213
|
+ 'a=msid:- 84615c77-2441-4d1f-801d-591a4bc1beaa\r\n',
|
|
214
|
+ 'a=sendrecv\r\n',
|
|
215
|
+ 'a=ice-ufrag:gi+W\r\n',
|
|
216
|
+ 'a=ice-pwd:NmFZJ6NWoC2gjagIudLFWI8Q\r\n',
|
|
217
|
+ 'a=fingerprint:sha-256 41:1D:49:50:40:0D:68:9F:C6:AB:B2:14:98:67:E7:06:70:F0:B2:4A:5C:AB:03:F3:89:AF:B0:11:AF:05:2D:D6\r\n',
|
|
218
|
+ 'a=ice-options:trickle\r\n',
|
|
219
|
+ 'a=ssrc:691901703 cname:Ypjacq/wapOqDJKy\r\n',
|
|
220
|
+ 'a=ssrc:3967743536 cname:Ypjacq/wapOqDJKy\r\n',
|
|
221
|
+ 'a=ssrc:691901703 msid:- 84615c77-2441-4d1f-801d-591a4bc1beaa\r\n',
|
|
222
|
+ 'a=ssrc:3967743536 msid:- 84615c77-2441-4d1f-801d-591a4bc1beaa\r\n',
|
|
223
|
+ 'a=ssrc:4098097822 cname:Ypjacq/wapOqDJKy\r\n',
|
|
224
|
+ 'a=ssrc:4098097822 msid:- 84615c77-2441-4d1f-801d-591a4bc1beaa\r\n',
|
|
225
|
+ 'a=ssrc:731566086 cname:Ypjacq/wapOqDJKy\r\n',
|
|
226
|
+ 'a=ssrc:731566086 msid:- 84615c77-2441-4d1f-801d-591a4bc1beaa\r\n',
|
|
227
|
+ 'a=ssrc:2374965413 cname:Ypjacq/wapOqDJKy\r\n',
|
|
228
|
+ 'a=ssrc:2374965413 msid:- 84615c77-2441-4d1f-801d-591a4bc1beaa\r\n',
|
|
229
|
+ 'a=ssrc:3680614139 cname:Ypjacq/wapOqDJKy\r\n',
|
|
230
|
+ 'a=ssrc:3680614139 msid:- 84615c77-2441-4d1f-801d-591a4bc1beaa\r\n',
|
|
231
|
+ 'a=ssrc-group:FID 691901703 3967743536\r\n',
|
|
232
|
+ 'a=ssrc-group:SIM 691901703 4098097822 731566086\r\n',
|
|
233
|
+ 'a=ssrc-group:FID 4098097822 2374965413\r\n',
|
|
234
|
+ 'a=ssrc-group:FID 731566086 3680614139\r\n',
|
|
235
|
+ 'a=rtcp-mux\r\n',
|
|
236
|
+ 'a=extmap-allow-mixed\r\n',
|
|
237
|
+ 'm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\n',
|
|
238
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
239
|
+ 'a=setup:active\r\n',
|
|
240
|
+ 'a=mid:2\r\n',
|
|
241
|
+ 'a=ice-ufrag:gi+W\r\n',
|
|
242
|
+ 'a=ice-pwd:NmFZJ6NWoC2gjagIudLFWI8Q\r\n',
|
|
243
|
+ 'a=fingerprint:sha-256 41:1D:49:50:40:0D:68:9F:C6:AB:B2:14:98:67:E7:06:70:F0:B2:4A:5C:AB:03:F3:89:AF:B0:11:AF:05:2D:D6\r\n',
|
|
244
|
+ 'a=ice-options:trickle\r\n',
|
|
245
|
+ 'a=sctp-port:5000\r\n',
|
|
246
|
+ 'a=max-message-size:262144\r\n'
|
|
247
|
+ ].join('');
|
|
248
|
+
|
|
249
|
+ it('correctly groups ssrcs lines', () => {
|
|
250
|
+ const sdp = new SDP(testSdp);
|
|
251
|
+ const accept = $iq({
|
|
252
|
+ to: 'peerjid',
|
|
253
|
+ type: 'set'
|
|
254
|
+ })
|
|
255
|
+ .c('jingle', {
|
|
256
|
+ xmlns: 'urn:xmpp:jingle:1',
|
|
257
|
+ action: 'session-accept',
|
|
258
|
+ initiator: false,
|
|
259
|
+ responder: true,
|
|
260
|
+ sid: 'temp-sid'
|
|
261
|
+ });
|
|
262
|
+
|
|
263
|
+ sdp.toJingle(accept, 'responder');
|
|
264
|
+ const { nodeTree } = accept;
|
|
265
|
+ const content = nodeTree.querySelectorAll('jingle>content');
|
|
266
|
+
|
|
267
|
+ expect(content.length).toBe(3);
|
|
268
|
+ const videoSources = nodeTree.querySelectorAll('description[media=\'video\']>source');
|
|
269
|
+
|
|
270
|
+ expect(videoSources.length).toBe(6);
|
|
271
|
+ const audioSources = nodeTree.querySelectorAll('description[media=\'audio\']>source');
|
|
272
|
+
|
|
273
|
+ expect(audioSources.length).toBe(1);
|
|
274
|
+ const videoSourceGroups = nodeTree.querySelectorAll('description[media=\'video\']>ssrc-group');
|
|
275
|
+
|
|
276
|
+ expect(videoSourceGroups.length).toBe(4);
|
|
277
|
+ const data = nodeTree.querySelectorAll('jingle>content[name=\'data\']');
|
|
278
|
+
|
|
279
|
+ expect(data.length).toBe(1);
|
|
280
|
+ });
|
|
281
|
+ });
|
|
282
|
+
|
|
283
|
+ describe('toJingle for multiple m-lines with recv-only', () => {
|
|
284
|
+ const testSdp = [
|
|
285
|
+ 'v=0\r\n',
|
|
286
|
+ 'o=- 8014175770430016012 6 IN IP4 127.0.0.1\r\n',
|
|
287
|
+ 's=-\r\n',
|
|
288
|
+ 't=0 0\r\n',
|
|
289
|
+ 'a=msid-semantic: WMS\r\n',
|
|
290
|
+ 'a=group:BUNDLE 0 1 2 3 4 5 6 7\r\n',
|
|
291
|
+ 'm=audio 9 UDP/TLS/RTP/SAVPF 111 126\r\n',
|
|
292
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
293
|
+ 'a=rtpmap:111 opus/48000/2\r\n',
|
|
294
|
+ 'a=rtpmap:126 telephone-event/8000\r\n',
|
|
295
|
+ 'a=fmtp:111 minptime=10;useinbandfec=1\r\n',
|
|
296
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
297
|
+ 'a=rtcp-fb:111 transport-cc\r\n',
|
|
298
|
+ 'a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n',
|
|
299
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
300
|
+ 'a=setup:active\r\n',
|
|
301
|
+ 'a=mid:0\r\n',
|
|
302
|
+ 'a=msid:- 836692af-4ea9-432f-811c-fef6ec7ee612\r\n',
|
|
303
|
+ 'a=sendrecv\r\n',
|
|
304
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
305
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
306
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
307
|
+ 'a=candidate:4240059272 1 UDP 2122260223 x.x.x.x 54192 typ host\r\n',
|
|
308
|
+ 'a=ice-options:trickle\r\n',
|
|
309
|
+ 'a=ssrc:2833013218 cname:0T+Z3AzTbva5NoHF\r\n',
|
|
310
|
+ 'a=ssrc:2833013218 msid:- 836692af-4ea9-432f-811c-fef6ec7ee612\r\n',
|
|
311
|
+ 'a=ssrc:2833013218 name:abcd-a0\r\n',
|
|
312
|
+ 'a=rtcp-mux\r\n',
|
|
313
|
+ 'a=extmap-allow-mixed\r\n',
|
|
314
|
+ 'm=video 9 UDP/TLS/RTP/SAVPF 101 97 100 96 107 99 41 42\r\n',
|
|
315
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
316
|
+ 'a=rtpmap:101 VP9/90000\r\n',
|
|
317
|
+ 'a=rtpmap:97 rtx/90000\r\n',
|
|
318
|
+ 'a=rtpmap:100 VP8/90000\r\n',
|
|
319
|
+ 'a=rtpmap:96 rtx/90000\r\n',
|
|
320
|
+ 'a=rtpmap:107 H264/90000\r\n',
|
|
321
|
+ 'a=rtpmap:99 rtx/90000\r\n',
|
|
322
|
+ 'a=rtpmap:41 AV1/90000\r\n',
|
|
323
|
+ 'a=rtpmap:42 rtx/90000\r\n',
|
|
324
|
+ 'a=fmtp:101 profile-id=0\r\n',
|
|
325
|
+ 'a=fmtp:97 apt=101\r\n',
|
|
326
|
+ 'a=fmtp:96 apt=100\r\n',
|
|
327
|
+ 'a=fmtp:107 ;level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\n',
|
|
328
|
+ 'a=fmtp:99 apt=107\r\n',
|
|
329
|
+ 'a=fmtp:41 level-idx=5;profile=0;tier=0\r\n',
|
|
330
|
+ 'a=fmtp:42 apt=41\r\n',
|
|
331
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
332
|
+ 'a=rtcp-fb:101 ccm fir\r\n',
|
|
333
|
+ 'a=rtcp-fb:101 nack\r\n',
|
|
334
|
+ 'a=rtcp-fb:101 nack pli\r\n',
|
|
335
|
+ 'a=rtcp-fb:101 transport-cc\r\n',
|
|
336
|
+ 'a=rtcp-fb:97 ccm fir\r\n',
|
|
337
|
+ 'a=rtcp-fb:97 nack\r\n',
|
|
338
|
+ 'a=rtcp-fb:97 nack pli\r\n',
|
|
339
|
+ 'a=rtcp-fb:100 ccm fir\r\n',
|
|
340
|
+ 'a=rtcp-fb:100 nack\r\n',
|
|
341
|
+ 'a=rtcp-fb:100 nack pli\r\n',
|
|
342
|
+ 'a=rtcp-fb:100 transport-cc\r\n',
|
|
343
|
+ 'a=rtcp-fb:96 ccm fir\r\n',
|
|
344
|
+ 'a=rtcp-fb:96 nack\r\n',
|
|
345
|
+ 'a=rtcp-fb:96 nack pli\r\n',
|
|
346
|
+ 'a=rtcp-fb:107 ccm fir\r\n',
|
|
347
|
+ 'a=rtcp-fb:107 nack\r\n',
|
|
348
|
+ 'a=rtcp-fb:107 nack pli\r\n',
|
|
349
|
+ 'a=rtcp-fb:107 transport-cc\r\n',
|
|
350
|
+ 'a=rtcp-fb:41 ccm fir\r\n',
|
|
351
|
+ 'a=rtcp-fb:41 nack\r\n',
|
|
352
|
+ 'a=rtcp-fb:41 nack pli\r\n',
|
|
353
|
+ 'a=rtcp-fb:41 transport-cc\r\n',
|
|
354
|
+ 'a=rtcp-fb:42 ccm fir\r\n',
|
|
355
|
+ 'a=rtcp-fb:42 nack\r\n',
|
|
356
|
+ 'a=rtcp-fb:42 nack pli\r\n',
|
|
357
|
+ 'a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n',
|
|
358
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
359
|
+ 'a=setup:active\r\n',
|
|
360
|
+ 'a=mid:1\r\n',
|
|
361
|
+ 'a=msid:- 72254a21-ae73-4c0e-bd47-e84a2d3b9474\r\n',
|
|
362
|
+ 'a=sendrecv\r\n',
|
|
363
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
364
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
365
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
366
|
+ 'a=ice-options:trickle\r\n',
|
|
367
|
+ 'a=ssrc:1261622218 cname:0T+Z3AzTbva5NoHF\r\n',
|
|
368
|
+ 'a=ssrc:1261622218 msid:- 7c3aee52-697e-446e-a898-9ea470a19b27\r\n',
|
|
369
|
+ 'a=ssrc:1261622218 videoType:camera\r\n',
|
|
370
|
+ 'a=ssrc:1261622218 name:abcd-v0\r\n',
|
|
371
|
+ 'a=ssrc:2809057491 cname:0T+Z3AzTbva5NoHF\r\n',
|
|
372
|
+ 'a=ssrc:2809057491 msid:- 7c3aee52-697e-446e-a898-9ea470a19b27\r\n',
|
|
373
|
+ 'a=ssrc:2809057491 videoType:camera\r\n',
|
|
374
|
+ 'a=ssrc:2809057491 name:abcd-v0\r\n',
|
|
375
|
+ 'a=ssrc:4223705690 cname:0T+Z3AzTbva5NoHF\r\n',
|
|
376
|
+ 'a=ssrc:4223705690 msid:- 7c3aee52-697e-446e-a898-9ea470a19b27\r\n',
|
|
377
|
+ 'a=ssrc:4223705690 videoType:camera\r\n',
|
|
378
|
+ 'a=ssrc:4223705690 name:abcd-v0\r\n',
|
|
379
|
+ 'a=ssrc:44482421 cname:0T+Z3AzTbva5NoHF\r\n',
|
|
380
|
+ 'a=ssrc:44482421 msid:- 7c3aee52-697e-446e-a898-9ea470a19b27\r\n',
|
|
381
|
+ 'a=ssrc:44482421 videoType:camera\r\n',
|
|
382
|
+ 'a=ssrc:44482421 name:abcd-v0\r\n',
|
|
383
|
+ 'a=ssrc:1408200021 cname:0T+Z3AzTbva5NoHF\r\n',
|
|
384
|
+ 'a=ssrc:1408200021 msid:- 7c3aee52-697e-446e-a898-9ea470a19b27\r\n',
|
|
385
|
+ 'a=ssrc:1408200021 videoType:camera\r\n',
|
|
386
|
+ 'a=ssrc:1408200021 name:abcd-v0\r\n',
|
|
387
|
+ 'a=ssrc:712505591 cname:0T+Z3AzTbva5NoHF\r\n',
|
|
388
|
+ 'a=ssrc:712505591 msid:- 7c3aee52-697e-446e-a898-9ea470a19b27\r\n',
|
|
389
|
+ 'a=ssrc:712505591 videoType:camera\r\n',
|
|
390
|
+ 'a=ssrc:712505591 name:abcd-v0\r\n',
|
|
391
|
+ 'a=ssrc-group:FID 1261622218 2809057491\r\n',
|
|
392
|
+ 'a=ssrc-group:SIM 1261622218 4223705690 44482421\r\n',
|
|
393
|
+ 'a=ssrc-group:FID 4223705690 1408200021\r\n',
|
|
394
|
+ 'a=ssrc-group:FID 44482421 712505591\r\n',
|
|
395
|
+ 'a=rtcp-mux\r\n',
|
|
396
|
+ 'a=extmap-allow-mixed\r\n',
|
|
397
|
+ 'm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\n',
|
|
398
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
399
|
+ 'a=setup:active\r\n',
|
|
400
|
+ 'a=mid:2\r\n',
|
|
401
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
402
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
403
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
404
|
+ 'a=ice-options:trickle\r\n',
|
|
405
|
+ 'a=sctp-port:5000\r\n',
|
|
406
|
+ 'a=max-message-size:262144\r\n',
|
|
407
|
+ 'm=video 9 UDP/TLS/RTP/SAVPF 101 97 100 96 107 99 41 42\r\n',
|
|
408
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
409
|
+ 'a=rtpmap:101 VP9/90000\r\n',
|
|
410
|
+ 'a=rtpmap:97 rtx/90000\r\n',
|
|
411
|
+ 'a=rtpmap:100 VP8/90000\r\n',
|
|
412
|
+ 'a=rtpmap:96 rtx/90000\r\n',
|
|
413
|
+ 'a=rtpmap:107 H264/90000\r\n',
|
|
414
|
+ 'a=rtpmap:99 rtx/90000\r\n',
|
|
415
|
+ 'a=rtpmap:41 AV1/90000\r\n',
|
|
416
|
+ 'a=rtpmap:42 rtx/90000\r\n',
|
|
417
|
+ 'a=fmtp:101 profile-id=0\r\n',
|
|
418
|
+ 'a=fmtp:97 apt=101\r\n',
|
|
419
|
+ 'a=fmtp:96 apt=100\r\n',
|
|
420
|
+ 'a=fmtp:107 ;level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\n',
|
|
421
|
+ 'a=fmtp:99 apt=107\r\n',
|
|
422
|
+ 'a=fmtp:41 level-idx=5;profile=0;tier=0\r\n',
|
|
423
|
+ 'a=fmtp:42 apt=41\r\n',
|
|
424
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
425
|
+ 'a=rtcp-fb:101 ccm fir\r\n',
|
|
426
|
+ 'a=rtcp-fb:101 nack\r\n',
|
|
427
|
+ 'a=rtcp-fb:101 nack pli\r\n',
|
|
428
|
+ 'a=rtcp-fb:101 transport-cc\r\n',
|
|
429
|
+ 'a=rtcp-fb:97 ccm fir\r\n',
|
|
430
|
+ 'a=rtcp-fb:97 nack\r\n',
|
|
431
|
+ 'a=rtcp-fb:97 nack pli\r\n',
|
|
432
|
+ 'a=rtcp-fb:100 ccm fir\r\n',
|
|
433
|
+ 'a=rtcp-fb:100 nack\r\n',
|
|
434
|
+ 'a=rtcp-fb:100 nack pli\r\n',
|
|
435
|
+ 'a=rtcp-fb:100 transport-cc\r\n',
|
|
436
|
+ 'a=rtcp-fb:96 ccm fir\r\n',
|
|
437
|
+ 'a=rtcp-fb:96 nack\r\n',
|
|
438
|
+ 'a=rtcp-fb:96 nack pli\r\n',
|
|
439
|
+ 'a=rtcp-fb:107 ccm fir\r\n',
|
|
440
|
+ 'a=rtcp-fb:107 nack\r\n',
|
|
441
|
+ 'a=rtcp-fb:107 nack pli\r\n',
|
|
442
|
+ 'a=rtcp-fb:107 transport-cc\r\n',
|
|
443
|
+ 'a=rtcp-fb:41 ccm fir\r\n',
|
|
444
|
+ 'a=rtcp-fb:41 nack\r\n',
|
|
445
|
+ 'a=rtcp-fb:41 nack pli\r\n',
|
|
446
|
+ 'a=rtcp-fb:41 transport-cc\r\n',
|
|
447
|
+ 'a=rtcp-fb:42 ccm fir\r\n',
|
|
448
|
+ 'a=rtcp-fb:42 nack\r\n',
|
|
449
|
+ 'a=rtcp-fb:42 nack pli\r\n',
|
|
450
|
+ 'a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n',
|
|
451
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
452
|
+ 'a=extmap:11 https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension\r\n',
|
|
453
|
+ 'a=setup:active\r\n',
|
|
454
|
+ 'a=mid:3\r\n',
|
|
455
|
+ 'a=recvonly\r\n',
|
|
456
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
457
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
458
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
459
|
+ 'a=ice-options:trickle\r\n',
|
|
460
|
+ 'a=rtcp-mux\r\n',
|
|
461
|
+ 'a=extmap-allow-mixed\r\n',
|
|
462
|
+ 'm=video 9 UDP/TLS/RTP/SAVPF 101 97 100 96 107 99 41 42\r\n',
|
|
463
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
464
|
+ 'a=rtpmap:101 VP9/90000\r\n',
|
|
465
|
+ 'a=rtpmap:97 rtx/90000\r\n',
|
|
466
|
+ 'a=rtpmap:100 VP8/90000\r\n',
|
|
467
|
+ 'a=rtpmap:96 rtx/90000\r\n',
|
|
468
|
+ 'a=rtpmap:107 H264/90000\r\n',
|
|
469
|
+ 'a=rtpmap:99 rtx/90000\r\n',
|
|
470
|
+ 'a=rtpmap:41 AV1/90000\r\n',
|
|
471
|
+ 'a=rtpmap:42 rtx/90000\r\n',
|
|
472
|
+ 'a=fmtp:101 profile-id=0\r\n',
|
|
473
|
+ 'a=fmtp:97 apt=101\r\n',
|
|
474
|
+ 'a=fmtp:96 apt=100\r\n',
|
|
475
|
+ 'a=fmtp:107 ;level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\n',
|
|
476
|
+ 'a=fmtp:99 apt=107\r\n',
|
|
477
|
+ 'a=fmtp:41 level-idx=5;profile=0;tier=0\r\n',
|
|
478
|
+ 'a=fmtp:42 apt=41\r\n',
|
|
479
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
480
|
+ 'a=rtcp-fb:101 ccm fir\r\n',
|
|
481
|
+ 'a=rtcp-fb:101 nack\r\n',
|
|
482
|
+ 'a=rtcp-fb:101 nack pli\r\n',
|
|
483
|
+ 'a=rtcp-fb:101 transport-cc\r\n',
|
|
484
|
+ 'a=rtcp-fb:97 ccm fir\r\n',
|
|
485
|
+ 'a=rtcp-fb:97 nack\r\n',
|
|
486
|
+ 'a=rtcp-fb:97 nack pli\r\n',
|
|
487
|
+ 'a=rtcp-fb:100 ccm fir\r\n',
|
|
488
|
+ 'a=rtcp-fb:100 nack\r\n',
|
|
489
|
+ 'a=rtcp-fb:100 nack pli\r\n',
|
|
490
|
+ 'a=rtcp-fb:100 transport-cc\r\n',
|
|
491
|
+ 'a=rtcp-fb:96 ccm fir\r\n',
|
|
492
|
+ 'a=rtcp-fb:96 nack\r\n',
|
|
493
|
+ 'a=rtcp-fb:96 nack pli\r\n',
|
|
494
|
+ 'a=rtcp-fb:107 ccm fir\r\n',
|
|
495
|
+ 'a=rtcp-fb:107 nack\r\n',
|
|
496
|
+ 'a=rtcp-fb:107 nack pli\r\n',
|
|
497
|
+ 'a=rtcp-fb:107 transport-cc\r\n',
|
|
498
|
+ 'a=rtcp-fb:41 ccm fir\r\n',
|
|
499
|
+ 'a=rtcp-fb:41 nack\r\n',
|
|
500
|
+ 'a=rtcp-fb:41 nack pli\r\n',
|
|
501
|
+ 'a=rtcp-fb:41 transport-cc\r\n',
|
|
502
|
+ 'a=rtcp-fb:42 ccm fir\r\n',
|
|
503
|
+ 'a=rtcp-fb:42 nack\r\n',
|
|
504
|
+ 'a=rtcp-fb:42 nack pli\r\n',
|
|
505
|
+ 'a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n',
|
|
506
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
507
|
+ 'a=extmap:11 https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension\r\n',
|
|
508
|
+ 'a=setup:active\r\n',
|
|
509
|
+ 'a=mid:4\r\n',
|
|
510
|
+ 'a=recvonly\r\n',
|
|
511
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
512
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
513
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
514
|
+ 'a=ice-options:trickle\r\n',
|
|
515
|
+ 'a=rtcp-mux\r\n',
|
|
516
|
+ 'a=extmap-allow-mixed\r\n',
|
|
517
|
+ 'm=audio 9 UDP/TLS/RTP/SAVPF 111 126\r\n',
|
|
518
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
519
|
+ 'a=rtpmap:111 opus/48000/2\r\n',
|
|
520
|
+ 'a=rtpmap:126 telephone-event/8000\r\n',
|
|
521
|
+ 'a=fmtp:111 minptime=10;useinbandfec=1\r\n',
|
|
522
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
523
|
+ 'a=rtcp-fb:111 transport-cc\r\n',
|
|
524
|
+ 'a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n',
|
|
525
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
526
|
+ 'a=setup:active\r\n',
|
|
527
|
+ 'a=mid:5\r\n',
|
|
528
|
+ 'a=recvonly\r\n',
|
|
529
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
530
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
531
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
532
|
+ 'a=ice-options:trickle\r\n',
|
|
533
|
+ 'a=rtcp-mux\r\n',
|
|
534
|
+ 'a=extmap-allow-mixed\r\n',
|
|
535
|
+ 'm=audio 9 UDP/TLS/RTP/SAVPF 111 126\r\n',
|
|
536
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
537
|
+ 'a=rtpmap:111 opus/48000/2\r\n',
|
|
538
|
+ 'a=rtpmap:126 telephone-event/8000\r\n',
|
|
539
|
+ 'a=fmtp:111 minptime=10;useinbandfec=1\r\n',
|
|
540
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
541
|
+ 'a=rtcp-fb:111 transport-cc\r\n',
|
|
542
|
+ 'a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n',
|
|
543
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
544
|
+ 'a=setup:active\r\n',
|
|
545
|
+ 'a=mid:6\r\n',
|
|
546
|
+ 'a=recvonly\r\n',
|
|
547
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
548
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
549
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
550
|
+ 'a=ice-options:trickle\r\n',
|
|
551
|
+ 'a=rtcp-mux\r\n',
|
|
552
|
+ 'a=extmap-allow-mixed\r\n',
|
|
553
|
+ 'm=video 9 UDP/TLS/RTP/SAVPF 101 97 100 96 107 99 41 42\r\n',
|
|
554
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
555
|
+ 'a=rtpmap:101 VP9/90000\r\n',
|
|
556
|
+ 'a=rtpmap:97 rtx/90000\r\n',
|
|
557
|
+ 'a=rtpmap:100 VP8/90000\r\n',
|
|
558
|
+ 'a=rtpmap:96 rtx/90000\r\n',
|
|
559
|
+ 'a=rtpmap:107 H264/90000\r\n',
|
|
560
|
+ 'a=rtpmap:99 rtx/90000\r\n',
|
|
561
|
+ 'a=rtpmap:41 AV1/90000\r\n',
|
|
562
|
+ 'a=rtpmap:42 rtx/90000\r\n',
|
|
563
|
+ 'a=fmtp:101 profile-id=0\r\n',
|
|
564
|
+ 'a=fmtp:97 apt=101\r\n',
|
|
565
|
+ 'a=fmtp:96 apt=100\r\n',
|
|
566
|
+ 'a=fmtp:107 ;level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\n',
|
|
567
|
+ 'a=fmtp:99 apt=107\r\n',
|
|
568
|
+ 'a=fmtp:41 level-idx=5;profile=0;tier=0\r\n',
|
|
569
|
+ 'a=fmtp:42 apt=41\r\n',
|
|
570
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
571
|
+ 'a=rtcp-fb:101 ccm fir\r\n',
|
|
572
|
+ 'a=rtcp-fb:101 nack\r\n',
|
|
573
|
+ 'a=rtcp-fb:101 nack pli\r\n',
|
|
574
|
+ 'a=rtcp-fb:101 transport-cc\r\n',
|
|
575
|
+ 'a=rtcp-fb:97 ccm fir\r\n',
|
|
576
|
+ 'a=rtcp-fb:97 nack\r\n',
|
|
577
|
+ 'a=rtcp-fb:97 nack pli\r\n',
|
|
578
|
+ 'a=rtcp-fb:100 ccm fir\r\n',
|
|
579
|
+ 'a=rtcp-fb:100 nack\r\n',
|
|
580
|
+ 'a=rtcp-fb:100 nack pli\r\n',
|
|
581
|
+ 'a=rtcp-fb:100 transport-cc\r\n',
|
|
582
|
+ 'a=rtcp-fb:96 ccm fir\r\n',
|
|
583
|
+ 'a=rtcp-fb:96 nack\r\n',
|
|
584
|
+ 'a=rtcp-fb:96 nack pli\r\n',
|
|
585
|
+ 'a=rtcp-fb:107 ccm fir\r\n',
|
|
586
|
+ 'a=rtcp-fb:107 nack\r\n',
|
|
587
|
+ 'a=rtcp-fb:107 nack pli\r\n',
|
|
588
|
+ 'a=rtcp-fb:107 transport-cc\r\n',
|
|
589
|
+ 'a=rtcp-fb:41 ccm fir\r\n',
|
|
590
|
+ 'a=rtcp-fb:41 nack\r\n',
|
|
591
|
+ 'a=rtcp-fb:41 nack pli\r\n',
|
|
592
|
+ 'a=rtcp-fb:41 transport-cc\r\n',
|
|
593
|
+ 'a=rtcp-fb:42 ccm fir\r\n',
|
|
594
|
+ 'a=rtcp-fb:42 nack\r\n',
|
|
595
|
+ 'a=rtcp-fb:42 nack pli\r\n',
|
|
596
|
+ 'a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n',
|
|
597
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
598
|
+ 'a=setup:active\r\n',
|
|
599
|
+ 'a=mid:7\r\n',
|
|
600
|
+ 'a=msid:- 7c3aee52-697e-446e-a898-9ea470a19b26\r\n',
|
|
601
|
+ 'a=sendonly\r\n',
|
|
602
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
603
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
604
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
605
|
+ 'a=ice-options:trickle\r\n',
|
|
606
|
+ 'a=ssrc:4074534577 cname:0T+Z3AzTbva5NoHF\r\n',
|
|
607
|
+ 'a=ssrc:4074534577 msid:- 7c3aee52-697e-446e-a898-9ea470a19b26\r\n',
|
|
608
|
+ 'a=ssrc:4074534577 videoType:desktop\r\n',
|
|
609
|
+ 'a=ssrc:4074534577 name:abcd-v1\r\n',
|
|
610
|
+ 'a=ssrc:3122913012 cname:0T+Z3AzTbva5NoHF\r\n',
|
|
611
|
+ 'a=ssrc:3122913012 msid:- 7c3aee52-697e-446e-a898-9ea470a19b26\r\n',
|
|
612
|
+ 'a=ssrc:3122913012 videoType:desktop\r\n',
|
|
613
|
+ 'a=ssrc:3122913012 name:abcd-v1\r\n',
|
|
614
|
+ 'a=ssrc:3145321104 cname:0T+Z3AzTbva5NoHF\r\n',
|
|
615
|
+ 'a=ssrc:3145321104 msid:- 7c3aee52-697e-446e-a898-9ea470a19b26\r\n',
|
|
616
|
+ 'a=ssrc:3145321104 videoType:desktop\r\n',
|
|
617
|
+ 'a=ssrc:3145321104 name:abcd-v1\r\n',
|
|
618
|
+ 'a=ssrc:2686550307 cname:0T+Z3AzTbva5NoHF\r\n',
|
|
619
|
+ 'a=ssrc:2686550307 msid:- 7c3aee52-697e-446e-a898-9ea470a19b26\r\n',
|
|
620
|
+ 'a=ssrc:2686550307 videoType:desktop\r\n',
|
|
621
|
+ 'a=ssrc:2686550307 name:abcd-v1\r\n',
|
|
622
|
+ 'a=ssrc:2960588630 cname:0T+Z3AzTbva5NoHF\r\n',
|
|
623
|
+ 'a=ssrc:2960588630 msid:- 7c3aee52-697e-446e-a898-9ea470a19b26\r\n',
|
|
624
|
+ 'a=ssrc:2960588630 videoType:desktop\r\n',
|
|
625
|
+ 'a=ssrc:2960588630 name:abcd-v1\r\n',
|
|
626
|
+ 'a=ssrc:3495860096 cname:0T+Z3AzTbva5NoHF\r\n',
|
|
627
|
+ 'a=ssrc:3495860096 msid:- 7c3aee52-697e-446e-a898-9ea470a19b26\r\n',
|
|
628
|
+ 'a=ssrc:3495860096 videoType:desktop\r\n',
|
|
629
|
+ 'a=ssrc:3495860096 name:abcd-v1\r\n',
|
|
630
|
+ 'a=ssrc-group:FID 4074534577 3122913012\r\n',
|
|
631
|
+ 'a=ssrc-group:SIM 4074534577 3145321104 2686550307\r\n',
|
|
632
|
+ 'a=ssrc-group:FID 3145321104 2960588630\r\n',
|
|
633
|
+ 'a=ssrc-group:FID 2686550307 3495860096\r\n',
|
|
634
|
+ 'a=rtcp-mux\r\n',
|
|
635
|
+ 'a=extmap-allow-mixed\r\n'
|
|
636
|
+ ].join('');
|
|
637
|
+
|
|
638
|
+ it('correctly groups ssrcs lines', () => {
|
|
639
|
+ const sdp = new SDP(testSdp);
|
|
640
|
+ const accept = $iq({
|
|
641
|
+ to: 'peerjid',
|
|
642
|
+ type: 'set'
|
|
643
|
+ })
|
|
644
|
+ .c('jingle', {
|
|
645
|
+ xmlns: 'urn:xmpp:jingle:1',
|
|
646
|
+ action: 'session-accept',
|
|
647
|
+ initiator: false,
|
|
648
|
+ responder: true,
|
|
649
|
+ sid: 'temp-sid'
|
|
650
|
+ });
|
|
651
|
+
|
|
652
|
+ sdp.toJingle(accept, 'responder');
|
|
653
|
+ const { nodeTree } = accept;
|
|
654
|
+ const content = nodeTree.querySelectorAll('jingle>content');
|
|
655
|
+
|
|
656
|
+ expect(content.length).toBe(3);
|
|
657
|
+ const videoSources = nodeTree.querySelectorAll('description[media=\'video\']>source');
|
|
658
|
+
|
|
659
|
+ expect(videoSources.length).toBe(12);
|
|
660
|
+ const audioSources = nodeTree.querySelectorAll('description[media=\'audio\']>source');
|
|
661
|
+
|
|
662
|
+ expect(audioSources.length).toBe(1);
|
|
663
|
+ const videoSourceGroups = nodeTree.querySelectorAll('description[media=\'video\']>ssrc-group');
|
|
664
|
+
|
|
665
|
+ expect(videoSourceGroups.length).toBe(8);
|
|
666
|
+ const data = nodeTree.querySelectorAll('jingle>content[name=\'data\']');
|
|
667
|
+
|
|
668
|
+ expect(data.length).toBe(1);
|
|
669
|
+ });
|
|
670
|
+ });
|
|
671
|
+
|
|
672
|
+ describe('toJingle for multiple m-lines with only recv-only', () => {
|
|
673
|
+ const testSdp = [
|
|
674
|
+ 'v=0\r\n',
|
|
675
|
+ 'o=- 8014175770430016012 6 IN IP4 127.0.0.1\r\n',
|
|
676
|
+ 's=-\r\n',
|
|
677
|
+ 't=0 0\r\n',
|
|
678
|
+ 'a=msid-semantic: WMS\r\n',
|
|
679
|
+ 'a=group:BUNDLE 0 1 2 3 4 5 6 7\r\n',
|
|
680
|
+ 'm=audio 9 UDP/TLS/RTP/SAVPF 111 126\r\n',
|
|
681
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
682
|
+ 'a=rtpmap:111 opus/48000/2\r\n',
|
|
683
|
+ 'a=rtpmap:126 telephone-event/8000\r\n',
|
|
684
|
+ 'a=fmtp:111 minptime=10;useinbandfec=1\r\n',
|
|
685
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
686
|
+ 'a=rtcp-fb:111 transport-cc\r\n',
|
|
687
|
+ 'a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n',
|
|
688
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
689
|
+ 'a=setup:active\r\n',
|
|
690
|
+ 'a=mid:0\r\n',
|
|
691
|
+ 'a=msid:- 836692af-4ea9-432f-811c-fef6ec7ee612\r\n',
|
|
692
|
+ 'a=recvonly\r\n',
|
|
693
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
694
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
695
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
696
|
+ 'a=candidate:4240059272 1 UDP 2122260223 x.x.x.x 54192 typ host\r\n',
|
|
697
|
+ 'a=ice-options:trickle\r\n',
|
|
698
|
+ 'a=rtcp-mux\r\n',
|
|
699
|
+ 'a=extmap-allow-mixed\r\n',
|
|
700
|
+ 'm=video 9 UDP/TLS/RTP/SAVPF 101 97 100 96 107 99 41 42\r\n',
|
|
701
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
702
|
+ 'a=rtpmap:101 VP9/90000\r\n',
|
|
703
|
+ 'a=rtpmap:97 rtx/90000\r\n',
|
|
704
|
+ 'a=rtpmap:100 VP8/90000\r\n',
|
|
705
|
+ 'a=rtpmap:96 rtx/90000\r\n',
|
|
706
|
+ 'a=rtpmap:107 H264/90000\r\n',
|
|
707
|
+ 'a=rtpmap:99 rtx/90000\r\n',
|
|
708
|
+ 'a=rtpmap:41 AV1/90000\r\n',
|
|
709
|
+ 'a=rtpmap:42 rtx/90000\r\n',
|
|
710
|
+ 'a=fmtp:101 profile-id=0\r\n',
|
|
711
|
+ 'a=fmtp:97 apt=101\r\n',
|
|
712
|
+ 'a=fmtp:96 apt=100\r\n',
|
|
713
|
+ 'a=fmtp:107 ;level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\n',
|
|
714
|
+ 'a=fmtp:99 apt=107\r\n',
|
|
715
|
+ 'a=fmtp:41 level-idx=5;profile=0;tier=0\r\n',
|
|
716
|
+ 'a=fmtp:42 apt=41\r\n',
|
|
717
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
718
|
+ 'a=rtcp-fb:101 ccm fir\r\n',
|
|
719
|
+ 'a=rtcp-fb:101 nack\r\n',
|
|
720
|
+ 'a=rtcp-fb:101 nack pli\r\n',
|
|
721
|
+ 'a=rtcp-fb:101 transport-cc\r\n',
|
|
722
|
+ 'a=rtcp-fb:97 ccm fir\r\n',
|
|
723
|
+ 'a=rtcp-fb:97 nack\r\n',
|
|
724
|
+ 'a=rtcp-fb:97 nack pli\r\n',
|
|
725
|
+ 'a=rtcp-fb:100 ccm fir\r\n',
|
|
726
|
+ 'a=rtcp-fb:100 nack\r\n',
|
|
727
|
+ 'a=rtcp-fb:100 nack pli\r\n',
|
|
728
|
+ 'a=rtcp-fb:100 transport-cc\r\n',
|
|
729
|
+ 'a=rtcp-fb:96 ccm fir\r\n',
|
|
730
|
+ 'a=rtcp-fb:96 nack\r\n',
|
|
731
|
+ 'a=rtcp-fb:96 nack pli\r\n',
|
|
732
|
+ 'a=rtcp-fb:107 ccm fir\r\n',
|
|
733
|
+ 'a=rtcp-fb:107 nack\r\n',
|
|
734
|
+ 'a=rtcp-fb:107 nack pli\r\n',
|
|
735
|
+ 'a=rtcp-fb:107 transport-cc\r\n',
|
|
736
|
+ 'a=rtcp-fb:41 ccm fir\r\n',
|
|
737
|
+ 'a=rtcp-fb:41 nack\r\n',
|
|
738
|
+ 'a=rtcp-fb:41 nack pli\r\n',
|
|
739
|
+ 'a=rtcp-fb:41 transport-cc\r\n',
|
|
740
|
+ 'a=rtcp-fb:42 ccm fir\r\n',
|
|
741
|
+ 'a=rtcp-fb:42 nack\r\n',
|
|
742
|
+ 'a=rtcp-fb:42 nack pli\r\n',
|
|
743
|
+ 'a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n',
|
|
744
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
745
|
+ 'a=setup:active\r\n',
|
|
746
|
+ 'a=mid:1\r\n',
|
|
747
|
+ 'a=recvonly\r\n',
|
|
748
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
749
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
750
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
751
|
+ 'a=ice-options:trickle\r\n',
|
|
752
|
+ 'a=rtcp-mux\r\n',
|
|
753
|
+ 'a=extmap-allow-mixed\r\n',
|
|
754
|
+ 'm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\n',
|
|
755
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
756
|
+ 'a=setup:active\r\n',
|
|
757
|
+ 'a=mid:2\r\n',
|
|
758
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
759
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
760
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
761
|
+ 'a=ice-options:trickle\r\n',
|
|
762
|
+ 'a=sctp-port:5000\r\n',
|
|
763
|
+ 'a=max-message-size:262144\r\n',
|
|
764
|
+ 'm=video 9 UDP/TLS/RTP/SAVPF 101 97 100 96 107 99 41 42\r\n',
|
|
765
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
766
|
+ 'a=rtpmap:101 VP9/90000\r\n',
|
|
767
|
+ 'a=rtpmap:97 rtx/90000\r\n',
|
|
768
|
+ 'a=rtpmap:100 VP8/90000\r\n',
|
|
769
|
+ 'a=rtpmap:96 rtx/90000\r\n',
|
|
770
|
+ 'a=rtpmap:107 H264/90000\r\n',
|
|
771
|
+ 'a=rtpmap:99 rtx/90000\r\n',
|
|
772
|
+ 'a=rtpmap:41 AV1/90000\r\n',
|
|
773
|
+ 'a=rtpmap:42 rtx/90000\r\n',
|
|
774
|
+ 'a=fmtp:101 profile-id=0\r\n',
|
|
775
|
+ 'a=fmtp:97 apt=101\r\n',
|
|
776
|
+ 'a=fmtp:96 apt=100\r\n',
|
|
777
|
+ 'a=fmtp:107 ;level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\n',
|
|
778
|
+ 'a=fmtp:99 apt=107\r\n',
|
|
779
|
+ 'a=fmtp:41 level-idx=5;profile=0;tier=0\r\n',
|
|
780
|
+ 'a=fmtp:42 apt=41\r\n',
|
|
781
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
782
|
+ 'a=rtcp-fb:101 ccm fir\r\n',
|
|
783
|
+ 'a=rtcp-fb:101 nack\r\n',
|
|
784
|
+ 'a=rtcp-fb:101 nack pli\r\n',
|
|
785
|
+ 'a=rtcp-fb:101 transport-cc\r\n',
|
|
786
|
+ 'a=rtcp-fb:97 ccm fir\r\n',
|
|
787
|
+ 'a=rtcp-fb:97 nack\r\n',
|
|
788
|
+ 'a=rtcp-fb:97 nack pli\r\n',
|
|
789
|
+ 'a=rtcp-fb:100 ccm fir\r\n',
|
|
790
|
+ 'a=rtcp-fb:100 nack\r\n',
|
|
791
|
+ 'a=rtcp-fb:100 nack pli\r\n',
|
|
792
|
+ 'a=rtcp-fb:100 transport-cc\r\n',
|
|
793
|
+ 'a=rtcp-fb:96 ccm fir\r\n',
|
|
794
|
+ 'a=rtcp-fb:96 nack\r\n',
|
|
795
|
+ 'a=rtcp-fb:96 nack pli\r\n',
|
|
796
|
+ 'a=rtcp-fb:107 ccm fir\r\n',
|
|
797
|
+ 'a=rtcp-fb:107 nack\r\n',
|
|
798
|
+ 'a=rtcp-fb:107 nack pli\r\n',
|
|
799
|
+ 'a=rtcp-fb:107 transport-cc\r\n',
|
|
800
|
+ 'a=rtcp-fb:41 ccm fir\r\n',
|
|
801
|
+ 'a=rtcp-fb:41 nack\r\n',
|
|
802
|
+ 'a=rtcp-fb:41 nack pli\r\n',
|
|
803
|
+ 'a=rtcp-fb:41 transport-cc\r\n',
|
|
804
|
+ 'a=rtcp-fb:42 ccm fir\r\n',
|
|
805
|
+ 'a=rtcp-fb:42 nack\r\n',
|
|
806
|
+ 'a=rtcp-fb:42 nack pli\r\n',
|
|
807
|
+ 'a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n',
|
|
808
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
809
|
+ 'a=extmap:11 https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension\r\n',
|
|
810
|
+ 'a=setup:active\r\n',
|
|
811
|
+ 'a=mid:3\r\n',
|
|
812
|
+ 'a=recvonly\r\n',
|
|
813
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
814
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
815
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
816
|
+ 'a=ice-options:trickle\r\n',
|
|
817
|
+ 'a=rtcp-mux\r\n',
|
|
818
|
+ 'a=extmap-allow-mixed\r\n',
|
|
819
|
+ 'm=video 9 UDP/TLS/RTP/SAVPF 101 97 100 96 107 99 41 42\r\n',
|
|
820
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
821
|
+ 'a=rtpmap:101 VP9/90000\r\n',
|
|
822
|
+ 'a=rtpmap:97 rtx/90000\r\n',
|
|
823
|
+ 'a=rtpmap:100 VP8/90000\r\n',
|
|
824
|
+ 'a=rtpmap:96 rtx/90000\r\n',
|
|
825
|
+ 'a=rtpmap:107 H264/90000\r\n',
|
|
826
|
+ 'a=rtpmap:99 rtx/90000\r\n',
|
|
827
|
+ 'a=rtpmap:41 AV1/90000\r\n',
|
|
828
|
+ 'a=rtpmap:42 rtx/90000\r\n',
|
|
829
|
+ 'a=fmtp:101 profile-id=0\r\n',
|
|
830
|
+ 'a=fmtp:97 apt=101\r\n',
|
|
831
|
+ 'a=fmtp:96 apt=100\r\n',
|
|
832
|
+ 'a=fmtp:107 ;level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\n',
|
|
833
|
+ 'a=fmtp:99 apt=107\r\n',
|
|
834
|
+ 'a=fmtp:41 level-idx=5;profile=0;tier=0\r\n',
|
|
835
|
+ 'a=fmtp:42 apt=41\r\n',
|
|
836
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
837
|
+ 'a=rtcp-fb:101 ccm fir\r\n',
|
|
838
|
+ 'a=rtcp-fb:101 nack\r\n',
|
|
839
|
+ 'a=rtcp-fb:101 nack pli\r\n',
|
|
840
|
+ 'a=rtcp-fb:101 transport-cc\r\n',
|
|
841
|
+ 'a=rtcp-fb:97 ccm fir\r\n',
|
|
842
|
+ 'a=rtcp-fb:97 nack\r\n',
|
|
843
|
+ 'a=rtcp-fb:97 nack pli\r\n',
|
|
844
|
+ 'a=rtcp-fb:100 ccm fir\r\n',
|
|
845
|
+ 'a=rtcp-fb:100 nack\r\n',
|
|
846
|
+ 'a=rtcp-fb:100 nack pli\r\n',
|
|
847
|
+ 'a=rtcp-fb:100 transport-cc\r\n',
|
|
848
|
+ 'a=rtcp-fb:96 ccm fir\r\n',
|
|
849
|
+ 'a=rtcp-fb:96 nack\r\n',
|
|
850
|
+ 'a=rtcp-fb:96 nack pli\r\n',
|
|
851
|
+ 'a=rtcp-fb:107 ccm fir\r\n',
|
|
852
|
+ 'a=rtcp-fb:107 nack\r\n',
|
|
853
|
+ 'a=rtcp-fb:107 nack pli\r\n',
|
|
854
|
+ 'a=rtcp-fb:107 transport-cc\r\n',
|
|
855
|
+ 'a=rtcp-fb:41 ccm fir\r\n',
|
|
856
|
+ 'a=rtcp-fb:41 nack\r\n',
|
|
857
|
+ 'a=rtcp-fb:41 nack pli\r\n',
|
|
858
|
+ 'a=rtcp-fb:41 transport-cc\r\n',
|
|
859
|
+ 'a=rtcp-fb:42 ccm fir\r\n',
|
|
860
|
+ 'a=rtcp-fb:42 nack\r\n',
|
|
861
|
+ 'a=rtcp-fb:42 nack pli\r\n',
|
|
862
|
+ 'a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n',
|
|
863
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
864
|
+ 'a=extmap:11 https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension\r\n',
|
|
865
|
+ 'a=setup:active\r\n',
|
|
866
|
+ 'a=mid:4\r\n',
|
|
867
|
+ 'a=recvonly\r\n',
|
|
868
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
869
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
870
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
871
|
+ 'a=ice-options:trickle\r\n',
|
|
872
|
+ 'a=rtcp-mux\r\n',
|
|
873
|
+ 'a=extmap-allow-mixed\r\n',
|
|
874
|
+ 'm=audio 9 UDP/TLS/RTP/SAVPF 111 126\r\n',
|
|
875
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
876
|
+ 'a=rtpmap:111 opus/48000/2\r\n',
|
|
877
|
+ 'a=rtpmap:126 telephone-event/8000\r\n',
|
|
878
|
+ 'a=fmtp:111 minptime=10;useinbandfec=1\r\n',
|
|
879
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
880
|
+ 'a=rtcp-fb:111 transport-cc\r\n',
|
|
881
|
+ 'a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n',
|
|
882
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
883
|
+ 'a=setup:active\r\n',
|
|
884
|
+ 'a=mid:5\r\n',
|
|
885
|
+ 'a=recvonly\r\n',
|
|
886
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
887
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
888
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
889
|
+ 'a=ice-options:trickle\r\n',
|
|
890
|
+ 'a=rtcp-mux\r\n',
|
|
891
|
+ 'a=extmap-allow-mixed\r\n',
|
|
892
|
+ 'm=audio 9 UDP/TLS/RTP/SAVPF 111 126\r\n',
|
|
893
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
894
|
+ 'a=rtpmap:111 opus/48000/2\r\n',
|
|
895
|
+ 'a=rtpmap:126 telephone-event/8000\r\n',
|
|
896
|
+ 'a=fmtp:111 minptime=10;useinbandfec=1\r\n',
|
|
897
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
898
|
+ 'a=rtcp-fb:111 transport-cc\r\n',
|
|
899
|
+ 'a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n',
|
|
900
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
901
|
+ 'a=setup:active\r\n',
|
|
902
|
+ 'a=mid:6\r\n',
|
|
903
|
+ 'a=recvonly\r\n',
|
|
904
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
905
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
906
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
907
|
+ 'a=ice-options:trickle\r\n',
|
|
908
|
+ 'a=rtcp-mux\r\n',
|
|
909
|
+ 'a=extmap-allow-mixed\r\n',
|
|
910
|
+ 'm=video 9 UDP/TLS/RTP/SAVPF 101 97 100 96 107 99 41 42\r\n',
|
|
911
|
+ 'c=IN IP4 0.0.0.0\r\n',
|
|
912
|
+ 'a=rtpmap:101 VP9/90000\r\n',
|
|
913
|
+ 'a=rtpmap:97 rtx/90000\r\n',
|
|
914
|
+ 'a=rtpmap:100 VP8/90000\r\n',
|
|
915
|
+ 'a=rtpmap:96 rtx/90000\r\n',
|
|
916
|
+ 'a=rtpmap:107 H264/90000\r\n',
|
|
917
|
+ 'a=rtpmap:99 rtx/90000\r\n',
|
|
918
|
+ 'a=rtpmap:41 AV1/90000\r\n',
|
|
919
|
+ 'a=rtpmap:42 rtx/90000\r\n',
|
|
920
|
+ 'a=fmtp:101 profile-id=0\r\n',
|
|
921
|
+ 'a=fmtp:97 apt=101\r\n',
|
|
922
|
+ 'a=fmtp:96 apt=100\r\n',
|
|
923
|
+ 'a=fmtp:107 ;level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\n',
|
|
924
|
+ 'a=fmtp:99 apt=107\r\n',
|
|
925
|
+ 'a=fmtp:41 level-idx=5;profile=0;tier=0\r\n',
|
|
926
|
+ 'a=fmtp:42 apt=41\r\n',
|
|
927
|
+ 'a=rtcp:9 IN IP4 0.0.0.0\r\n',
|
|
928
|
+ 'a=rtcp-fb:101 ccm fir\r\n',
|
|
929
|
+ 'a=rtcp-fb:101 nack\r\n',
|
|
930
|
+ 'a=rtcp-fb:101 nack pli\r\n',
|
|
931
|
+ 'a=rtcp-fb:101 transport-cc\r\n',
|
|
932
|
+ 'a=rtcp-fb:97 ccm fir\r\n',
|
|
933
|
+ 'a=rtcp-fb:97 nack\r\n',
|
|
934
|
+ 'a=rtcp-fb:97 nack pli\r\n',
|
|
935
|
+ 'a=rtcp-fb:100 ccm fir\r\n',
|
|
936
|
+ 'a=rtcp-fb:100 nack\r\n',
|
|
937
|
+ 'a=rtcp-fb:100 nack pli\r\n',
|
|
938
|
+ 'a=rtcp-fb:100 transport-cc\r\n',
|
|
939
|
+ 'a=rtcp-fb:96 ccm fir\r\n',
|
|
940
|
+ 'a=rtcp-fb:96 nack\r\n',
|
|
941
|
+ 'a=rtcp-fb:96 nack pli\r\n',
|
|
942
|
+ 'a=rtcp-fb:107 ccm fir\r\n',
|
|
943
|
+ 'a=rtcp-fb:107 nack\r\n',
|
|
944
|
+ 'a=rtcp-fb:107 nack pli\r\n',
|
|
945
|
+ 'a=rtcp-fb:107 transport-cc\r\n',
|
|
946
|
+ 'a=rtcp-fb:41 ccm fir\r\n',
|
|
947
|
+ 'a=rtcp-fb:41 nack\r\n',
|
|
948
|
+ 'a=rtcp-fb:41 nack pli\r\n',
|
|
949
|
+ 'a=rtcp-fb:41 transport-cc\r\n',
|
|
950
|
+ 'a=rtcp-fb:42 ccm fir\r\n',
|
|
951
|
+ 'a=rtcp-fb:42 nack\r\n',
|
|
952
|
+ 'a=rtcp-fb:42 nack pli\r\n',
|
|
953
|
+ 'a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n',
|
|
954
|
+ 'a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n',
|
|
955
|
+ 'a=setup:active\r\n',
|
|
956
|
+ 'a=mid:7\r\n',
|
|
957
|
+ 'a=recvonly\r\n',
|
|
958
|
+ 'a=ice-ufrag:/5Yo\r\n',
|
|
959
|
+ 'a=ice-pwd:Bn+13yvssP5vicDc0mUO7Aiu\r\n',
|
|
960
|
+ 'a=fingerprint:sha-256 54:99:99:D2:C9:FE:63:B2:12:A5:D6:BA:BD:FA:F0:46:7E:E4:18:F8:9C:DF:25:55:94:DA:21:AE:19:19:56:AB\r\n',
|
|
961
|
+ 'a=ice-options:trickle\r\n',
|
|
962
|
+ 'a=rtcp-mux\r\n',
|
|
963
|
+ 'a=extmap-allow-mixed\r\n'
|
|
964
|
+ ].join('');
|
|
965
|
+
|
|
966
|
+ it('correctly groups ssrcs lines', () => {
|
|
967
|
+ const sdp = new SDP(testSdp);
|
|
968
|
+ const accept = $iq({
|
|
969
|
+ to: 'peerjid',
|
|
970
|
+ type: 'set'
|
|
971
|
+ })
|
|
972
|
+ .c('jingle', {
|
|
973
|
+ xmlns: 'urn:xmpp:jingle:1',
|
|
974
|
+ action: 'session-accept',
|
|
975
|
+ initiator: false,
|
|
976
|
+ responder: true,
|
|
977
|
+ sid: 'temp-sid'
|
|
978
|
+ });
|
|
979
|
+
|
|
980
|
+ sdp.toJingle(accept, 'responder');
|
|
981
|
+ const { nodeTree } = accept;
|
|
982
|
+ const content = nodeTree.querySelectorAll('jingle>content');
|
|
983
|
+
|
|
984
|
+ expect(content.length).toBe(3);
|
|
985
|
+ const videoSources = nodeTree.querySelectorAll('description[media=\'video\']>source');
|
|
986
|
+
|
|
987
|
+ expect(videoSources.length).toBe(0);
|
|
988
|
+ const audioSources = nodeTree.querySelectorAll('description[media=\'audio\']>source');
|
|
989
|
+
|
|
990
|
+ expect(audioSources.length).toBe(0);
|
|
991
|
+ const videoSourceGroups = nodeTree.querySelectorAll('description[media=\'video\']>ssrc-group');
|
|
992
|
+
|
|
993
|
+ expect(videoSourceGroups.length).toBe(0);
|
|
994
|
+ const data = nodeTree.querySelectorAll('jingle>content[name=\'data\']');
|
|
995
|
+
|
|
996
|
+ expect(data.length).toBe(1);
|
|
997
|
+ });
|
|
998
|
+ });
|
|
999
|
+
|
138
|
1000
|
describe('fromJingle', () => {
|
139
|
|
- /* eslint-disable max-len*/
|
140
|
1001
|
const stanza = `<iq>
|
141
|
1002
|
<jingle action='session-initiate' initiator='focus' sid='123' xmlns='urn:xmpp:jingle:1'>
|
142
|
1003
|
<content creator='initiator' name='audio' senders='both'>
|
|
@@ -269,7 +1130,6 @@ a=ssrc:3758540092 label:mixedlabelvideo0
|
269
|
1130
|
a=ssrc:3758540092 msid:mixedmslabel mixedlabelvideo0
|
270
|
1131
|
a=ssrc:3758540092 mslabel:mixedmslabel
|
271
|
1132
|
`.split('\n').join('\r\n');
|
272
|
|
- /* eslint-enable max-len*/
|
273
|
1133
|
|
274
|
1134
|
it('gets converted to SDP', () => {
|
275
|
1135
|
const offer = createStanzaElement(stanza);
|
|
@@ -283,7 +1143,6 @@ a=ssrc:3758540092 mslabel:mixedmslabel
|
283
|
1143
|
});
|
284
|
1144
|
|
285
|
1145
|
describe('fromJingleWithJSONFormat', () => {
|
286
|
|
- /* eslint-disable max-len*/
|
287
|
1146
|
const stanza = `
|
288
|
1147
|
<iq>
|
289
|
1148
|
<jingle xmlns="urn:xmpp:jingle:1" action="session-initiate" initiator="focus" sid="123">
|