Socket
Socket
Sign inDemoInstall

sdp

Package Overview
Dependencies
0
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.1 to 1.5.0

2

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

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

@@ -225,2 +225,11 @@ /* eslint-env node */

// Extracts the MID (RFC 5888) from a media section.
// returns the MID or undefined if no mid line was found.
SDPUtils.getMid = function(mediaSection) {
var mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:')[0];
if (mid) {
return mid.substr(6);
}
}
// Extracts DTLS parameters from SDP media section or sessionpart.

@@ -227,0 +236,0 @@ // FIXME: for consistency with other functions this should only

@@ -229,1 +229,9 @@ /* jshint node: true */

});
test('getMid', function(t) {
var mediaSection = 'm=video 9 UDP/TLS/RTP/SAVPF 120 126 97\r\n' +
'c=IN IP4 0.0.0.0\r\na=sendrecv\r\n';
t.ok(SDPUtils.getMid(mediaSection + 'a=mid:foo\r\n') === 'foo', 'returns the mid');
t.ok(SDPUtils.getMid(mediaSection) === undefined, 'returns undefined when no a=mid is present');
t.end();
});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡ïļ by Socket Inc