Skip to content

Commit

Permalink
channel_server: no longer delete translated session/candidateDescript…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
Patrik Oldsberg committed Dec 15, 2014
1 parent 2b89cf5 commit c4ed975
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions web/channel_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,22 +120,18 @@ var server = http.createServer(function (request, response) {
type: message.type,
sdp: SDP.generate(message.sessionDescription),
};
delete message.type;
delete message.sessionDescription;
} else if (message.candidate) {
var candidate = message.candidate;
if (candidate.candidate && !candidate.candidateDescription) {
var candidateInfo = SDP.parse("m=application 0 NONE\r\na=" + candidate.candidate + "\r\n");

if (candidateInfo.mediaDescriptions[0]
&& candidateInfo.mediaDescriptions[0].ice
&& candidateInfo.mediaDescriptions[0].ice.candidates
&& candidateInfo.mediaDescriptions[0].ice.candidates[0]) {
&& candidateInfo.mediaDescriptions[0].ice.candidates) {
candidate.candidateDescription = candidateInfo.mediaDescriptions[0].ice.candidates[0];
}
} else if (candidate.candidateDescription && !candidate.candidate) {
var description = candidate.candidateDescription;
delete candidate.candidateDescription;
candidate.candidate = 'candidate:' + [
description.foundation,
description.componentId,
Expand Down

0 comments on commit c4ed975

Please sign in to comment.