Skip to content

Commit

Permalink
Re-release of 0.14.2 due to unwanted modifications to third_adapter/a…
Browse files Browse the repository at this point in the history
…dapter.
  • Loading branch information
Leticia Choo committed May 22, 2017
1 parent 4c62111 commit 93fe8e1
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 20 deletions.
32 changes: 24 additions & 8 deletions publish/adapter.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -2086,10 +2086,11 @@ var edgeShim = {
var dtlsTransport = transceiver.dtlsTransport;
var localCapabilities = transceiver.localCapabilities;
var remoteCapabilities = transceiver.remoteCapabilities;

var rejected = mediaSection.split('\n', 1)[0]
.split(' ', 2)[1] === '0';

if (!rejected) {
if (!rejected && !transceiver.isDatachannel) {
var remoteIceParameters = SDPUtils.getIceParameters(
mediaSection, sessionpart);
if (isIceLite) {
Expand Down Expand Up @@ -2194,6 +2195,22 @@ var edgeShim = {
var rejected = mline[1] === '0';
var direction = SDPUtils.getDirection(mediaSection, sessionpart);

var mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:');
if (mid.length) {
mid = mid[0].substr(6);
} else {
mid = SDPUtils.generateIdentifier();
}

// Reject datachannels which are not implemented yet.
if (kind === 'application' && mline[2] === 'DTLS/SCTP') {
self.transceivers[sdpMLineIndex] = {
mid: mid,
isDatachannel: true
};
return;
}

var transceiver;
var iceGatherer;
var iceTransport;
Expand All @@ -2219,13 +2236,6 @@ var edgeShim = {
recvEncodingParameters =
SDPUtils.parseRtpEncodingParameters(mediaSection);

var mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:');
if (mid.length) {
mid = mid[0].substr(6);
} else {
mid = SDPUtils.generateIdentifier();
}

var cname;
// Gets the first SSRC. Note that with RTX there might be multiple
// SSRCs.
Expand Down Expand Up @@ -2631,6 +2641,12 @@ var edgeShim = {
}).join(' ') + '\r\n';
}
this.transceivers.forEach(function(transceiver) {
if (transceiver.isDatachannel) {
sdp += 'm=application 0 DTLS/SCTP 5000\r\n' +
'c=IN IP4 0.0.0.0\r\n' +
'a=mid:' + transceiver.mid + '\r\n';
return;
}
// Calculate intersection of capabilities.
var commonCapabilities = self._getCommonCapabilities(
transceiver.localCapabilities,
Expand Down
4 changes: 2 additions & 2 deletions publish/adapter.min.js

Large diffs are not rendered by default.

32 changes: 24 additions & 8 deletions publish/adapter.screenshare.js
Original file line number Diff line number Diff line change
Expand Up @@ -2086,10 +2086,11 @@ var edgeShim = {
var dtlsTransport = transceiver.dtlsTransport;
var localCapabilities = transceiver.localCapabilities;
var remoteCapabilities = transceiver.remoteCapabilities;

var rejected = mediaSection.split('\n', 1)[0]
.split(' ', 2)[1] === '0';

if (!rejected) {
if (!rejected && !transceiver.isDatachannel) {
var remoteIceParameters = SDPUtils.getIceParameters(
mediaSection, sessionpart);
if (isIceLite) {
Expand Down Expand Up @@ -2194,6 +2195,22 @@ var edgeShim = {
var rejected = mline[1] === '0';
var direction = SDPUtils.getDirection(mediaSection, sessionpart);

var mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:');
if (mid.length) {
mid = mid[0].substr(6);
} else {
mid = SDPUtils.generateIdentifier();
}

// Reject datachannels which are not implemented yet.
if (kind === 'application' && mline[2] === 'DTLS/SCTP') {
self.transceivers[sdpMLineIndex] = {
mid: mid,
isDatachannel: true
};
return;
}

var transceiver;
var iceGatherer;
var iceTransport;
Expand All @@ -2219,13 +2236,6 @@ var edgeShim = {
recvEncodingParameters =
SDPUtils.parseRtpEncodingParameters(mediaSection);

var mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:');
if (mid.length) {
mid = mid[0].substr(6);
} else {
mid = SDPUtils.generateIdentifier();
}

var cname;
// Gets the first SSRC. Note that with RTX there might be multiple
// SSRCs.
Expand Down Expand Up @@ -2631,6 +2641,12 @@ var edgeShim = {
}).join(' ') + '\r\n';
}
this.transceivers.forEach(function(transceiver) {
if (transceiver.isDatachannel) {
sdp += 'm=application 0 DTLS/SCTP 5000\r\n' +
'c=IN IP4 0.0.0.0\r\n' +
'a=mid:' + transceiver.mid + '\r\n';
return;
}
// Calculate intersection of capabilities.
var commonCapabilities = self._getCommonCapabilities(
transceiver.localCapabilities,
Expand Down
4 changes: 2 additions & 2 deletions publish/adapter.screenshare.min.js

Large diffs are not rendered by default.

0 comments on commit 93fe8e1

Please sign in to comment.