ICE Progress and Error in API

I'd like to change the API to allow an application that is interested to see the state of ICE progression and any errors encountered. For example, TURN servers needs a user credential, but if the wrong one is provided, there is no way for the current API to report to the JS app that the credential was bad. Simple applications could ignore all this and just take the optimistic "do your best" but for more advanced applications, I'm proposing the API can report things like:
 
When a connection is works is found and what that connection is (for example, something with directly connectivity might transfer data differently than one that was using a TURN server).

When a connection stops working. 

When connection to STUN and TURN servers fail or succeed.

When all the checks are finished. 

Control over how long it waits after finding the first connection that works before starting to use it. This gives time to find a better connection. Control if after a conniption is selected for use, if ICE keeps looking for a better connection. 

When the other side disconnects. 

Are there any stats applications need?

Thoughts on how what the API for these might look like?

At some level, these might not seem necessary but tracking down why ICE fails is very hard and we will need to help provide enough information to the JS app that it can provide meaningful errors to users. 

Received on Tuesday, 30 August 2011 18:34:05 UTC