Skip to content
This repository has been archived by the owner on Dec 4, 2017. It is now read-only.

Commit

Permalink
Remove constraints that turn off datachannels for audio calls only
Browse files Browse the repository at this point in the history
  • Loading branch information
tOkeshu committed Jan 31, 2013
1 parent 2a2bf9d commit 04cfdd7
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions static/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ var webrtcMedia = {
var pc = this._createBasicPc(aWin, aPerson, true, aAudioOnly, aConnectionCallback,
aDataConnectionCallback);

// XXX Disable the data channel if it is an audio-only call to accomodate android for now.
var constraints;
if (aAudioOnly)
constraints = { 'mandatory': { "MozDontOfferDataChannel": true }};

(aAudioOnly ? this._setupAudioOnly : this._setupAudioVideo)(aWin,
pc,
function() {
Expand All @@ -27,7 +22,7 @@ var webrtcMedia = {
});
}, function(err) { alert("setLocalDescription failed: " + err);
});
}, function(err) { alert("createOffer failed: " + err); }, constraints);
}, function(err) { alert("createOffer failed: " + err); });
});
return pc;
},
Expand All @@ -37,11 +32,6 @@ var webrtcMedia = {
var pc = this._createBasicPc(aWin, aData.from, false, aAudioOnly, aConnectionCallback,
aDataConnectionCallback);

// XXX Disable the data channel if it is an audio-only call to accomodate android for now.
var constraints;
if (aAudioOnly)
constraints = { 'mandatory': { "MozDontOfferDataChannel": true }};

pc.setRemoteDescription(JSON.parse(aData.request), function() {
(aAudioOnly ? webrtcMedia._setupAudioOnly :
webrtcMedia._setupAudioVideo)(aWin, pc, function() {
Expand Down Expand Up @@ -75,7 +65,7 @@ var webrtcMedia = {
});
pc.connectDataConnection(localPort, remotePort);
}, function(err) {alert("failed to setLocalDescription, " + err);});
}, function(err) {alert("failed to createAnswer, " + err);}, constraints);
}, function(err) {alert("failed to createAnswer, " + err);});
}, true);
}, function(err) {alert("failed to setRemoteDescription, " + err); });

Expand Down

0 comments on commit 04cfdd7

Please sign in to comment.