- From: Iñaki Baz Castillo via GitHub <sysbot+gh@w3.org>
- Date: Fri, 01 Apr 2016 00:22:45 +0000
- To: public-ortc@w3.org
ibc has just created a new issue for https://github.com/openpeer/ortc: == [Proposal] RtpSender setParameters(), getParameters() and send() == Let's assume I want to send video. I get my video capabilities: ```js var myVideoCaps = RTCRtpSender.getCapabilities('video'); // I get this: { codecs : [ { name : 'VP8', kind : 'video', clockRate : 90000, preferredPayloadType : 100, rtx : { preferredPayloadType : 96, rtxTime : 1234 // No idea }, rtcpFeedback : [ { type: 'ccm', parameter: 'fir' }, { type: 'nack' } ] } ] } ``` So just VP8 with RTX and some RTCP stuff. Assuming I exchange my capabilities with the remote peer and we both agree on VP8, I need to construct my `RTCRtpParameters` which would look as follows: ```js var myRtpParameters = { muxId : 'my-video', // Yeah! codecs : [ { name : 'VP8', clockRate : 90000, payloadType : 100, rtx : { payloadType : 96, rtxTime : 1234 }, rtcpFeedback : [ { type: 'ccm', parameter: 'fir' }, { type: 'nack' } ] } ], encodings : [], // Empty rtcp : // TODO }; ``` **QUESTION 1:** How can I set the `RTCRtcpParameters` `rtcp` field? **QUESTION 2:** Simple scenario so, of course, I can leave the `encodings` field empty. But... it happens that I need to generate a SDP offer so I need the SSRCs. This means that I need to create the `encodings` sequence by myself. Ok, we know that we'll just send VP8 and its RTX, so it is clear that just 2 streams are needed, so we can create this `encodings`: ```js myRtpParameters.encodings = [ { ssrc : 11111111, // why not? codecPayloadType : 100 }, { ssrc : 22222222, // why not? codecPayloadType : 96 } ]; ``` **QUESTION 3:** This is a very simple example. Let's imagine multiple codecs, FEC, RED, etc. And I do need the SSRCs before sending media. Do I really need to create a complex `encodings` sequence with as many entries as media codecs + feature codecs? Simpler API solution: ```js var myRtpParameters; // The above RTCRtpParameters with no `encodings` nor `rtcp` // Set my RTP parameters but don't send RTP yet videoRtpSender.setParameters(myRtpParameters); // Get the completed & updated parameters (includes `encodings` and `rtcp`) var myUpdatedRtpParameters = videoRtpSender.getParameters(); // Let's create a SDP offer and send it, etc // Send RTP videoRtpSender.send(); // No arguments ``` **QUESTION 4:** How am I supposed to set the remaining `RTCRtpEncodingParameters` fields? I mean: ``` unsigned long maxBitrate; double minQuality = 0; double resolutionScale; double framerateScale; boolean active = true; DOMString encodingId; sequence<DOMString> dependencyEncodingIds; ``` Who is supposed to fill them? how can I know which values are supported by my browser? Please view or discuss this issue at https://github.com/openpeer/ortc/issues/447 using your GitHub account
Received on Friday, 1 April 2016 00:22:49 UTC