fix(safari): override min/max video constraints on safari (#1243)
* fix(safari): override min/max video constraints on safari
Override the constraints on Safari because of the following webkit bug.
https://bugs.webkit.org/show_bug.cgi?id=210932
Camera doesn't start on older macOS versions if min/max constraints are specified.
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(screenshare): stop using exact for specified device sharing (#1031)
Overconstrainederror occurs when calling gum with "exact"
when on URLs with a hash. To get around this, remove
"exact". Add handling for specified device not being
found, as we can no longer rely on "exact". This
still leaves open the possibility of the wrong
camera being accessed.
We had several reports that googSuspendBelowMinBitrate misbehaves, we had been running for a while with that disabled for the bridge, but it was causing problems and for p2p.
* 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
fix(screenshare): specify source type for fake and proxy (#878)
Spot is the consumer of screensharing using a camera
input and through a proxy connection. To differentiate
which one is active, declare a source type on the
created "desktop" stream.
fix(screenshare): do not limit resolution for fake screenshare (#877)
A camera source can be used as a screenshare source.
Normally for screenshare resolution is not capped and
the same will be true for the fake screenshare source.
feat(screenshare): use camera as a screenshare source
This feature is intended for spot. Spot can have an
HDMI -> usb adapter hooked up to it. In that case,
attempting to screenshare should use that adapter
as a screensharing source.
fix(RTC): Pass options allowing GUM to work with config.
The 'options' identifier is used for different objects, which has lead to a bug where
the object that passes along the 'config.js' provided data is lost along the way. Code
that's further down the execution stack still expects to process that configuration,
which indicates that not passing it along is unintentional.
With this change, an Android device will adhere to the value defined in the 'resolution'
value of config.js, something it currently does not.
The code for handling device availability has been disabled for a long time,
plus it's ill named since it represents 2 abstractions: lack of permissions and
lack of devices.
Time for it to rest in the git graveyard.
fix(device-list): workaround for devicechange being fired twice
Chrome fires devicechange twice. This causes the DEVICE_LIST_CHANGED
event to fire twice. The listener in jitsi-meet has async logic
to handle the event, including creation of new tracks. So it
can happen that two devicechange events fire, the jitsi-meet
listener fires twice, creates duplicate tracks, and uses both
tracks. Diffing the device list for an actual change is a workaround
against extra devicechange events.
Note: this does not solve the issue in jitsi-meet of it not
handling quick successive DEVICE_LIST_CHANGED events.
Get rid of all wrappers and use navigator.mediaDevices.getUserMedia, since all
supported platforms have it by now.
Also use the unprefixed versions of WebRTC APIs.
* Enables adapter for edge.
We were not filtering correctly all unsupported iceServers and an error is thrown and no connection is established.
* Enable desktop sharing for Edge.
Currently when replacing video track with desktop sharing one, doesn't work because of: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/17528460/
If Edge user joins first and enables desktop sharing it will work when others join. Tried also to use replaceTrack/setTrack as a workaround, but again we hit an error, this time InvalidAccessError.
* Adds the helper function usesAdapter in BrowserCaps.
core: refactor initialization not to return a Promise (continued)
1. The example was using the Promise return value of JitsiMeetJS.init
which is no longer possible/correct after commit "core: refactor
initialization not to return a Promise".
2. We went back and forth with the value returned by JitsiMeetJS.init:
we initially didn't return a value, then we started returning a Promise,
and now we're not returning a value. Whether we'll go back to returning
a value is up in the air. Anyway, the return value is practically
determined by the last in a chain of function calls: JitsiMeetJS, RTC,
RTCUtil. Since the chain is not really documented, it will not hurt much
to make it easier to refactor the chain by "composing" the functions.
core: refactor initialization not to return a Promise
There is nothing asynchronous about the initialization process (anymore), thus
turn it into a synchronous method.
In addition, WebRTC support is absolute, it cannot change from not being
supported to being supported (as it plreviously could, thanks to Temasys) so get
rid of the ancillary logic to support that.
Last, introduce a way to check if WebRTC is supported in the current
environment: JitsiMeetJS.isWebRtcSupported().
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.
* fix(SS): Set min and max frame rate to 5
* fix(SS): Set min and max frame rate for the new GUM flow.
* feat(ss_framerate): Add config option for min/max frame rate.
* doc(RTCUtils): Fix params format.
* fix(SS_framerate): Don't pass undefined constraints.
* fix(SS_constraints): Handle chromeMediaSourceId === undefined.
ref(gum): try to reduce complexity of obtainAudioAndVideoPermissions (#707)
* ref(gum): try to reduce complexity of obtainAudioAndVideoPermissions
Even though I walk through the valley of the shadow of death
I will fear no evil... Reduce indenting and repeated calls to
getting desktop streams by creating a promise chain.
* squash: use arrow func
* squash: move constructor support to helper
* squash: put ff into mediastream constructor check
* squash: ff support media stream constructor
MDN states its been supported since 44. ESR is currently
52.
* squash: rename dsoptions, constant defaults
* squash: move comment about missing tracks error handling
* squash: wrap getUserMediaWithConstraints in promise
* squash: split up av funcs
* squash: hey, some tests...are better than no tests?