Proposal for more NavigatorUserMediaError error codes

Following on from a conversation about the implementation of error codes returned by a getUserMedia request (see http://lists.w3.org/Archives/Public/public-media-capture/2013Jul/0034.html ), I'd like to submit a proposal to formally add two more error codes to the spec.

Firstly, there are already two error codes defined by the spec (see http://dev.w3.org/2011/webrtc/editor/getusermedia.html#attributes-4 )

1. PERMISSION_DENIED - User denied permission for scripts from this origin to access the media device
2. CONSTRAINT_NOT_SATISFIED - One of the mandatory constraints could not be satisfied

In addition to these, please consider the following:

3. HARDWARE_UNAVAILABLE - A suitable device is connected but a hardware error prevented access (such as an OS/program/webpage lock)
4. NO_DEVICES_FOUND - No suitable devices are connected whatsoever

There was consensus that #3 and #4 would be good additions, and no counterarguments were put forward for not implementing them. Perhaps there is a case for even more error codes, but that is not for this proposal. These extra two error codes stand out with a clear and understandable use case.

Firefox has already implemented error codes #3 and #4, so the grounds for this has been proven and well tested.

Thank you for your consideration.
Paul.

Received on Tuesday, 30 July 2013 11:59:56 UTC