Explorar o código

force certain options values for Firefox.

Michelle Bu %!s(int64=12) %!d(string=hai) anos
pai
achega
c5ba1dbd4b
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      lib/dataconnection.js

+ 4 - 2
lib/dataconnection.js

@@ -14,10 +14,12 @@ function DataConnection(peer, dc, options) {
   this.open = false;
 
   this.label = options.label;
+  // Firefox is not this finely configurable.
   this.metadata = options.metadata;
-  this.serialization = options.serialization;
+  this.serialization = util.browserisms !== 'Firefox' ? options.serialization : 'binary';
+  this._isReliable = util.browserisms !== 'Firefox' ? options.reliable : true;
+
   this.peer = peer;
-  this._isReliable = options.reliable;
 
   this._dc = dc;
   if (!!this._dc) {