fix(SignalingLayer) Update SSRC owners on leave. (#2184)
* fix(SignalingLayer) Update SSRC owners on leave.
Update the SSRC owners in the following cases:
1. When a remote endpoint leaves the call.
2. When a source-remove is received.
3. When a source is remapped (with ssrc-rewriting enabled).
Create the remote track even if presence is not yet received. The ssrc owner check prevents the client from creating a dummy track when the call switches over from p2p to jvb when the last remote endpoint leaves the call.
* ref(SignalingLayer) alpha sort methods.
Clean up unused methods, _findEndpointSourceInfoForMediaType is not used anymore.
* squash: Address review comments.
fix(quality-control) Fix receiver constraints for default case.
When the application doesn't set receiver constraints, generate default constraints in the source-name mode.
Cleanup code related to the endpoint based video constraint handling for p2p connection.
fix(qualitycontrol): Cleanup old receiver constraints.
Endpoint based receiver constraints and other endpoint based bridge signaling messages are no longer supported by latest JVB after the switch to source-name signaling.
Rename method names 'sendNewReceiverVideoConstraintsMessage'->'sendReceiverVideoConstraintsMessage', 'setNewReceiverVideoConstraints'->'setReceiverVideoConstraints'
fix(p2p) Fix an issue where unmute fails on p2p with channelLastN=0.
Always initiate a sRD->cA->sLD cycle since renegotiation fails in the following scenario.
In a p2p call when channelLastN=0, the direction on the video tranceiver is set to'inactive'.
At this point, if the user unmutes, the track is replaced on the video sender.
If a cO->sLD->sRD is triggered, the browser adds a third m-line which isn't expected and possibly is a bug. All renegotiations fail as a result.
However, the browser does not add a third m-line in the answer it generates and renegotiation succeeds.
* ref: Inline onMucMemberLeft (has nothing to do with "moderator" and is broken).
* fix: Use isFocus instead of just reading the resource.
* ref: Inline onParticipantLeft.
* ref: Add _ to private function names.
* ref: Remove redundant function.
* ref: Initialize focusComponent once.
* ref: Remove two copies of "options".
* ref: Simplify the focusJid flow.
* ref: Rename focusCompoonent to targetJid.
* fix: Only retry on "invalid session" errors
We used to fire FOCUS_DISCONNECTED (which doesn't have anything to do
with anything disconnecting) and then retrying. This is not necessary
because FOCUS_DISCONNECTED is a fatal error and the client schedules
a reload of it's own (and we want the client reload as opposed to the
conference-request retry in case e.g. the shard has changed).
* ref: Remove use of visitorFocus.
* ref: Remove graceful shutdown handling (never used in backend).
* feat: Support conference request over HTTP.
* ref: eslint cleanup.
* fix: Add max timeout 2 minutes.
Yarn v2 is a little more picky about what protocols it accepts. npm can
infer we're talking about a GitHub package while the true protocol is
`git+https`, but Yarn v2 wants us to be explicit.
This blocked apps that manage dependencies with Yarn v2 from installing
`lib-jitsi-meet`.
1. Checks peer's preferred codec in p2p case. Mobile and web have different preferred codecs.
2. Log an error message when the preferred codec is not offered by JVB.
3. Clean up code related to deprecated config.js settings 'preferH264' and 'disableH264'.
4. Refactor the codec selection logic so that correct codec is picked.
fix(TPC) Allow remote tracks to be created if no presence is found.
Currently, remote tracks are not created if presence for the endpoint is not received before source signaling. With ssrc-rewriting, the source information will be received on the bridge channel and presence on the prosody ws so there are chances that they can be out of sync. We do not want to skip remote track creation when that happens.