shinyoshiaki / werift-webrtc

WebRTC Implementation for TypeScript (Node.js), includes ICE/DTLS/SCTP/RTP/SRTP/WEBM/MP4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

useSdesMid causes negotiation with Google Camera to fail

koush opened this issue · comments

This change introduced a bug in the scrypted google camera plugin.
This likely isn't a bug in werift. removing the extensions allows the webrtc connection to negotiate successfully (google returns 500 error otherwise).

f934e1a#diff-3bc78b20b7ffa3340be89f975e4457f6b8a11a11f67789d5554286e6ab0780caR1549

What are your thoughts on using conservative defaults to prevent issues like this? There are probably various sdp/webrtc consumers out there that will choke on unexpected data.

Here is my workaround in my code:

  const ret = new RTCPeerConnection({
          bundlePolicy: setup.configuration?.bundlePolicy as BundlePolicy,
          codecs: {
              audio: [
                  ...requiredAudioCodecs,
              ],
              video: [
                  requiredVideoCodec,
              ],
          },
          iceServers: getWeriftIceServers(setup.configuration),
      });

      ret.config.headerExtensions = {
          video: [],
          audio: [],
      };

The headerExtension is supposed to be negotiated to avoid compatibility issues.
GoogleCamera doesn't seem to negotiate for some reason...
There is no strong desire to include sdesMid in the default configuration, so I'll set the default back to an empty array for now.

v0.15.10 released