W3C home > Mailing lists > Public > public-ortc@w3.org > June 2014

RTCRtpParameter defaults?

From: Robin Raymond <robin@hookflash.com>
Date: Fri, 13 Jun 2014 18:10:05 -0400
To: "public-ortc@w3.org" <public-ortc@w3.org>
Message-ID: <etPan.539b76bd.1d9f6e5f.14422@macmini.local>

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 Friday, 13 June 2014 22:10:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:05:18 UTC