ericz 12 жил өмнө
parent
commit
13daedaedb
1 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  1. 3 3
      lib/connection.js

+ 3 - 3
lib/connection.js

@@ -32,7 +32,7 @@ function DataConnection(id, peer, socket, cb, options) {
   
   // Listen for negotiation needed
   // ** Chrome only.
-  if (util.browserisms === 'Webkit') {
+  if (util.browserisms !== 'Firefox') {
     this._setupOffer();
   }
   
@@ -123,8 +123,8 @@ DataConnection.prototype._setupIce = function() {
 DataConnection.prototype._configureDataChannel = function() {
   var self = this;
   
-  if (util.browserisms === 'Firefox') {
-    this._dc.binaryType = 'blob';
+  if (util.browserisms !== 'Webkit') {
+    this._dc.binaryType = 'arraybuffer';
   }
   this._dc.onopen = function() {
     util.log('Data channel connection success');