fix(conference) Fix different bugs with startMuted policy. (#2777)
* fix(conference) Fix different bugs with startMuted policy.
If the user changes mute state after joining the call and before the other participats join the call, make sure those state changes are honored.
* feat(startMuted) Ignore startMuted in Jingle from focus.
Apply startMuted policy based on startMuted setting in room meta data.
Moderator settings and AV moderation settings will now be propagated to new endpoints joining the call through room meta data.
Advertise a new capability 'start-muted-room-metadata' to Jicofo for feature detection.
It's a short-hand for leaving the conference and then disconnecting the
underlying connection.
In the general case (no breakout rooms) this is likely a preferred way
to handle leaving, since there is no good reason to keep the connection
open afterwards.
Disables AV1 for FF since AV1 is not properly supported (it doesn't support SVC and it doesn't send temporal layers with simulcast).
Added a testing config flag so that we can easily enable it and test it.
It doesn't get translated in the TS build, for one.
Script I used:
```python
import os
for (dirpath, dirnames, filenames) in os.walk('.'):
if '.git' in dirpath:
continue
if 'node_modules' in dirpath:
continue
if 'dist' in dirpath:
continue
if 'types' in dirpath:
continue
for filename in filenames:
path = os.path.join(dirpath, filename)
if not path.endswith('.js') and not path.endswith('.ts'):
continue
#print(path)
with open(path, 'r+') as f:
#print(f)
data = f.read()
if '__filename' in data:
p, ext = os.path.splitext(path)
txt = f"'{p[2:]}'"
print(txt)
data = data.replace('__filename', txt) # Assign the result back to data
f.seek(0)
f.write(data)
f.truncate()
```
feat(JitsiConference) Allow adding multiple tracks to the conference.
This should be supported by the backend. This limitation was added here only because of track synchronization issues between JM and LJM. The support is added behind testing.allowMultipleTracks config.js setting
Fixes https://github.com/jitsi/lib-jitsi-meet/issues/2205
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.
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.
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(ice-restart): Use an exponential backoff timer for ICE restarts. (#2531)
Use an exponential backoff time for initiating ICE restart to prevent loading the prosody.
When a large number of endpoints loose connection to the signaling and media servers because of an ISP failure, these endpoints will try to reconnect at the same time causing a storm of source-remove/source-add events to the signaling servers that can lead to prosody going down otherwise.
fix(ssrc-rewriting): Fire track removed/added instead of owner changed.
When an existing SSRC for a remote track gets re-mapped from one source to another, fire a TRACK_REMOVED event followed by TRACK_ADDED event instead of TRACK_OWNER_CHANGED event. This should simplify the application logic for track handling.
fix(JitsiConference): Clear jingleSession after session restart.
This makes sure that any track operations that are executed after the terminate is sent and before the new session is established get synced up on the new session.
Also reset the JVB stats. Fixes https://github.com/jitsi/jitsi-meet/issues/14326.
fix(conference): Remove the tracks that were filtered out.
When tracks are not included in the initial offer/answer, remove them from the conference. Otherwise, the tracks in conference will be out of sync with those in the media sessions.