Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const kmsSdpAnswerObj = SdpTransform.parse(kmsSdpAnswer);
console.log("kmsSdpAnswerObj: %s", JSON.stringify(kmsSdpAnswerObj, null, 2));
// Build an RtpSendParameters from the Kurento SDP Answer,
// this gives us the Kurento RTP stream's SSRC, payload type, etc.
const kmsRtpCapabilities = MediasoupSdpUtils.extractRtpCapabilities({
sdpObject: kmsSdpAnswerObj
});
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"
});