Comparing version 2.10.0 to 2.11.0
@@ -1,1 +0,1 @@ | ||
{"processes":{"229122ed-c259-491a-bfe5-095ed0fbda6e":{"parent":null,"children":["a0d3f05b-2061-47f8-9cc2-5ad88ca31ac7"]},"a0d3f05b-2061-47f8-9cc2-5ad88ca31ac7":{"parent":"229122ed-c259-491a-bfe5-095ed0fbda6e","children":[]}},"files":{"/home/fippo/webrtc/sdp/sdp.js":["a0d3f05b-2061-47f8-9cc2-5ad88ca31ac7"]},"externalIds":{}} | ||
{"processes":{"3ca854c1-a79a-4efe-be3f-5dc67f20ccc8":{"parent":"ca2fd53e-5ee2-43c8-be3a-f47da78de5e7","children":[]},"ca2fd53e-5ee2-43c8-be3a-f47da78de5e7":{"parent":null,"children":["3ca854c1-a79a-4efe-be3f-5dc67f20ccc8"]}},"files":{"/media/fippo/houseparty/webrtc/sdp/sdp.js":["3ca854c1-a79a-4efe-be3f-5dc67f20ccc8"]},"externalIds":{}} |
{ | ||
"name": "sdp", | ||
"version": "2.10.0", | ||
"version": "2.11.0", | ||
"description": "SDP parsing and serialization utilities", | ||
@@ -5,0 +5,0 @@ "main": "sdp.js", |
28
sdp.js
@@ -314,2 +314,30 @@ /* eslint-env node */ | ||
}; | ||
// Parses a=crypto lines into | ||
// https://rawgit.com/aboba/edgertc/master/msortc-rs4.html#dictionary-rtcsrtpsdesparameters-members | ||
SDPUtils.parseCryptoLine = function(line) { | ||
var parts = line.substr(9).split(' '); | ||
return { | ||
tag: parseInt(parts[0], 10), | ||
cryptoSuite: parts[1], | ||
keyParams: parts[2], | ||
sessionParams: parts[3], | ||
}; | ||
}; | ||
SDPUtils.writeCryptoLine = function(parameters) { | ||
return 'a=crypto:' + parameters.tag + ' ' + | ||
parameters.cryptoSuite + ' ' + | ||
parameters.keyParams + | ||
(parameters.sessionParams ? ' ' + parameters.sessionParams : '') + | ||
'\r\n'; | ||
}; | ||
// Extracts all SDES paramters. | ||
SDPUtils.getCryptoParameters = function(mediaSection, sessionpart) { | ||
var lines = SDPUtils.matchPrefix(mediaSection + sessionpart, | ||
'a=crypto:'); | ||
return lines.map(SDPUtils.parseCryptoLine); | ||
}; | ||
// Parses ICE information from SDP media section or sessionpart. | ||
@@ -316,0 +344,0 @@ // FIXME: for consistency with other functions this should only |
Sorry, the diff of this file is not supported yet
95203
731