-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update sjj to work with latest sdp examples #28
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules | ||
build | ||
.vscode |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- '0.10' | ||
- 10 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,7 @@ exports.toMediaJSON = function (media, session, opts) { | |
applicationType: 'rtp', | ||
media: mline.media, | ||
payloads: [], | ||
port: mline.port, | ||
encryption: [], | ||
feedback: [], | ||
headerExtensions: [] | ||
|
@@ -73,8 +74,17 @@ exports.toMediaJSON = function (media, session, opts) { | |
if (mline.media == 'application') { | ||
// FIXME: the description is most likely to be independent | ||
// of the SDP and should be processed by other parts of the library | ||
|
||
var sctpLine = parsers.findLine('a=sctp-port', lines); | ||
var sctpPort = sctpLine && sctpLine.split('sctp-port:')[1]; | ||
var maxMessageSizeLine = parsers.findLine('a=max-message-size', lines); | ||
var maxMessageSize = maxMessageSizeLine && maxMessageSizeLine.split('max-message-size:')[1]; | ||
|
||
content.application = { | ||
applicationType: 'datachannel' | ||
applicationType: 'datachannel', | ||
port: mline.port, | ||
sctpPort: sctpPort, | ||
maxMessageSize: maxMessageSize | ||
}; | ||
content.transport.sctp = []; | ||
} | ||
|
@@ -194,6 +204,10 @@ exports.toMediaJSON = function (media, session, opts) { | |
trans.fingerprints.push(fp); | ||
}); | ||
|
||
if (parsers.findLine('a=ice-options:trickle', lines)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i'd do this in a separate PR/commit for atomicity There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually this shouldn't be mapped. First its not really relevant in the SDP, second, as xep-0371 explains we have disco for this kind of stuff. |
||
trans.trickleIce = true; | ||
} | ||
|
||
var ufragLine = parsers.findLine('a=ice-ufrag:', lines, sessionLines); | ||
var pwdLine = parsers.findLine('a=ice-pwd:', lines, sessionLines); | ||
if (ufragLine && pwdLine) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is transported via xep-0343 which would need to be updated along with the stanza definitions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit unclear about what you mean by this. Is there something I need to do here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the xmpp way to transport this is currently from here
which doesn't transport things like maxMessageSize. So I expect that if you signal this you'll need to update the stanza.io version you're using as well.