Re: Another API issue: addStream has no callbacks

On 02/25/2013 10:13 PM, Adam Roach wrote:
> Sometimes it seems like I'm screaming into the void by posting the 
> issues we're actually running into implementing this stuff, but here's 
> another problem we've uncovered with the currently defined API:
>
> addStream() can plausibly fail, and some of those failures can occur 
> asynchronously. Examples of such failures include exhausting encoders 
> of the indicated type (e.g., I might have a device with only one 
> hardware video encoder).
>
> While we could allow these calls to succeed and then return an error 
> when the application attempts to take further action (e.g., 
> createOffer or createAnswer), I think delaying such errors until later 
> will surprise and befuddle application developers.
>
> For these reasons, I would propose the addition of success and error 
> callbacks to addStream.
>
> /a
>
My standard questions for callbacks added to existing APIs:

- Mandatory or optional? (we've preferred mandatory before)
- Before or after the optional "constraints" interface?

And for curiosity - what were the plausible failures?
(I wasn't able to figure out a plausible failure for getStats either 
before we implemented it and found one...)

Received on Monday, 25 February 2013 22:08:42 UTC