* 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>
fix(TPC): Force reneg when user unmutes the first time.
This ensures that the source signaling is sent before the mute state is sent in presence. Jicofo relies on mute state from presence to check if the sender limit has been reached.
fix(TPC) change the tranceiver dir to recvonly when track is removed.
This fixes occasional failures of MuteTest.MuteAfterJoinCanShareAndUnmute torture test and also the case on Safari where user stopping the screenshare doesn't stop showing the screensharing indication on the thumbnail.
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.
fix(Jingle) Reverse the order of ssrcs signaled for Firefox.
This fixes an issue where the bridge doesn't forward the HD stream from Firefox to other users in the call. The order of the ssrcs produced by the browser is from Highest resolution to lowest whereas the bridge assumes it to be from lowest to highest as is the case in Chrome and Safari.
fix(tpc) fix extracting ssrc map when using single stream
In unified plan we'll take the ssrcs off the first audio / video stream, but we
were assuming both would be present.
This commit fixes that, since the Spot wireless screen sharing feature uses a
dedicated TPC just with a video stream.
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(codec-selection): Fix VP9 codec switching issue in Chrome unified-plan.
Munge only the m-line that corresponds to the source that the browser will be sending.
Do not select VP9 on Firefox.
Detect support for RTCRtpTransceiver#setCodecPreferences correctly.
fix(RTC): In unified-plan mode, disable the low resolution streams for low fps SS.
In unified plan impl, it is not possible to enable/disable simulcast during the call since the same sender is re-used for all local video tracks. Therefore, disable the low resolution simulcast streams for low fps screensharing so that the bridge forwards only the highest resolution stream which is important for low fps screensharing.
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.
feat(RTC): Add the ability to change desktop share fps.
Provide a method for changing the capture fps for desktop tracks during the call. These changes to the lib are needed for making it configurable 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(CodecSelection): Call RTCRtpTransceiver#setCodecPreferences before renegotiation.
Call RTCRtpTransceiver#setCodecPreferences with the preferrred codec order before every createOffer/createAnswer. This ensures that the codec preference is enforced even when there is no local description available yet while the preferred codec is being set immediately after media session creation.
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(TPC): Use addTrack instead of addStream in Unified-plan impl.
Do not try to configure encodings on the sender until they are available. This fixes an issue on Chrome (running in unified-plan mode) where unmuting the local source throws a 'Read-only field modified in setParameters()' error.
fix(stats): Use promise-based getStats on all browsers.
Get rid of the browser specific keys and use the standard spec-compliant fields for stats.
Get the resolution/fps for remote streams from 'inbound-rtp' stats. Use the 'track' stats for the local resolution/fps since these take the active simulcast streams into account.
fix(connection-quality): Calculate target bps based on videoQuality settings.
Calculate the target bps based on the video quality settings and the codec configured on the peerconnection.
Hardcode target video bitrates for RN since it doesn't support setting max bitrates.
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.
feat(stats): Get audio levels for the top 5 speakers only.
Capture the audio levels only for the top 5 speakers as RTCRtpReceiver#getSynchronizationSources can be expensive when we have too many audio receivers in the call.
Also, capture the audio levels for track that are unmuted if RTCRtpReceiver#getSynchronizationSources is not supported.
Switch Safari to using getStats since its reporting errorneous values, i.e., 0.000001 as audio level for all remote audio tracks.
* 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.