|
@@ -170,7 +170,7 @@ DataConnection.prototype.send = function(data, chunked) {
|
|
|
|
|
|
// For Chrome-Firefox interoperability, we need to make Firefox "chunk"
|
|
|
// the data it sends out.
|
|
|
- var needsChunking = util.chunkedBrowsers.indexOf(this._peerBrowser) !== -1 || util.browser !== 'Firefox';
|
|
|
+ var needsChunking = util.chunkedBrowsers[this._peerBrowser] || util.chunkedBrowsers[util.browser];
|
|
|
if (needsChunking && !chunked && blob.size > util.chunkedMTU) {
|
|
|
this._sendChunks(blob);
|
|
|
return;
|
|
@@ -181,7 +181,7 @@ DataConnection.prototype.send = function(data, chunked) {
|
|
|
util.blobToBinaryString(blob, function(str) {
|
|
|
self._bufferedSend(str);
|
|
|
});
|
|
|
- } else if (!util.supports.binaryBlob || (this._peerSupports && !this._peerSupports.binaryBlob)) {
|
|
|
+ } else if (!util.supports.binaryBlob) {
|
|
|
// We only do this if we really need to (e.g. blobs are not supported),
|
|
|
// because this conversion is costly.
|
|
|
util.blobToArrayBuffer(blob, function(ab) {
|