Re: RTCRtpParameter defaults?

Yes, it is surprising that this was missing. Probably would be good to check make sure we didn't miss other things too.

On Jun 16, 2014, at 5:50 PM, "Peter Thatcher" <pthatcher@google.com<mailto:pthatcher@google.com>> wrote:

I think it would make more sense to have read-only attributes of RtpSender.parameters and RtpReceiver.parameters.  I'm surprised they aren't already there.  Then it's just a question of whether we have an event/promise indicating when send/receive has taken effect.


On Fri, Jun 13, 2014 at 3:10 PM, Robin Raymond <robin@hookflash.com<mailto:robin@hookflash.com>> wrote:

It just occurred to me that we have no way to know the defaults chosen by the browser engine when calling RTCRtpSender.send(...) or RTCRtpReceiver.receive(...) method. You may need that if you intend the browser engine to pick things like SSRC values for you but still signal those on the wire.


I suggest we can solve this by returning a Promise<RTCRtpParameters> from the send(..) and the receive(...) methods.

Example:

interface RTCRtpSender {
    //...
    Promise<RTCRtpParameters> send (RTCRtpParameters parameters);
    //...
};

The "send(...)" method returns a Promise whose "resolve" function will execute when the send parameters have taken effect and be pass back a copy of the RTCRtpParameters previously passed in with any browser chosen defaults appropriately filled as needed.


interface RTCRtpReceiver {
    //...
    Promise<RTCRtpParameters> receive (RTCRtpParameters parameters);
    //...
};

The "receive(...)" method returns a Promise whose "resolve" function will execute when the receive parameters have taken effect and be pass back a copy of the RTCRtpParameters previously passed in with any browser chosen defaults appropriately filled as needed.


In programmer can then do:

var promise = sender.send(params);
promise.then(function(params) { ... success with params filled in.... }, function() {... failure...});


This also gives knowledge of when send/receive are activated should any asynchronous operations be required to fulfill the send/receive requests.

-Robin

Received on Monday, 16 June 2014 22:58:43 UTC