Skip to content

Instantly share code, notes, and snippets.

@kypflug
Created September 1, 2015 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kypflug/d0bc76eee0ee82783796 to your computer and use it in GitHub Desktop.
Save kypflug/d0bc76eee0ee82783796 to your computer and use it in GitHub Desktop.
RTCRtpParameters function myCapsToSendParams (RTCRtpCapabilities sendCaps, RTCRtpCapabilities remoteRecvCaps) {
// Function returning the sender RTCRtpParameters, based on intersection of the local sender and remote receiver capabilities.
// Steps to be followed:
// 1. Determine the RTP features that the receiver and sender have in common.
// 2. Determine the codecs that the sender and receiver have in common.
// 3. Within each common codec, determine the common formats and rtcpFeedback mechanisms.
// 4. Determine the payloadType to be used, based on the receiver preferredPayloadType.
// 5. Set RTCRtcpParameters such as mux to their default values.
}
RTCRtpParameters function myCapsToRecvParams(RTCRtpCapabilities recvCaps, RTCRtpCapabilities remoteSendCaps) {
return myCapsToSendParams(remoteSendCaps, recvCaps);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment