|
@@ -141,6 +141,9 @@ ConnectionManager.prototype._makeOffer = function() {
|
|
|
var self = this;
|
|
|
this.pc.createOffer(function(offer) {
|
|
|
util.log('Created offer.');
|
|
|
+ // Firefox currently does not support multiplexing once an offer is made.
|
|
|
+ self.firefoxSingular = true;
|
|
|
+
|
|
|
self.pc.setLocalDescription(offer, function() {
|
|
|
util.log('Set localDescription to offer');
|
|
|
self._socket.send({
|
|
@@ -287,7 +290,11 @@ ConnectionManager.prototype.connect = function(options) {
|
|
|
|
|
|
var dc;
|
|
|
if (!!this.pc && !this._lock) {
|
|
|
- dc = this.pc.createDataChannel(options.label, { reliable: false });
|
|
|
+ var reliable = util.browserisms === 'Firefox' ? !!options.reliable : false;
|
|
|
+ dc = this.pc.createDataChannel(options.label, { reliable: reliable });
|
|
|
+ if (util.browserisms === 'Firefox') {
|
|
|
+ this._makeOffer();
|
|
|
+ }
|
|
|
}
|
|
|
var connection = new DataConnection(this.peer, dc, options);
|
|
|
this._attachConnectionListeners(connection);
|