Explorar o código

add sdp hack back in

Michelle Bu %!s(int64=12) %!d(string=hai) anos
pai
achega
ff4cd79a13
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      lib/connectionmanager.js

+ 9 - 0
lib/connectionmanager.js

@@ -145,6 +145,10 @@ ConnectionManager.prototype._makeOffer = function() {
     // Firefox currently does not support multiplexing once an offer is made.
     self.firefoxSingular = true;
 
+    if (util.browserisms === 'Webkit') {
+      offer.sdp = Reliable.higherBandwidthSDP(offer.sdp);
+    }
+
     self.pc.setLocalDescription(offer, function() {
       util.log('Set localDescription to offer');
       self._socket.send({
@@ -170,6 +174,11 @@ ConnectionManager.prototype._makeAnswer = function() {
   var self = this;
   this.pc.createAnswer(function(answer) {
     util.log('Created answer.');
+
+    if (util.browserisms === 'Webkit') {
+      answer.sdp = Reliable.higherBandwidthSDP(answer.sdp);
+    }
+
     self.pc.setLocalDescription(answer, function() {
       util.log('Set localDescription to answer.');
       self._socket.send({