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.
ref(video-quality): cache max frame height and send on channel open (#785)
* ref(video-quality): cache max frame height and send on channel open
Currently it is possible to try to change the max receive video
frame height before the data channel is open. In that case an error
will be thrown. This change makes it so that the desired frame height
is saved and sent on channel open, avoiding the thrown error the
max receive video frame height logic is exercised through the
JitsiConference api.
* squash: do the second part of the actual fix
Change layer suspension to use parameters in RTPSender (#786)
* Change layer suspension to use parameters in RTPSender
We no longer suspend unused simulcast layers via a bandwidth cap in the
SDP, instead we'll use the new parameters in RTPSender to enable and
disable streams explicitly. The main advantage here is the RTPSender
method ramps up immediately when we re-enable the layers (as opposed to
the SDP bandwidth cap which took 30+ seconds).
* Fix linter issues
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().
fix(muting): do not re-assign value of local track containers (#781)
RTCUtils.attachMediaStream was changed not to return elements;
instead it returns undefined by default. When mapping over
containers and call RTCUtils.attachMediaStream, containers
would be changed to undefined.
* Support layer suspension
Add support for a message which notifies the endpoint whether or not it
is selected (meaning its HD stream is in use). If it is not
selected and enableLayerSuspension is set to true then it will impose a
bandwidth limit in the SDP to suspend sending the higher layers.
* only add the IS_SELECTED_CHANGED listener in JingleSessionPC if layer
suspension is enabled
this prevents doing a local o/a when we don't need it
fix(screensharing): set error type for cancelling extension install
When cancelling the prompt to install the extension, instead of
treating it as a generic error treat is as the cancel extension
error. This allows existing logic to trigger that will not show
an error message on cancel.
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(edge): get p2p working up to ice failure (#720)
* fix(edge): get p2p working up to ice failure
Edge does not support trickle ice. In an attempt to work around
such, and get p2p working, some other work was needed to even
get to the point of ice failure. This is that some other work.
* squash: fix typos, no intermediary map
* squash: remove extra line break
Implements the promised based getStats. Enables them for Safari and FF.
Adds stats and audio levels for Safari. Enables the new getStats API for Firefox, that will get rid of the following warning:
'non-maplike pc.getStats access is deprecated, and will be removed in the near future! See http://w3c.github.io/webrtc-pc/#getstats-example for usage.'
* 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?
This commit will append "-" + tpc.id to every local 'MSID', 'cname',
'label' and 'mslabel', before feeding the local SDP to the Jingle layer.
It will make stream IDs unique across TraceablePeerConnection instances
and prevent from conflicts in some corner cases.
For example this will fix a problem where if the client drops
the conference without leaving the XMPP MUC gracefully and will join
the conference again without recreating the local tracks it would lead
to the MSID conflict, because the stream is still advertised by
"the ghost" participant.
* wip: initial version of the new AnalyticsAdapter.
* ref: Restructures the ICE duration and state change events.
* ref: Restructures the JitsiLocalTrack events.
* ref: Restructures the TTFM events.
* ref: Updates the user feedback event.
* ref: Restructures the _CONNECTION_TIMES_ and TTFM events.
* ref: Restructures the BRIDGE_DOWN and NO_DATA_FROM_SOURCE events.
* ref: Restructures the FOCUS_LEFT event.
* ref: Restructures the DATA_CHANNEL_OPEN event.
* ref: Removes the ICE_FAILED event (it is a duplicate of a state change event).
* ref: Restructures the device list events.
Uses one event per device, since the new format does not allow non-atomic attributes.
* fix: Does not obey "unmute" commands from the focus.
* ref: Restructures the "remotely muted" event.
* ref: Restructures the CONFERENCE_ERROR events.
* ref: Removes the CONNECTION_INTERRUPTED event
We can use ICE_STATE_CHANGED instead.
* ref: Renames isreconnect to isReconnect.
* ref: Removes the CONNECTION_RESTORED event. Use ICE state changes instead.
* ref: Restructures the p2p events.
* ref: Restructures the jingle events.
* ref: Restructures the RTP statistics event.
* ref: Restructures the CONNECTION_FAILED and DISCONNECTED events.
* ref: Restructures the getUserMedia analytics events.
* ref: Cleans up AnalyticsEvents and restructures some of the events.
* fix: Adds error logs to the analytics adapter.
* ref: Refactor Statistics.sendEventToAll
Renames to sendEventAndLog, supports the object-based API, uses the
function where appropriate.
* fix: Addresses PR feedback.
* fix: Addresses Lyubomir's feedback.
* ref: Remove unused functions, adds documentation.
* feat: Adds a Statistics.sendAnalytics shortcut.
* ref: Uses the conference name as the default containerId.
* fix: Adrdesses Lenny's feedback.
* fix: Addresses more feedback.
* fix: Uses 'operational' as the default event type.
* doc: Updates the documentation.
* fix: Fixes adding of permanent properties.
* ref: Uses consistent naming for events' attributes.
Uses "_" as a separator instead of camel case or ".".
* feat: Adds the conference name as a permanent property automatically.
* ref: Don't expose Setting.machineId.
* fix: Adds a "p2p" attribute to jingle events.
* ref: Uses "action" instead of "name".
* ref: Uses underscore in events' attribute names.
* ref: Logs a message to the logger/console
instead of callstats in sendAnalyticsAndLog().
fix(ie11): do not call JSON.stringify with temasys ice candidate
Calling JSON.stringify on a temasys object causes a stack overflow.
The result is that the JingleSessionPC's work queue never gets
cleared so future work, like video muting, will not get called.
Instead of passing in the candidate directly, manually do
what chrome's implementation of candidate.toJSON does.
Reports ssrc to callstats when screen sharing is started. (#657)
Adds rtc.LOCAL_TRACK_SSRC_UPDATED event to be emitted when ssrc is updated for a local track.
Fixes adding rtc listeners for CREATE_ANSWER_FAILED, CREATE_OFFER_FAILED, SET_LOCAL_DESCRIPTION_FAILED, SET_REMOTE_DESCRIPTION_FAILED.
* ref: Simplifies the logic for handling an incoming jingle session-initiate.
* fix: Don't redundantly log cross region
information under a field name called "label".
* cleanup: Simplifies code. Adds the userAgent as a permanent property
for statistics (so that the client doesn't have to).
* ref: Names the parameter which specifies the name of the event "eventName".
* ref: Extracts event names to AnalyticsEvents.
* ref: Exports and imports constants individually.
* fix: Fixes CONNECTION_TIMES event names.
* ref: Arranges constants alphabetically.
* ref: Adds line breaks.