fix(JingleSession) start modification queue after session is established.
Pull initial offer/answer tasks out of the modification queue and execute them right away. Only track and codec related operations that necessitate a renegotiation cycle need to be pushed to the modification queue. The queue execution is paused until the session is established. This avoids track operations being executed before the session is established. This fixes an issue seen in p2p connections where sources of the initiator are not signaled to the remote since the tracks are added while the initiator is waiting for a session-accept from the peer.
fix(stats) Obtain resolution/fps from 'outbound-rtp' stats. (#2265)
* fix(stats) Obtain resolution/fps from 'outbound-rtp' stats.
'Track' based stats were dropped in Chrome 112, therefore send resolution and fps for the simulcast case needs to be calculated based on the 'outbound-rtp' streams that are currently active.
* squash: remove an unwanted log
* Squash: Address review comments.
Use outbound-rtp stats for both Firefox and Safari.
Firefox - Ignore active field if not present in the stats and calc fps using 'framesSent'.
With visitors we rarely see not able to send messages or presence because not connected error.
Seems the status of the connection is wrong when quickly disconnecting and connecting again.
feat: Clean up immediately when room is not joined.
When receiving error like max occupants reached we have not joined the room, and there is no point of sending presence unavailable and check and clean after 5 secs.
fix(JingleSession) Avoid pushing encodings configuration task to the queue.
When configureSenderVideoEncodings task is pushed to the modification queue, there might not be a setParameters call in progress and this new one will not get chanined to any promise. However, when the task finally is executed, there is a chance for another setParameters method execution to be in progress and can result in setParameters call failing. Also, these extra steps to ensure that the sender encodings are correctly encoded are no longer needed since with multi-stream mode, we do not change the source video type and the previous encodings config will still be valid.
fix(TPC) Avoid applying constraints on desktop tracks if not needed. (#2246)
* fix(TPC) Avoid applying constraints on desktop tracks if not needed.
Ignore sender constraints if the client is already sending video of the requested resolution. For desktop tracks, max resolution will be the height of the window being captured irrespective of the height being requested by the peer. Therfore, check if the configured resolution is equal to the track height for all requested heights > 0.
Fixes an issue where the track addition fails because of setParameters failing on the video track. This is only seen the torture tests because this is very timing specific.
* squash: check correct scaleResolutionDownBy value for p2p conn.
* feat(visitors): Visitors chat.
For messages coming from visitors, which are not in the current room we need to supply a display name.
Mark messages with custom display name as coming from guest.
* feat: Adds a visitors version to conferenceIQ.
Update notes:
- The base64-sha1 code got stripped out, so we bundle it now
- There are 2 optional dependencies which we want to ignore to avoid
extra bundle size: xmldom and ws (the former is used by RN but we
provide it in the app and the latter is only used by Node
environments)
fix(JitsiConference) Check if participants exist before adding the tracks back.
When the call switches over to JVB after a remote p2p peer leaves, the remote tracks (of the peer that just left) are removed from the conference after the SSRCs are removed from SDP and since it necessitates a renegotiation, the task is pushed to the modification queue. Since the switch to jvb connection happens immediately, the remote jvb remote tracks are present after the switch and they get added to the conference again.
Add the check for the remote participant before adding the tracks. This fixes an issue where the remote tracks are present in redux even after the participant leaves.
fix(codec-selection) Apply codec preferences to initial offer/answer.
This fixes an issue where p2p clients (with different codec preferences) fail to decode video because the negotiated codecs are removed from the supported codecs list after the media session is established. The codec preferences will be applied when the first offer/answer is created.
fix(codec-selection) Check if disabled is already removed from sdp.
This should avoid unnecessary renegotiations if disabledCodec setting is present in config.js and should improve time to receive media when joining big calls.
Made updating video sender parameters in sequential manner in order to solve race condition when transaction id (which is generated during getParameters) can be reset at the end of videoSender setParameters and cause exception if another update was already in fly and before its check for transaction id presence.
fix(TPC) Disable media instead of changing dir for p2p->jvb switch. (#2226)
* fix(TPC) Disable media instead of changing dir for p2p->jvb switch.
Resume or suspend the media on the jvb peerconnection by changing the RTCRtpEncodingParamters.active state instead of changing the direction on the transceiver. This avoids the needs to start a O/A renegotiation cycle for these operations. The media direction will be changed only for p2p lastn=0 case since video needs to be disabled on both the sender and the peer for p2p lastn=0 case.
* Address review comments
* Disable media after adding source while media is suspended on the jvb connection. Default 'active' state for stream encodings after the source is added is 'true'.
* Wait for all the promises to be settled before returning