Browse Source

util.supports.binary => util.supports.sctp as well.

Michelle Bu 11 years ago
parent
commit
991506c40e
3 changed files with 4 additions and 4 deletions
  1. 2 2
      dist/peer.js
  2. 0 0
      dist/peer.min.js
  3. 2 2
      lib/dataconnection.js

+ 2 - 2
dist/peer.js

@@ -1742,7 +1742,7 @@ DataConnection.prototype.initialize = function(dc) {
 
 DataConnection.prototype._configureDataChannel = function() {
   var self = this;
-  if (util.supports.binary) {
+  if (util.supports.sctp) {
     this._dc.binaryType = 'arraybuffer';
   }
   this._dc.onopen = function() {
@@ -1830,7 +1830,7 @@ DataConnection.prototype.send = function(data) {
     var utf8 = (this.serialization === 'binary-utf8');
     var blob = util.pack(data, utf8);
     // DataChannel currently only supports strings.
-    if (!util.supports.binary) {
+    if (!util.supports.sctp) {
       util.blobToBinaryString(blob, function(str) {
         self._dc.send(str);
       });

File diff suppressed because it is too large
+ 0 - 0
dist/peer.min.js


+ 2 - 2
lib/dataconnection.js

@@ -44,7 +44,7 @@ DataConnection.prototype.initialize = function(dc) {
 
 DataConnection.prototype._configureDataChannel = function() {
   var self = this;
-  if (util.supports.binary) {
+  if (util.supports.sctp) {
     this._dc.binaryType = 'arraybuffer';
   }
   this._dc.onopen = function() {
@@ -132,7 +132,7 @@ DataConnection.prototype.send = function(data) {
     var utf8 = (this.serialization === 'binary-utf8');
     var blob = util.pack(data, utf8);
     // DataChannel currently only supports strings.
-    if (!util.supports.binary) {
+    if (!util.supports.sctp) {
       util.blobToBinaryString(blob, function(str) {
         self._dc.send(str);
       });

Some files were not shown because too many files changed in this diff