fix(TPC): Ensure encodings resolutions match configured values.
On every call to RTCRtpSender.setParameters(), ensure that the resolution configured for the encoding matches that of the value configured on the RTCRtpSender when the source was added to the peerconnection. This should prevent us from overriding the default values if the browser returns erroneous values when RTCRtpSender.getParameters is used for getting the encodings info. This fixes the issue on recent versions of Safari where the 'scaleResolutionDownBy' value comes back as 1 for all encodings even though the encoding resolution is different from the stream capture resolution.
In p2p mode, 'scaleResolutionDownBy' is used for downscaling a stream when needed, i.e. when the user receives a receive constraint of 360p because the other participant is in tile view. When desktop share is started, the encoding config has to be scaled back up so that the other participant starts receiving HD resolution for the share as desktop shares are autopinned. Therefore, encodings have to enabled/disabled for desktop shares as well. Earlier it was done only for camera tracks.
fix: Add the x-google-conference flag on RD when screensharing.
Add the conference flag back since the bridge is able to handle the case where more than 1 temporal layers are received even when only 1 ssrc is signaled.
In Chrome, if 'maxBitratesVideo' options are specified
and 'capScreenshareBitrate' is disabled, then simulcast is enabled
for screenshare. Chrome in plan B, does not send screen stream if
'maxBitrate' are set and simulcast is enabled.
fix(safari): Remove old remote tracks when a new track is received for an endpoint.
On Safari, MediaStream.onremovetrack is not fired when a remote desciption with a removed MSID is applied. As a result, new remote tracks for the same endpoint are not created causing issues where the video is not updated on Safari. Also, make sure local tracks on pc are updated when devices are changed while the user is in muted state.
feat: Allows jvb to control DTLS/SRTP protection profile. (#1300)
We're pretty sure it's no longer necessary with JVB2; and it costs
half an RTT in setup, and stops us being able to choose which
DTLS/SRTP protection profile to use.
ref(video-quality): Resolve sender operations when RTCRtpSender/RTCRtpSendParameters are not found.
The constraints are applied again after renegotiation is done. This should mitigate a fail case on Safari when the RTCRtpSendParameters are not available until the simulcast streams are added via SDP munging before sLD is called.
...in setMediaTransferActive. The sender video constraints
are controlling the 'encoding.active' flag and this code
would interfere. It's right now not used anyway as P2P is
disabled in the unified mode. If this modification is
necessary we'll add it back when working on unified P2P
in such a way that will play nicely with the sender constraints code.
...when starting without video.
The app would crash in setSenderVideoConstraint,
because the RTP encoding are not available on Safari
until sLD/sRD cycle is performed.
fix(video-quality): Get downsampled video for p2p case
When the video sender constraint changes in the p2p case when the remote user switches between stage/tile view,
get a downsampled video of the original 720p stream instead of requesting the camera for a new stream with the lower resolution.
Fixes https://github.com/jitsi/jitsi-meet/issues/7267
* feat: Apply max bitrates on video sender
Add the ability to control the max bitrates on the video sender through a config.js videoQuality setting.
* ref: Use '_' prefix only for internal methods
feat: use getSynchronizationSources on the receiver for remote audio levels (#1245)
* feat: use getSynchronizationSources on the receiver for remote audio levels
Use getSynchronizationSources if it is supported, fallback to using getStats otherwise.
* feat/ref: Use the local audio levels from LocalStatsCollector
When using getSynchronizationSources, use the audio levels from LocalStatsCollector for NoAudioSignalDetection.js
Remove obsolete code - TalkMutedDetection feature using audio levels is not used anymore
Takes disabled encodings into account when calculating the local resolution. (#1242)
* fix: Takes disabled encodings into account when calculating local resolution.
* feat: Adds a new event that's triggered when the max enabled resolution changes.
* feat: Broadcasts the max enabled resolution value along with other stats.
feat: Set degradation preference on video senders (#1229)
* feat: Set degradation preference on video senders
Use 'maintain-framerate' for camera tracks and 'maintain-resolution' for desktop tracks
* ref: apply cached video contraints and degradation preference on unmute
Since the sender encodings are available only after the renegotiation is complete (on chrome/safari), constraints/preferences have to be applied after renegotiation is complete.
Add RFC 4588 to the list of advertised features on Firefox.
Use RtxModifier only for cases when simulcast is achieved through SDP munging
This will ensure that RTX is negotiated whenever it is offered by the browser.
feat(video-quality): control the sender resolution based on video quality settings (#1119)
* feat(video-quality): control the sender resolution based on video quality settings
* fix(video-quality): Apply the settings on newly created p2p/jvb jingle sessions
If a p2p/jvb session is not present when setSenderVideoConstraint is called,
make sure the settings are applied when they are created