fix(SDP): Negotiate only baseline H.264 codecs for p2p.
Chrome on macOS recently started offering encoder for higher level (5.2) but decoder only for level 3.1. See https://issues.chromium.org/issues/324930413
Therefore, filter out all H.264 payload types with main and high profiles. Also, sort all H.264 payload types so that same pt is picked for both H.264 encoder and decoder. Fixes random black tile issues across different browsers when H.264 is the preferred codec for p2p.
fix(TPCUtils): Chain both RTCRtpSender getParameters and setParameters call properly.
Firefox 123 started throwing an error when the transction ids for getParamters and setParameters don't match. This can result in Firefox not establishing a p2p connection with a remote peer when it is the offerer.
fix(TPC): Run the DD ext header check on all browsers.
We do not want non Chromium browsers to negotiate DD ext headers when VP8/VP9 is the selected codec. Fixes poor video quality issue for Safari when Av1 is offered by Jicofo.
Set the scalabilityMode to undefined for VP8 after a VP9->VP8 switch even though the browser returns L1T2 in the RTCRtpSender.getParameters() call. Fixes an issue where the bridge stops forwarding video for some participants after vp8->vp9 switch.
If MediaStreamTrack.getSettings() doesn't return the height of the track, use the constraints passed to gUM for calculating the height. Fixes an issue for Firefox/Linux which could result in media not displayed.
fix(video-quality): Adjust encodings bitrates/scalefactor for high capture resolutions (#2436)
* fix(video-quality): Adjust encodings bitrates/scalefactor for high capture resolutions.
When the client is configured to capture camera sources at 1080p or higher, adjust the bitrates and the encodings scale factor accordingly.
* squash: Address review comments
Fix the bitrates set on the remote description and also bump up the bitrates for 1080p, 4k and screenshare.
* squash: Address some more review comments.
fix(video-quality): Remove the encoding check for webkit.
This check is not needed anymore since we now set the correct scaleResolutionDownBy value everytime the encodings are configured. Fixes a regression on Safari where it can end up sending low resolution to a p2p peer in some cases. Also, add more unit tests for p2p desktop share cases.
* fix(RTC): Remove support for plan-b SDP.
Since unified plan mode becomes the default mode, so does multi-stream mode.
* squash: Remove plan-b unit tests and fix comments
* squash: address review comments
fix(TPC): Do not configure 'scaleResolutionDownBy' and 'maxBitrate' for legacy VP9 K-SVC.
When these are configured, the browser sends only the lowest resolution layer even when all the encodings are active. Fixes a quality issue on older versions of Chromium that do not support the scalabilityMode API.
fix(codec-selection): put Av1 support behind a flag.
Fixes an issue with audio after p2p->jvb switch when the media active state is set to false because of a setVideoCodecs call after a remote user joins the call.
There is a lot of additional noise when log level is set to debug, the SDP descriptions should be set to trace (As it seems it was originally intended, based on the name of the variable)
Unify events and output single TypeScript declaration (#2407)
* fix(events): unify events to a single EventManager type, add support for single typescript declaration
* fix(lint): fix lint
* fix(events): fix incorrect instatiation
* fix(events): clean up redundant methods
* fix(events): keep EventEmitter name, alias NodeEventEmitter
* fix(events): fix loose reference
* fix(EventEmitter): remove on/off alias as redundant
* fix(RTCUtils): bring event handlers under class to use same event emitter
* fix(RTCUtils): fix lint
fix(codec-selection): Select VP8 as default codec.
When RTCRtpReceiver.getCapabilities() is not supported by browser or if it returns an empty list. Fixes an issue where call doesn't get established in Firefox ESR 102.
Fixes https://github.com/jitsi/jitsi-meet/issues/13839.
fix(TPCUtils) Insert simulcast recv line for all senders on FF.
The simulcast receive lines needs to be inserted in the receive desc for all the m-line associated with local tracks, currently its being done only for the first video source.
Add SVC and Simulcast support for AV1 and VP9. (#2350)
Add SVC and Simulcast support for AV1 and VP9.
The default mode is the full SVC mode for VP9. It works as expected with the current version of JVB.
AV1 in the client is only supported when the bridge negotiates the Dependency Descriptor extension headers which are needed for reading the layer information for AV1 and H.264 video frames.
* feat: Enable H.264 simulcast support.
Multi-encoding simulcast for H.264 is supported now because of the DD header ext support added on the bridge side.
* fix(video-quality): Add default bitrates for all codecs.
Expect the videoQuality settings in the new format, deprecated configs are still supported.
videoQuality: {
AV1: {
maxBitratesVideo: {
low: 100000,
standard: 300000,
high: 1000000,
ssHigh: 1500000
},
useScalabilityModeAPI: {
enabled: true,
useSimulcast: true, //(defaults to SVC),
useKSVC: true //(defaults to L3T3_KEY)
},
},
H264: {
maxBitratesVideo: {
low: 200000,
standard: 500000,
high: 1500000,
ssHigh: 2500000
}
},
VP8: {
maxBitratesVideo: {
low: 200000,
standard: 500000,
high: 1500000,
ssHigh: 2500000
}
},
VP9: {
maxBitratesVideo: {
low: 100000,
standard: 300000,
high: 1200000,
ssHigh: 2500000
},
useScalabilityModeAPI: {
enabled: true,
useSimulcast: true, //(defaults to SVC),
useKSVC: true //(defaults to L3T3_KEY)
},
}
}
* Disable encodings when requested height for screenshare is 0.
* feat: add unit tests for scalability modes.
* ref: Move all encoding configuration calculation to TPCUtils.
* Add more unit tests for VP9 K-SVC mode.
* Make codec name in settings case insensitive.
Also read the deprecated max bitrates correctly, add unit tests to test it.
* ref(TPC): isSimulcastOn -> isSpatialScalabilityOn.
It makes more sense to call it spatial scalability than simulcast now that full SVC support is available.
* fix: Negotiate AV1 DD header exts only for AV1 and H.264.
* fix: Rename setting useL3T3Mode->useKSVC and adjust the defaults.
feat(ScreenObtainer): add more control over screen obtainer (#2371)
* feat(ScreenObtainer): add more control over screen obtainer
* fix(ScreenObtainer): fix constraints to select a preferential display surface
* fix(ScreenObtainer): remove Safari version check for displaySurface
* fix(ScreenObtainer): move all settings under screenShareSettings
fix(TPC): Revert the reverse ordering of encodings for Firefox 117 and newer.
In the older versions, the SSRCs in the SDP were in reversed order, i.e., the resolution order was 1:2:4 as opposed to Chromium and other browsers. Therefore, the client was confuguring the reverse order. However, the commit https://hg.mozilla.org/mozilla-central/rev/b0348f1f8d7197fb87158ba74542d28d46133997 which was seems to have landed in Firefox 117 has reverted the reversing of the RID order. Therefore, this hack is no longer needed on the newer Firefox versions.
This fixes an issue where the bridge suspends all video from Firefox to other endpoints in the call because of the reversed order of the encodings.
fix(codec-selection): Disabled VP9 for p2p on Firefox.
When VP9 is at the top of the codec list in the remote offer, Firefox omits it in the answer but decides to use VP9 for encoding media. Therefore the remote peer gets an answer with no VP9 in the list and when it updates its local description (with no VP9) after a renegotiation, it stops rendering the VP9 video received from Firefox.