Not upadting the permissions from the Permissions API call on init is
causing the permissions cache to be filled from GUM resolve/reject logic
only when there aren't any permissions updates. This may
lead to unknown permission status when we can report the correct
status from the initial permission API request.
fix(safari): Use standard audio constraints on non-chromium browsers
Standard audio constraints need to be passed to gUM for audio input device selection
to work properly on Safari.
Safari doesn't support permissions query, add a workaround for that.
* fix(permissions): remove space from requesting camera
Chrome errors on querying permissions with "camera "
because it does not match an expected enum.
* fix(permissions): check value of returned PermissionStatus
A permissions query returns an object with a status/status
of whether or not permission has been granted. Check that
value in addition to the existence of the object.
* fix(permissions): prevent permission being set to undefined
* ref(permissions): move permissions strings to constants
feat: add methods to check muti-mic support and stats collecting
For audio previewing, some browsers cannot have multiple local
audio streams at once. For audio output previewing, local
stats need to be collected to detect changes in volume level.
Pull Request #435
Our JSHint configuration is not extensive and we have excluded multiple
files from linting. Additionally, we have seen JSHint to be unable to
parse newer ECMAScript features such as the object spread operator
(proposal).
On the other hand, we have seen ESLint to beautifully work on React and
React Native source code in addition to ES2015 and later. Introduce
ESLint alongside JSHint as an intermediate step to eventually switching
from JSHint to ESLint.
As our source code does not fully follow even the JSHint rules we have,
it is very difficult to introduce ESLint with many rules. At the
beginning, introduce it with as little rules as possible. Morever,
ESLint is able to automatically fix certain rule offenders so once we
have ESLint merged we can incrementally add new rules while keeping our
commits' modification on as little subjects as possible.