feat(multi-stream-support) Configure the senders based on SenderVideoConstraintsV2.
The encodings for local video tracks are confiugured based on the SenderVideoConstraintsV2 constraints received from the bridge. The constraints are sourceName based. Also ignore enableLayerSuspension flag since it has been deprecated and layer suspension has been enabled by default. Also having it off makes screensharing on Chrome in unified plan not work as expected.
feat(multi-stream-support) Add the support for multiple local video streams.
* feat(multi-stream-support) Add the support for multiple local video streams.
This feature is behind 'sendMultipleVideoStreams' config.js flag and is currently supported only on clients running in Unified plan mode.
* squash: Use the track index from source name to find the matching transceiver on unmute.
feat(multi-stream-support) Handle SDP munging for multiple local/remote streams per ep. (#1868)
* feat(multi-stream-support) Handle SDP munging for multiple local/remote streams/ep.
A new SDPSimulcast class is added for handling SDP munging for local and remote descriptions to handle multiple streams for both local and remote endpoints. This new class will be used only for unified plan implentation. The sdp-simucast npm package will be used for plan-b and deprecated later when all the clients switch to unified plan.
* fix(build) fix building with TS code
Use the Babel preset for the webpack bundle since Babel 7 already
understands TS and ts-loader uses tsc instead, which we configure
differently.
* squash: Add unit test and address review comments.
Co-authored-by: Saúl Ibarra Corretgé <saghul@jitsi.org>
ref(TPC) Remove an unnecessary toUnified sdp conversion.
sLD is called immediately after createOffer/createAnswer, therefore the desc provided by createOffer/createAnswer can be directly passed to sLD without the need for converting it to unified plan format. This also fixes a warning seen on the browser console that says 'The description does not look like plan-b'.
fix(TPC): Select 1 as the default scale factor for p2p.
This fixes an issue where a user is not able to unmute their video if the MediaStreamTrack associated with the camera stream returns a null value for the track height.
* 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.