* Save track source name to JitsiRemoteTrack
* add feature flag checks. code review adjustments.
* eslint cleanup1
* eslint cleanup2
* fix: move sourceName declaration outside of if block.
Co-authored-by: Dennis Dowhy <ddowhy@gmail.com>
Co-authored-by: William Liang <wliang67@bloomberg.net>
ref(JitsiConference) Remove remote tracks from conf before reneg is done.
We do not have to wait for the removal of the ssrcs from the remote description for removing the remote tracks associated with a participant that left the call. This speeds up removal of the participant from call even if the JingleSession modification queue is backed up.
ref(JingleSessionPC) Do not renegotiate on every local source change.
Instead rely on the 'negotiationneeded' event fired by the browser for JVB connection. This makes local source changes faster even if the modification queue is backed up.
* ref(TPC) Configure encodings in one go.
Configure the active state, maxBitrate and degradation preference in one go instead of configuring them separately.
* squash: Address review comments.
* squash: fix a comment.
* feat: Support plain endpoint ID.
Support the ID of the owner of sources being encoded directly instead of
using the full JID.
* feat: Support JSON-encoded sources.
* feat: Advertise support for JSON-encoded sources.
fix(JingleSessionPC): Fix startMuted cases for p2p unified plan.
Chrome doesn't create a decoder for ssrc in the remote description when there is no local source and the endpoint is offerer. Initiating a renegotiation with the endpoint as a responder fixes this issue. Add a workaround until Chrome fixes this bug.
fix(JingleSessionPC): Disable unified-plan for p2p chrome.
Do not enable unified plan for p2p chrome by default until StartMutedTest is fixed.
Fix media direction for case when there are no local and remote sources, should be set to 'inactive' in that case.
fix(TPC): Do not remove ssrcs from remote desc for p2p.
In unified plan, re-use of m-line (i.e., adding an SSRC, removing it and then adding it back) causes the browser to not render the media on Chrome and Safari. The WebRTC spec is not clear as to how browsers have to behave, this doesn't cause any issues on Firefox. As a workaround, only change the media direction and leave the ssrc in the remote desc. This automatically triggers a 'removetrack' event on the associated MediaStream and the track can be removed from the UI.
fix(RTC): Adjust the media direction for p2p conn.
For p2p connections, the media direction needs to be adjusted after every source-add/source-remove is processed based on the availability of local sources.
fix(JingleSessionPC): Add a workaround for chrome issue.
The 'signalingstatechange' event for 'stable' is fired after the 'iceconnectionstatechange' event for 'completed' is fired on chrome in Unified plan. This prevents the client from switching the media connection to the p2p connection once the ice connection for p2p gets established.
fix(JingleSessionPC): Do not try to re-use inactive mid for new remote ssrcs.
The direction was marked as 'inactive' only on Firefox as Safari had audio issues when an inactive mid is re-used. Chrome (in unified-plan) needs the direction of the mid in remote desc to be set to 'inactive' for a 'removetrack' to be fired on the associated media stream whenever a remote source is removed.
fix(RTC): Do not suppress the source updates on Firefox.
If the msid attribute is missing, then remove the ssrc from the transformed description so that a source-remove is signaled to Jicofo. This happens when the direction of the transceiver (or m-line) is set to 'inactive' or 'recvonly' on Firefox. Not signaling these source updates creates issues with remote track handling on the other endpoints in the call.
fix(JingleSession): Move the ssrc identifier generation to LocalSdpMunger.
When a msid attribute is missing in the 'a=ssrc' line, use the local endpoint id as an indentifier. Move this generation logic to LocalSdpMunger. Also suppress notifying Jicfo of a ssrc change on Firefox when the change is a result of the media being suspended on the jvb connection.
fix(JingleSession): Add a unique identifier for source on Firefox.
In certain cases, when RTCPeerconnection#addTrack is used, the browser doesn't produce the streamid in the 'a=msid' line which is being used by Jicofo as a unique identifier for the associated ssrc. Whenever the msid is missing in the local description, generate an ID using the local endpoint id.
fix(screenshare): Disable SS simulcast based on fps requested.
Disable simulcast for low fps screenshare and enable it for high fps screenshare. testing.capScreenshareBitrate config.js setting has now been deprecated.
fix(codec-selection): Fix codec selection for unified plan browsers.
Make sure the codec order is munged on all the m-lines for unified plan clients. Implement the logic for setting the preferences through RTCRtpTransceiver#setCodecPreferences.
* fix(TPC): Configure degradation preference in RTCRtpSendParameters.
Properly configure degradation preference on RTCRtpSendParameters instead of RTCRtpEncodingParameters. Fixes https://github.com/jitsi/lib-jitsi-meet/issues/1510.
* feat(JingleSessionPC): Remove ssrcs from remote desc when a user leaves.
Remove the ssrcs (associated with remote sources) from the remote desc along with the removal of the remote tracks when an endpoint leaves the call. The source-remove signaling message from Jicofo will no longer be needed in this case and can be dropped.
ref(QualityController): Split send and receive video constraints handling.
All the send video constraints for the client, i.e., what simulcast streams will be enabled based on constraints received on the bridge channel, will be handled by the SendVideoController class.
The receive video constraints like lastN, selectEndpoints and receive video resolution will be handled by the ReceiveVideoController class.
fix(ice-restart): Force client reloads when call is migrated.
Force the client to reload when the bridge that is handling the media goes down.
This mitigates issues seen on the bridge because of a client re-joining the call with the same endpointId, BWE issues, etc.
This behavior is configurable through 'enableForcedReload' setting in config.js.
RN doesn't support RTCRtpSender yet. Therefore, media is suspended on RN by changing the media direction in the SDP whenever the client receives an ideal height of 0 for sender constraints on the bridge channel.
After ICE failure and subsequent recovery of the media connection to the bridge using session-terminate, the local connection status needs to updated when ICE connection is established on the new peerconnection. The local connectivity status will be shown as Lost otherwise.
Determine the preferred codec for a given endpoint based on the config.js settings and the codecs supported by the endpoint.
The preferred codec is published in presence and then used by the other endpoints in the call during join/leave to determine
if the codec needs to be changed on the fly. Different codecs can be configuered for p2p/jvb connections.
The preferredCodec/disabledCodec settings under videoQuality will have precedence over the older settins like preferH264/disableH264.