Comparing version 2.1.0 to 2.2.0
{ | ||
"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 + ' '); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48561
10
1220