Switches camera id to mandatory when using old gum flow. (#731)
* Switches camera id to mandatory when using old gum flow.
When it fails we retry with different resolutions, and if that doesn't work we remove device id and let gum to decide which device to use.
* Fixes comments.
This is a two part fix:
- In the new gum flow, this.getUserMedia supports promises
and rejections were not getting caught. So change
_newGetUserMediaWithConstraints to be promise based instead
of callback.
- The error name returned from blocked device permissions is
NotAllowedError, as adapter shims PermissionDeniedError
to be NotAllowedError.
ESLint 4.8.0 discovers a lot of error related to formatting. While I
tried to fix as many of them as possible, a portion of them actually go
against our coding style. In such a case, I've disabled the indent rule
which effectively leaves it as it was before ESLint 4.8.0.
CHROME_EXTENSION_USER_GESTURE_REQUIRED will be triggered if
the extension installation fails, because the request to get desktop
stream did not originate in user gesture handler (a button click for
example).
Firefox uses "constraint" as the key in the error:
```
[modules/RTC/RTCUtils.js] <value/<>: Failed to get access to local media. Error
MediaStreamError { name: "OverconstrainedError", message: "Constraints could be
not satisfied.", constraint: "width", stack: "" } Object { audio: false, video:
Object } lib-jitsi-meet.min.js:6:10419
```