fix(logging): Set default logging level as early as possible.
We were setting the logging level in JitsiMeetJS.init which potentially would have overriden all external calls for setting the log level before the JitsiMeetJS.init is called. In fact this was happening for jitsi-meet.
* ref(SDP) Convert to ES6 class.
* ref(SDP) Use enum for URNs associated with XMPP extensions.
* ref(XMPP) Replace more XEP URN constants with enum.
* fix(RTC) Fixes mediaType lookup based on source-name.
fix(quality) Do not force desktop codecs on mobile.
If the mobileCodecPreferenceOrder setting is missing, use the default order for mobile. Fixes an issue where mobile endpoints encodes using AV1 when mobile settings are missing.
fix(quality) Do not set b:AS line in SDP for SVC codecs when codec selection API is used.
This was needed in older versions since the browser didn't apply maxBitrates from RTCRtpEncoderParameters on the encoder. In the newer versions this seems to be no longer the case. Also, when the codec selection API is used, we no longer renegotiate locally so if we switched codec from AV1->VP9-VP9, the AV1 bitrate setting in the SDP will still be effective resulting in a lower send resolution because of b/w limitation.
fix(quality-control) Check only for cpu limitation
Checking for send resolution vs expected resolution was unnecessarily limiting lastN and receive resolution when local camera has issues and stops sending video. Also, do not send redundant receiver constraints on the bridge channel
fix(ReceiveVideoController) fix setting lastN to 0
When lastN is first set to some truty value and then 0, it wouldn't be
set because we relied on a "truthyness" check.
Check if the value is undefined so it can be set to 0.
When WebRTC ICE gathering policy is set to gather once instead of continually, the controlling agent goes to completed instead of connected (no more candidates to check). This doesn't happen in Chrome or other browsers, but is reproducible with node.js wrapper around WebRTC which runs with the default settings.
This is causing a bug where the initiator side of a P2P connection does not fully switch to P2P mode and keeps on sending data on both P2P and JVB connections.
It has been broken for over 3 years now, since ca325f5ef9 (diff-9e19da30f465ca5665ac3d7ca1aa03d0498aed1be0cb2d7eeb27684a2636da77)
Ever since that change, the "audioLevelReportHistory" property is not
populated, so it justs acts on nothing an generates bogus log lines such
as:
```
[modules/statistics/AudioOutputProblemDetector.js] A potential problem is detected with the audio output for participant b5fb30bc, local audio levels: [null,null], remote audio levels: undefined
```
Since nobody seems to have noticed in 3 years it's safe to assume we
don't need this at all, so it gets the axe treatment.
ref(QualityController) Add recovery mechanism and adjust the resolution check. (#2546)
* ref(QualityController) Add recovery mechanism and adjust the resolution check.
Impl a recovery mechanism for the lastN to be increased if the cpu limitation goes away and doesn't return after increasing lastN. Also, additionally improve the calculation of the expected resolution taking simulcast stream resolutions into account.
* squash: Address review comments and add more unit tests
* squash: Address review comments
feat(quality) Add a QualityController class for runtime adjustments. (#2542)
* feat(quality) Add a QualityController class for runtime adjustments.
Make run time adjustments to the client when adaptive mode is enabled.
* feat: Update lastN and receive resolution to improve quality.
* squash: Address review comments
* squash: Add more logging and address review comments.
This prevents the browser from starting the camera at 60 fps wherever supported as this could drastically affect the cpu and result in poor experience.
feat(silent): track if participant joined without audio (#2534)
* feat(silent): track if participant joined without audio
* Fix failing tests, use jitsi.org namespace
---------
Co-authored-by: Дамян Минков <damencho@jitsi.org>
feat(codec-selection): Use the new codec selection API (#2520)
* feat(codec-selection): Use the new codec selection API
https://github.com/w3ctag/design-reviews/issues/836. This allows the client to seamlessly switch between the codecs without having to trigger a renegotiation.
This feature is behind the flag testing.enableCodecSelectionAPI in config.js
* fix(stats): Fix local resolution stats.
The video codec for the local video sources needs to identified differently now, from the codecs field in the RTCRtpSendParameters returned by the browser. We no longer munge the remote SDP to switch to a different codec.
* feat(stats): Feed encodeTime stats for all local SSRCs to the codec selection mechanism.
* fix(codec-selection) Continue to mumge SDP for selecting H.264.
* feat(codec-selection) Make screenshare codec configurable.
If no 'screenshareCodec' is set under videoQuality or p2p settings, AV1 will be selected as default.
* squash: Address review comments
* Update modules/RTC/CodecSelection.js
Co-authored-by: Saúl Ibarra Corretgé <s@saghul.net>
* fix(codec-selection) Add codec to existing stats
---------
Co-authored-by: Saúl Ibarra Corretgé <s@saghul.net>
fix(JitsiLocalTrack) handle broken constraints more gracefully (#2535)
We are already handling Safari, which provides an empty constraints
object. Handle any type of broken constraints object which doesn't have
at least a `width` and `height` properties. This is the case of Firefox
when "fingerprint resistence" is enabled.
Fixes: https://github.com/jitsi/jitsi-meet/issues/14609