Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sdp

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sdp - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

CONTRIBUTING.md

2

package.json
{
"name": "sdp",
"version": "2.1.0",
"version": "2.2.0",
"description": "SDP parsing and serialization utilities",

@@ -5,0 +5,0 @@ "main": "sdp.js",

@@ -531,4 +531,6 @@ /* eslint-env node */

// be generated randomly
SDPUtils.writeSessionBoilerplate = function(sessId) {
// sessVersion is optional and defaults to 2
SDPUtils.writeSessionBoilerplate = function(sessId, sessVer) {
var sessionId;
var version = sessVer !== undefined ? sessVer : 2;
if (sessId) {

@@ -541,3 +543,3 @@ sessionId = sessId;

return 'v=0\r\n' +
'o=thisisadapterortc ' + sessionId + ' 2 IN IP4 127.0.0.1\r\n' +
'o=thisisadapterortc ' + sessionId + ' ' + version + ' IN IP4 127.0.0.1\r\n' +
's=-\r\n' +

@@ -544,0 +546,0 @@ 't=0 0\r\n';

@@ -749,2 +749,15 @@ /* jshint node: true */

});
it('defaults to version 2', () => {
let ver = 4404;
let id = 123;
let sdpWithSessionVersion = SDPUtils.writeSessionBoilerplate(id, ver);
expect(sdpWithSessionVersion).to.include(id + ' ' + ver + ' ');
});
it('uses passed session version', () => {
let ver = 4404;
let sdpWithSessionVersion = SDPUtils.writeSessionBoilerplate(undefined, ver);
expect(sdpWithSessionVersion).to.include(' ' + ver + ' ');
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc