How to use the mediasoup-client/lib/ortc.getSendingRtpParameters function in mediasoup-client

To help you get started, we’ve selected a few mediasoup-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kurento / mediasoup-demos / mediasoup-kurento-filter / server.js View on Github external
});
  console.log(
    "kmsRtpCapabilities: %s",
    JSON.stringify(kmsRtpCapabilities, null, 2)
  );

  const msExtendedRtpCapabilities = MediasoupOrtc.getExtendedRtpCapabilities(
    kmsRtpCapabilities,
    global.mediasoup.router.rtpCapabilities
  );
  console.log(
    "msExtendedRtpCapabilities: %s",
    JSON.stringify(msExtendedRtpCapabilities, null, 2)
  );

  const kmsRtpSendParameters = MediasoupOrtc.getSendingRtpParameters(
    "video",
    msExtendedRtpCapabilities
  );
  kmsRtpSendParameters.encodings = MediasoupRtpUtils.getRtpEncodings({
    sdpObject: kmsSdpAnswerObj,
    kind: "video"
  });
  console.log(
    "kmsRtpSendParameters: %s",
    JSON.stringify(kmsRtpSendParameters, null, 2)
  );

  // mediasoup RTP producer (Receive media from Kurento)
  // ---------------------------------------------------

  const msProducer = await msTransport.produce({