Эх сурвалжийг харах

force certain options values for Firefox.

Michelle Bu 12 жил өмнө
parent
commit
c5ba1dbd4b
1 өөрчлөгдсөн 4 нэмэгдсэн , 2 устгасан
  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) {