diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a671212e..a7dbf9a2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -215,7 +215,6 @@ classDiagram +setStereo(sdp) string +setDTX(sdp) string +setVideoBitrate(sdp, bitrate) string - +setSimulcast(sdp, codec) string } class Logger { <> diff --git a/packages/millicast-sdk/src/PeerConnection.ts b/packages/millicast-sdk/src/PeerConnection.ts index 0c4c8ec1..b0b82538 100644 --- a/packages/millicast-sdk/src/PeerConnection.ts +++ b/packages/millicast-sdk/src/PeerConnection.ts @@ -161,10 +161,6 @@ export default class PeerConnection extends EventEmitter { } this.sessionDescription.sdp = SdpParser.setMultiopus(this.sessionDescription.sdp, mediaStream) } - - if (!options.disableVideo && options.simulcast) { - this.sessionDescription.sdp = SdpParser.setSimulcast(this.sessionDescription.sdp, options.codec) - } if (options.absCaptureTime) { this.sessionDescription.sdp = SdpParser.setAbsoluteCaptureTime(this.sessionDescription.sdp) } @@ -518,13 +514,24 @@ const addMediaStreamToPeer = (peer: RTCPeerConnection, mediaStream: MediaStream, if (track.kind === 'video') { initOptions.direction = !options.disableVideo ? 'sendonly' : 'inactive' + const encodings = [] if (options.scalabilityMode && new UserAgent().isChrome()) { logger.debug(`Video track with scalability mode: ${options.scalabilityMode}.`) - initOptions.sendEncodings = [{ scalabilityMode: options.scalabilityMode } as RTCRtpEncodingParameters] + encodings.push({ scalabilityMode: options.scalabilityMode } as RTCRtpEncodingParameters) } else if (options.scalabilityMode) { logger.warn('SVC is only supported in Google Chrome') } + if (options.simulcast) { + encodings.push( + { rid: 'f', scaleResolutionDownBy: 1.0 }, + { rid: 'h', scaleResolutionDownBy: 2.0 }, + { rid: 'q', scaleResolutionDownBy: 4.0 } + ) + } + if (encodings.length > 0) { + initOptions.sendEncodings = encodings + } } peer.addTransceiver(track, initOptions) diff --git a/packages/millicast-sdk/src/utils/SdpParser.ts b/packages/millicast-sdk/src/utils/SdpParser.ts index 35527664..22702348 100644 --- a/packages/millicast-sdk/src/utils/SdpParser.ts +++ b/packages/millicast-sdk/src/utils/SdpParser.ts @@ -39,95 +39,6 @@ const headerExtensionIdUppperRange = Array.from( * @description Simplify SDP parser. */ const SdpParser = { - /** - * @function - * @name setSimulcast - * @description Parse SDP for support simulcast. - * **Only available in Chromium based browsers.** - * @param {String} sdp - Current SDP. - * @param {String} codec - Codec. - * @returns {String} SDP parsed with simulcast support. - * @example SdpParser.setSimulcast(sdp, 'h264') - */ - setSimulcast(sdp = '', codec = '') : string { - logger.info('Setting simulcast. Codec: ', codec) - const browserData = new UserAgent() - if (!browserData.isChromium()) { - logger.warn( - 'Your browser does not appear to support Simulcast. For a better experience, use a Chromium based browser.' - ) - return sdp - } - if (codec !== 'h264' && codec !== 'vp8') { - logger.warn( - `Your selected codec ${codec} does not appear to support Simulcast. To broadcast using simulcast, please use H.264 or VP8.` - ) - return sdp - } - // Check if there is video available to set simulcast - if (!/m=video/.test(sdp)) { - logger.warn('There is no available video for simulcast to be enabled.') - return sdp - } - - try { - const reg1 = new RegExp('m=video.*?a=ssrc:(\\d*) cname:(.+?)\\r\\n', 's') - const reg2 = new RegExp('m=video.*?a=ssrc:(\\d*) msid:(.+?)\\r\\n', 's') - // Get ssrc and cname and msid - const res1 = reg1.exec(sdp) ?? [] - const ssrc = res1[1] - const cname = res1[2] - const res2 = reg2.exec(sdp) ?? [] - const msid = res2[2] - // Add simulcasts ssrcs - const num = 2 - const ssrcs = [ssrc] - for (let i = 0; i < num; ++i) { - // Create new ssrcs - const ssrc = 100 + i * 2 - const rtx = ssrc + 1 - // Add to ssrc list - ssrcs.push(ssrc.toString()) - // Add sdp stuff - sdp += - 'a=ssrc-group:FID ' + - ssrc + - ' ' + - rtx.toString() + - '\r\n' + - 'a=ssrc:' + - ssrc.toString() + - ' cname:' + - cname + - '\r\n' + - 'a=ssrc:' + - ssrc.toString() + - ' msid:' + - msid + - '\r\n' + - 'a=ssrc:' + - rtx.toString() + - ' cname:' + - cname + - '\r\n' + - 'a=ssrc:' + - rtx.toString() + - ' msid:' + - msid + - '\r\n' - } - // Add SIM group - sdp += 'a=ssrc-group:SIM ' + ssrcs.join(' ') + '\r\n' - - logger.info('Simulcast setted') - logger.debug('Simulcast SDP: ', sdp) - return sdp - } catch (e) { - logger.error('Error setting SDP for simulcast: ', e) - throw e - } - }, - /** * @function * @name setStereo @@ -441,7 +352,7 @@ const SdpParser = { // Checks if mediaStream has more than 2 audio channels. const hasAudioMultichannel = (mediaStream: MediaStream) => { - return mediaStream.getAudioTracks().some((value) => value.getSettings().channelCount as number > 2) + return mediaStream.getAudioTracks().some((value) => (value.getSettings().channelCount as number) > 2) } export default SdpParser diff --git a/packages/millicast-sdk/tests/unit/SdpSimulcast.steps.js b/packages/millicast-sdk/tests/unit/SdpSimulcast.steps.js deleted file mode 100644 index 802df93e..00000000 --- a/packages/millicast-sdk/tests/unit/SdpSimulcast.steps.js +++ /dev/null @@ -1,93 +0,0 @@ -import { loadFeature, defineFeature } from 'jest-cucumber' -import SdpParser from '../../src/utils/SdpParser' -import { changeBrowserMock } from './__mocks__/MockBrowser' -const feature = loadFeature('../features/SdpSimulcast.feature', { loadRelativePath: true, errors: true }) - -defineFeature(feature, (test) => { - beforeEach(() => { - changeBrowserMock( - 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' - ) - }) - - test('Set simulcast in Chrome and h264 codec', ({ given, when, then }) => { - let codec - let localSdp - let simulcastSdp - - given('I am using Chrome, h264 codec and valid sdp', async () => { - codec = 'h264' - localSdp = - 'v=0\r\no=- 6951551582290178118 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:47zq\r\na=ice-pwd:L1hL3yV+MsLmlx/yuN31ApfQ\r\na=ice-options:trickle\r\na=fingerprint:sha-256 EA:A4:8E:38:4A:31:61:A2:59:78:EB:AD:2E:77:3F:C0:BA:D1:13:93:0A:F3:4F:32:AB:8A:3A:E0:10:4E:95:C3\r\na=setup:actpass\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=sendrecv\r\na=msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 adb18b70-1d59-41e0-a080-f6e57efeac19\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:110 telephone-event/48000\r\na=rtpmap:112 telephone-event/32000\r\na=rtpmap:113 telephone-event/16000\r\na=rtpmap:126 telephone-event/8000\r\na=ssrc:2213016228 cname:uMbjTBwYv//E4gZM\r\na=ssrc:2213016228 msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 adb18b70-1d59-41e0-a080-f6e57efeac19\r\na=ssrc:2213016228 mslabel:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\na=ssrc:2213016228 label:adb18b70-1d59-41e0-a080-f6e57efeac19\r\nm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 121 127 120 125 107 108 109 35 36 124 119 123 118 114 115 116\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:47zq\r\na=ice-pwd:L1hL3yV+MsLmlx/yuN31ApfQ\r\na=ice-options:trickle\r\na=fingerprint:sha-256 EA:A4:8E:38:4A:31:61:A2:59:78:EB:AD:2E:77:3F:C0:BA:D1:13:93:0A:F3:4F:32:AB:8A:3A:E0:10:4E:95:C3\r\na=setup:actpass\r\na=mid:1\r\na=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:13 urn:3gpp:video-orientation\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=sendrecv\r\na=msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 306ab058-0f3b-4a6d-a039-d7495360c506\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:96 VP8/90000\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-fb:96 transport-cc\r\na=rtcp-fb:96 ccm fir\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtpmap:97 rtx/90000\r\na=fmtp:97 apt=96\r\na=rtpmap:98 VP9/90000\r\na=rtcp-fb:98 goog-remb\r\na=rtcp-fb:98 transport-cc\r\na=rtcp-fb:98 ccm fir\r\na=rtcp-fb:98 nack\r\na=rtcp-fb:98 nack pli\r\na=fmtp:98 profile-id=0\r\na=rtpmap:99 rtx/90000\r\na=fmtp:99 apt=98\r\na=rtpmap:100 VP9/90000\r\na=rtcp-fb:100 goog-remb\r\na=rtcp-fb:100 transport-cc\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=fmtp:100 profile-id=2\r\na=rtpmap:101 rtx/90000\r\na=fmtp:101 apt=100\r\na=rtpmap:102 H264/90000\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\r\na=rtpmap:121 rtx/90000\r\na=fmtp:121 apt=102\r\na=rtpmap:127 H264/90000\r\na=rtcp-fb:127 goog-remb\r\na=rtcp-fb:127 transport-cc\r\na=rtcp-fb:127 ccm fir\r\na=rtcp-fb:127 nack\r\na=rtcp-fb:127 nack pli\r\na=fmtp:127 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f\r\na=rtpmap:120 rtx/90000\r\na=fmtp:120 apt=127\r\na=rtpmap:125 H264/90000\r\na=rtcp-fb:125 goog-remb\r\na=rtcp-fb:125 transport-cc\r\na=rtcp-fb:125 ccm fir\r\na=rtcp-fb:125 nack\r\na=rtcp-fb:125 nack pli\r\na=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:107 rtx/90000\r\na=fmtp:107 apt=125\r\na=rtpmap:108 H264/90000\r\na=rtcp-fb:108 goog-remb\r\na=rtcp-fb:108 transport-cc\r\na=rtcp-fb:108 ccm fir\r\na=rtcp-fb:108 nack\r\na=rtcp-fb:108 nack pli\r\na=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f\r\na=rtpmap:109 rtx/90000\r\na=fmtp:109 apt=108\r\na=rtpmap:35 AV1X/90000\r\na=rtcp-fb:35 goog-remb\r\na=rtcp-fb:35 transport-cc\r\na=rtcp-fb:35 ccm fir\r\na=rtcp-fb:35 nack\r\na=rtcp-fb:35 nack pli\r\na=rtpmap:36 rtx/90000\r\na=fmtp:36 apt=35\r\na=rtpmap:124 H264/90000\r\na=rtcp-fb:124 goog-remb\r\na=rtcp-fb:124 transport-cc\r\na=rtcp-fb:124 ccm fir\r\na=rtcp-fb:124 nack\r\na=rtcp-fb:124 nack pli\r\na=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f\r\na=rtpmap:119 rtx/90000\r\na=fmtp:119 apt=124\r\na=rtpmap:123 H264/90000\r\na=rtcp-fb:123 goog-remb\r\na=rtcp-fb:123 transport-cc\r\na=rtcp-fb:123 ccm fir\r\na=rtcp-fb:123 nack\r\na=rtcp-fb:123 nack pli\r\na=fmtp:123 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f\r\na=rtpmap:118 rtx/90000\r\na=fmtp:118 apt=123\r\na=rtpmap:114 red/90000\r\na=rtpmap:115 rtx/90000\r\na=fmtp:115 apt=114\r\na=rtpmap:116 ulpfec/90000\r\na=ssrc-group:FID 3413953811 262260280\r\na=ssrc:3413953811 cname:uMbjTBwYv//E4gZM\r\na=ssrc:3413953811 msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 306ab058-0f3b-4a6d-a039-d7495360c506\r\na=ssrc:3413953811 mslabel:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\na=ssrc:3413953811 label:306ab058-0f3b-4a6d-a039-d7495360c506\r\na=ssrc:262260280 cname:uMbjTBwYv//E4gZM\r\na=ssrc:262260280 msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 306ab058-0f3b-4a6d-a039-d7495360c506\r\na=ssrc:262260280 mslabel:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\na=ssrc:262260280 label:306ab058-0f3b-4a6d-a039-d7495360c506\r\n' - }) - - when('I want to set simulcast', async () => { - simulcastSdp = SdpParser.setSimulcast(localSdp, codec) - }) - - then('returns the sdp with simulcast updated', async () => { - expect(Object.is(localSdp, simulcastSdp)).toBe(false) - }) - }) - - test('Set simulcast in Firefox and h264 codec', ({ given, when, then }) => { - let codec - let localSdp - let simulcastSdp - - given('I am using Firefox, h264 codec and valid sdp', async () => { - changeBrowserMock('Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0') - codec = 'h264' - localSdp = - 'v=0\r\no=- 6951551582290178118 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:47zq\r\na=ice-pwd:L1hL3yV+MsLmlx/yuN31ApfQ\r\na=ice-options:trickle\r\na=fingerprint:sha-256 EA:A4:8E:38:4A:31:61:A2:59:78:EB:AD:2E:77:3F:C0:BA:D1:13:93:0A:F3:4F:32:AB:8A:3A:E0:10:4E:95:C3\r\na=setup:actpass\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=sendrecv\r\na=msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 adb18b70-1d59-41e0-a080-f6e57efeac19\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:110 telephone-event/48000\r\na=rtpmap:112 telephone-event/32000\r\na=rtpmap:113 telephone-event/16000\r\na=rtpmap:126 telephone-event/8000\r\na=ssrc:2213016228 cname:uMbjTBwYv//E4gZM\r\na=ssrc:2213016228 msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 adb18b70-1d59-41e0-a080-f6e57efeac19\r\na=ssrc:2213016228 mslabel:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\na=ssrc:2213016228 label:adb18b70-1d59-41e0-a080-f6e57efeac19\r\nm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 121 127 120 125 107 108 109 35 36 124 119 123 118 114 115 116\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:47zq\r\na=ice-pwd:L1hL3yV+MsLmlx/yuN31ApfQ\r\na=ice-options:trickle\r\na=fingerprint:sha-256 EA:A4:8E:38:4A:31:61:A2:59:78:EB:AD:2E:77:3F:C0:BA:D1:13:93:0A:F3:4F:32:AB:8A:3A:E0:10:4E:95:C3\r\na=setup:actpass\r\na=mid:1\r\na=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:13 urn:3gpp:video-orientation\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=sendrecv\r\na=msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 306ab058-0f3b-4a6d-a039-d7495360c506\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:96 VP8/90000\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-fb:96 transport-cc\r\na=rtcp-fb:96 ccm fir\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtpmap:97 rtx/90000\r\na=fmtp:97 apt=96\r\na=rtpmap:98 VP9/90000\r\na=rtcp-fb:98 goog-remb\r\na=rtcp-fb:98 transport-cc\r\na=rtcp-fb:98 ccm fir\r\na=rtcp-fb:98 nack\r\na=rtcp-fb:98 nack pli\r\na=fmtp:98 profile-id=0\r\na=rtpmap:99 rtx/90000\r\na=fmtp:99 apt=98\r\na=rtpmap:100 VP9/90000\r\na=rtcp-fb:100 goog-remb\r\na=rtcp-fb:100 transport-cc\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=fmtp:100 profile-id=2\r\na=rtpmap:101 rtx/90000\r\na=fmtp:101 apt=100\r\na=rtpmap:102 H264/90000\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\r\na=rtpmap:121 rtx/90000\r\na=fmtp:121 apt=102\r\na=rtpmap:127 H264/90000\r\na=rtcp-fb:127 goog-remb\r\na=rtcp-fb:127 transport-cc\r\na=rtcp-fb:127 ccm fir\r\na=rtcp-fb:127 nack\r\na=rtcp-fb:127 nack pli\r\na=fmtp:127 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f\r\na=rtpmap:120 rtx/90000\r\na=fmtp:120 apt=127\r\na=rtpmap:125 H264/90000\r\na=rtcp-fb:125 goog-remb\r\na=rtcp-fb:125 transport-cc\r\na=rtcp-fb:125 ccm fir\r\na=rtcp-fb:125 nack\r\na=rtcp-fb:125 nack pli\r\na=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:107 rtx/90000\r\na=fmtp:107 apt=125\r\na=rtpmap:108 H264/90000\r\na=rtcp-fb:108 goog-remb\r\na=rtcp-fb:108 transport-cc\r\na=rtcp-fb:108 ccm fir\r\na=rtcp-fb:108 nack\r\na=rtcp-fb:108 nack pli\r\na=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f\r\na=rtpmap:109 rtx/90000\r\na=fmtp:109 apt=108\r\na=rtpmap:35 AV1X/90000\r\na=rtcp-fb:35 goog-remb\r\na=rtcp-fb:35 transport-cc\r\na=rtcp-fb:35 ccm fir\r\na=rtcp-fb:35 nack\r\na=rtcp-fb:35 nack pli\r\na=rtpmap:36 rtx/90000\r\na=fmtp:36 apt=35\r\na=rtpmap:124 H264/90000\r\na=rtcp-fb:124 goog-remb\r\na=rtcp-fb:124 transport-cc\r\na=rtcp-fb:124 ccm fir\r\na=rtcp-fb:124 nack\r\na=rtcp-fb:124 nack pli\r\na=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f\r\na=rtpmap:119 rtx/90000\r\na=fmtp:119 apt=124\r\na=rtpmap:123 H264/90000\r\na=rtcp-fb:123 goog-remb\r\na=rtcp-fb:123 transport-cc\r\na=rtcp-fb:123 ccm fir\r\na=rtcp-fb:123 nack\r\na=rtcp-fb:123 nack pli\r\na=fmtp:123 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f\r\na=rtpmap:118 rtx/90000\r\na=fmtp:118 apt=123\r\na=rtpmap:114 red/90000\r\na=rtpmap:115 rtx/90000\r\na=fmtp:115 apt=114\r\na=rtpmap:116 ulpfec/90000\r\na=ssrc-group:FID 3413953811 262260280\r\na=ssrc:3413953811 cname:uMbjTBwYv//E4gZM\r\na=ssrc:3413953811 msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 306ab058-0f3b-4a6d-a039-d7495360c506\r\na=ssrc:3413953811 mslabel:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\na=ssrc:3413953811 label:306ab058-0f3b-4a6d-a039-d7495360c506\r\na=ssrc:262260280 cname:uMbjTBwYv//E4gZM\r\na=ssrc:262260280 msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 306ab058-0f3b-4a6d-a039-d7495360c506\r\na=ssrc:262260280 mslabel:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\na=ssrc:262260280 label:306ab058-0f3b-4a6d-a039-d7495360c506\r\n' - }) - - when('I want to set simulcast', async () => { - simulcastSdp = SdpParser.setSimulcast(localSdp, codec) - }) - - then('returns the sdp without simulcast', async () => { - expect(Object.is(localSdp, simulcastSdp)).toBe(true) - }) - }) - - test('Set simulcast in Chrome and vp9 codec', ({ given, when, then }) => { - let codec - let localSdp - let simulcastSdp - - given('I am using Chrome, vp9 codec and valid sdp', async () => { - codec = 'vp9' - localSdp = - 'v=0\r\no=- 6951551582290178118 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:47zq\r\na=ice-pwd:L1hL3yV+MsLmlx/yuN31ApfQ\r\na=ice-options:trickle\r\na=fingerprint:sha-256 EA:A4:8E:38:4A:31:61:A2:59:78:EB:AD:2E:77:3F:C0:BA:D1:13:93:0A:F3:4F:32:AB:8A:3A:E0:10:4E:95:C3\r\na=setup:actpass\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=sendrecv\r\na=msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 adb18b70-1d59-41e0-a080-f6e57efeac19\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:110 telephone-event/48000\r\na=rtpmap:112 telephone-event/32000\r\na=rtpmap:113 telephone-event/16000\r\na=rtpmap:126 telephone-event/8000\r\na=ssrc:2213016228 cname:uMbjTBwYv//E4gZM\r\na=ssrc:2213016228 msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 adb18b70-1d59-41e0-a080-f6e57efeac19\r\na=ssrc:2213016228 mslabel:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\na=ssrc:2213016228 label:adb18b70-1d59-41e0-a080-f6e57efeac19\r\nm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 121 127 120 125 107 108 109 35 36 124 119 123 118 114 115 116\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:47zq\r\na=ice-pwd:L1hL3yV+MsLmlx/yuN31ApfQ\r\na=ice-options:trickle\r\na=fingerprint:sha-256 EA:A4:8E:38:4A:31:61:A2:59:78:EB:AD:2E:77:3F:C0:BA:D1:13:93:0A:F3:4F:32:AB:8A:3A:E0:10:4E:95:C3\r\na=setup:actpass\r\na=mid:1\r\na=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:13 urn:3gpp:video-orientation\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=sendrecv\r\na=msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 306ab058-0f3b-4a6d-a039-d7495360c506\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:96 VP8/90000\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-fb:96 transport-cc\r\na=rtcp-fb:96 ccm fir\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtpmap:97 rtx/90000\r\na=fmtp:97 apt=96\r\na=rtpmap:98 VP9/90000\r\na=rtcp-fb:98 goog-remb\r\na=rtcp-fb:98 transport-cc\r\na=rtcp-fb:98 ccm fir\r\na=rtcp-fb:98 nack\r\na=rtcp-fb:98 nack pli\r\na=fmtp:98 profile-id=0\r\na=rtpmap:99 rtx/90000\r\na=fmtp:99 apt=98\r\na=rtpmap:100 VP9/90000\r\na=rtcp-fb:100 goog-remb\r\na=rtcp-fb:100 transport-cc\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=fmtp:100 profile-id=2\r\na=rtpmap:101 rtx/90000\r\na=fmtp:101 apt=100\r\na=rtpmap:102 H264/90000\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\r\na=rtpmap:121 rtx/90000\r\na=fmtp:121 apt=102\r\na=rtpmap:127 H264/90000\r\na=rtcp-fb:127 goog-remb\r\na=rtcp-fb:127 transport-cc\r\na=rtcp-fb:127 ccm fir\r\na=rtcp-fb:127 nack\r\na=rtcp-fb:127 nack pli\r\na=fmtp:127 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f\r\na=rtpmap:120 rtx/90000\r\na=fmtp:120 apt=127\r\na=rtpmap:125 H264/90000\r\na=rtcp-fb:125 goog-remb\r\na=rtcp-fb:125 transport-cc\r\na=rtcp-fb:125 ccm fir\r\na=rtcp-fb:125 nack\r\na=rtcp-fb:125 nack pli\r\na=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:107 rtx/90000\r\na=fmtp:107 apt=125\r\na=rtpmap:108 H264/90000\r\na=rtcp-fb:108 goog-remb\r\na=rtcp-fb:108 transport-cc\r\na=rtcp-fb:108 ccm fir\r\na=rtcp-fb:108 nack\r\na=rtcp-fb:108 nack pli\r\na=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f\r\na=rtpmap:109 rtx/90000\r\na=fmtp:109 apt=108\r\na=rtpmap:35 AV1X/90000\r\na=rtcp-fb:35 goog-remb\r\na=rtcp-fb:35 transport-cc\r\na=rtcp-fb:35 ccm fir\r\na=rtcp-fb:35 nack\r\na=rtcp-fb:35 nack pli\r\na=rtpmap:36 rtx/90000\r\na=fmtp:36 apt=35\r\na=rtpmap:124 H264/90000\r\na=rtcp-fb:124 goog-remb\r\na=rtcp-fb:124 transport-cc\r\na=rtcp-fb:124 ccm fir\r\na=rtcp-fb:124 nack\r\na=rtcp-fb:124 nack pli\r\na=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f\r\na=rtpmap:119 rtx/90000\r\na=fmtp:119 apt=124\r\na=rtpmap:123 H264/90000\r\na=rtcp-fb:123 goog-remb\r\na=rtcp-fb:123 transport-cc\r\na=rtcp-fb:123 ccm fir\r\na=rtcp-fb:123 nack\r\na=rtcp-fb:123 nack pli\r\na=fmtp:123 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f\r\na=rtpmap:118 rtx/90000\r\na=fmtp:118 apt=123\r\na=rtpmap:114 red/90000\r\na=rtpmap:115 rtx/90000\r\na=fmtp:115 apt=114\r\na=rtpmap:116 ulpfec/90000\r\na=ssrc-group:FID 3413953811 262260280\r\na=ssrc:3413953811 cname:uMbjTBwYv//E4gZM\r\na=ssrc:3413953811 msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 306ab058-0f3b-4a6d-a039-d7495360c506\r\na=ssrc:3413953811 mslabel:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\na=ssrc:3413953811 label:306ab058-0f3b-4a6d-a039-d7495360c506\r\na=ssrc:262260280 cname:uMbjTBwYv//E4gZM\r\na=ssrc:262260280 msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 306ab058-0f3b-4a6d-a039-d7495360c506\r\na=ssrc:262260280 mslabel:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\na=ssrc:262260280 label:306ab058-0f3b-4a6d-a039-d7495360c506\r\n' - }) - - when('I want to set simulcast', async () => { - simulcastSdp = SdpParser.setSimulcast(localSdp, codec) - }) - - then('returns the sdp without simulcast', async () => { - expect(Object.is(localSdp, simulcastSdp)).toBe(true) - }) - }) - - test('Set simulcast in Chrome, h264 codec and no video in sdp', ({ given, when, then }) => { - let codec - let localSdp - let resultSdp - - given('I am using Chrome, h264 codec and no video in sdp', async () => { - codec = 'h264' - localSdp = - 'v=0\r\no=- 6951551582290178118 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:47zq\r\na=ice-pwd:L1hL3yV+MsLmlx/yuN31ApfQ\r\na=ice-options:trickle\r\na=fingerprint:sha-256 EA:A4:8E:38:4A:31:61:A2:59:78:EB:AD:2E:77:3F:C0:BA:D1:13:93:0A:F3:4F:32:AB:8A:3A:E0:10:4E:95:C3\r\na=setup:actpass\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=sendrecv\r\na=msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 adb18b70-1d59-41e0-a080-f6e57efeac19\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:110 telephone-event/48000\r\na=rtpmap:112 telephone-event/32000\r\na=rtpmap:113 telephone-event/16000\r\na=rtpmap:126 telephone-event/8000\r\na=ssrc:2213016228 cname:uMbjTBwYv//E4gZM\r\na=ssrc:2213016228 msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 adb18b70-1d59-41e0-a080-f6e57efeac19\r\na=ssrc:2213016228 mslabel:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\na=ssrc:2213016228 label:adb18b70-1d59-41e0-a080-f6e57efeac19\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:47zq\r\na=ice-pwd:L1hL3yV+MsLmlx/yuN31ApfQ\r\na=ice-options:trickle\r\na=fingerprint:sha-256 EA:A4:8E:38:4A:31:61:A2:59:78:EB:AD:2E:77:3F:C0:BA:D1:13:93:0A:F3:4F:32:AB:8A:3A:E0:10:4E:95:C3\r\na=setup:actpass\r\na=mid:1\r\na=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:13 urn:3gpp:video-orientation\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=sendrecv\r\na=msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 306ab058-0f3b-4a6d-a039-d7495360c506\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:96 VP8/90000\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-fb:96 transport-cc\r\na=rtcp-fb:96 ccm fir\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtpmap:97 rtx/90000\r\na=fmtp:97 apt=96\r\na=rtpmap:98 VP9/90000\r\na=rtcp-fb:98 goog-remb\r\na=rtcp-fb:98 transport-cc\r\na=rtcp-fb:98 ccm fir\r\na=rtcp-fb:98 nack\r\na=rtcp-fb:98 nack pli\r\na=fmtp:98 profile-id=0\r\na=rtpmap:99 rtx/90000\r\na=fmtp:99 apt=98\r\na=rtpmap:100 VP9/90000\r\na=rtcp-fb:100 goog-remb\r\na=rtcp-fb:100 transport-cc\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=fmtp:100 profile-id=2\r\na=rtpmap:101 rtx/90000\r\na=fmtp:101 apt=100\r\na=rtpmap:102 H264/90000\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\r\na=rtpmap:121 rtx/90000\r\na=fmtp:121 apt=102\r\na=rtpmap:127 H264/90000\r\na=rtcp-fb:127 goog-remb\r\na=rtcp-fb:127 transport-cc\r\na=rtcp-fb:127 ccm fir\r\na=rtcp-fb:127 nack\r\na=rtcp-fb:127 nack pli\r\na=fmtp:127 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f\r\na=rtpmap:120 rtx/90000\r\na=fmtp:120 apt=127\r\na=rtpmap:125 H264/90000\r\na=rtcp-fb:125 goog-remb\r\na=rtcp-fb:125 transport-cc\r\na=rtcp-fb:125 ccm fir\r\na=rtcp-fb:125 nack\r\na=rtcp-fb:125 nack pli\r\na=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:107 rtx/90000\r\na=fmtp:107 apt=125\r\na=rtpmap:108 H264/90000\r\na=rtcp-fb:108 goog-remb\r\na=rtcp-fb:108 transport-cc\r\na=rtcp-fb:108 ccm fir\r\na=rtcp-fb:108 nack\r\na=rtcp-fb:108 nack pli\r\na=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f\r\na=rtpmap:109 rtx/90000\r\na=fmtp:109 apt=108\r\na=rtpmap:35 AV1X/90000\r\na=rtcp-fb:35 goog-remb\r\na=rtcp-fb:35 transport-cc\r\na=rtcp-fb:35 ccm fir\r\na=rtcp-fb:35 nack\r\na=rtcp-fb:35 nack pli\r\na=rtpmap:36 rtx/90000\r\na=fmtp:36 apt=35\r\na=rtpmap:124 H264/90000\r\na=rtcp-fb:124 goog-remb\r\na=rtcp-fb:124 transport-cc\r\na=rtcp-fb:124 ccm fir\r\na=rtcp-fb:124 nack\r\na=rtcp-fb:124 nack pli\r\na=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f\r\na=rtpmap:119 rtx/90000\r\na=fmtp:119 apt=124\r\na=rtpmap:123 H264/90000\r\na=rtcp-fb:123 goog-remb\r\na=rtcp-fb:123 transport-cc\r\na=rtcp-fb:123 ccm fir\r\na=rtcp-fb:123 nack\r\na=rtcp-fb:123 nack pli\r\na=fmtp:123 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f\r\na=rtpmap:118 rtx/90000\r\na=fmtp:118 apt=123\r\na=rtpmap:114 red/90000\r\na=rtpmap:115 rtx/90000\r\na=fmtp:115 apt=114\r\na=rtpmap:116 ulpfec/90000\r\na=ssrc-group:FID 3413953811 262260280\r\na=ssrc:3413953811 cname:uMbjTBwYv//E4gZM\r\na=ssrc:3413953811 msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 306ab058-0f3b-4a6d-a039-d7495360c506\r\na=ssrc:3413953811 mslabel:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\na=ssrc:3413953811 label:306ab058-0f3b-4a6d-a039-d7495360c506\r\na=ssrc:262260280 cname:uMbjTBwYv//E4gZM\r\na=ssrc:262260280 msid:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0 306ab058-0f3b-4a6d-a039-d7495360c506\r\na=ssrc:262260280 mslabel:Z1VOhybPunxH0OkYHSjWfuVeQS0hP7KE2VF0\r\na=ssrc:262260280 label:306ab058-0f3b-4a6d-a039-d7495360c506\r\n' - }) - - when('I want to set simulcast', async () => { - resultSdp = SdpParser.setSimulcast(localSdp, codec) - }) - - then('throws an error', async () => { - expect(resultSdp).toEqual(localSdp) - }) - }) -})