Browse Source

add missing feature from https://github.com/peers/peerjs/commit/84fe0ee2d92d8e6d1a9926efcd1873f1b7cce324

afrokick 6 years ago
parent
commit
14ff7f80ad
1 changed files with 4 additions and 0 deletions
  1. 4 0
      lib/negotiator.ts

+ 4 - 0
lib/negotiator.ts

@@ -247,6 +247,10 @@ class Negotiator {
         }
       }
 
+      if (connection.options.sdpTransform && typeof connection.options.sdpTransform === 'function') {
+        offer.sdp = connection.options.sdpTransform(offer.sdp) || offer.sdp;
+      }
+
       try {
         await peerConnection.setLocalDescription(offer);