Skip to content

Commit

Permalink
Merge branch 'master' into dev/fix-uninferred-types
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMcAssey committed Jan 8, 2024
2 parents 8594d1b + 969c6f4 commit 9f6be94
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 25 deletions.
11 changes: 5 additions & 6 deletions modules/RTC/TPCUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ export class TPCUtils {
|| codecConfig.scalabilityModeEnabled);

if (scalabilityModeEnabled) {
typeof codecConfig.useSimulcast !== undefined
typeof codecConfig.useSimulcast !== 'undefined'
&& (this.codecSettings[codec].useSimulcast = codecConfig.useSimulcast);
typeof codecConfig.useKSVC !== undefined
typeof codecConfig.useKSVC !== 'undefined'
&& (this.codecSettings[codec].useKSVC = codecConfig.useKSVC);
} else {
this.codecSettings[codec].scalabilityModeEnabled = false;
Expand Down Expand Up @@ -545,20 +545,19 @@ export class TPCUtils {
const hasIncorrectConfig = this.pc._capScreenshareBitrate
? parameters.encodings.every(encoding => encoding.active)
: parameters.encodings.some(encoding => !encoding.active);
const videoType = localVideoTrack.getVideoType();

// Check if every encoding is active for screenshare track when low fps screenshare is configured or some
// of the encodings are disabled when high fps screenshare is configured. In both these cases, the track
// encodings need to be reconfigured. This is needed when p2p->jvb switch happens and new sender constraints
// are not received by the client.
if (localVideoTrack.getVideoType() === VideoType.DESKTOP && hasIncorrectConfig) {
if (videoType === VideoType.DESKTOP && hasIncorrectConfig) {
return null;
}

for (const encoding in parameters.encodings) {
if (parameters.encodings[encoding].active) {
const encodingConfig = this._getVideoStreamEncodings(
localVideoTrack.getVideoType(),
this.pc.getConfiguredVideoCodec());
const encodingConfig = this._getVideoStreamEncodings(videoType, codec);
const scaleResolutionDownBy
= this.pc.isSpatialScalabilityOn()
? encodingConfig[encoding].scaleResolutionDownBy
Expand Down
13 changes: 9 additions & 4 deletions modules/RTC/TraceablePeerConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -2815,19 +2815,24 @@ TraceablePeerConnection.prototype._updateVideoSenderEncodings = function(frameHe
for (const encoding in parameters.encodings) {
if (parameters.encodings.hasOwnProperty(encoding)) {
parameters.encodings[encoding].active = encodingsActiveState[encoding];
parameters.encodings[encoding].maxBitrate = maxBitrates[encoding];

// Firefox doesn't follow the spec and lets application specify the degradation preference on the
// encodings.
browser.isFirefox() && (parameters.encodings[encoding].degradationPreference = preference);

parameters.encodings[encoding].scaleResolutionDownBy = scaleFactor[encoding];
// Do not configure 'scaleResolutionDownBy' and 'maxBitrate' for encoders running in legacy K-SVC mode
// since the browser sends only the lowest resolution layer when those are configured.
if (codec !== CodecMimeType.VP9
|| !this.isSpatialScalabilityOn()
|| (browser.supportsScalabilityModeAPI()
&& this.tpcUtils.codecSettings[codec].scalabilityModeEnabled)) {
parameters.encodings[encoding].scaleResolutionDownBy = scaleFactor[encoding];
parameters.encodings[encoding].maxBitrate = maxBitrates[encoding];
}

// Configure scalability mode when its supported and enabled.
if (scalabilityModes) {
parameters.encodings[encoding].scalabilityMode = scalabilityModes[encoding];
} else {
parameters.encodings[encoding].scalabilityMode = undefined;
}
}
}
Expand Down
14 changes: 0 additions & 14 deletions modules/xmpp/xmpp.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,20 +239,6 @@ export default class XMPP extends Listenable {
this.caps.addFeature('http://jitsi.org/tcc');
}

// this is dealt with by SDP O/A so we don't need to announce this
// XEP-0293
// this.caps.addFeature('urn:xmpp:jingle:apps:rtp:rtcp-fb:0');
// XEP-0294
// this.caps.addFeature('urn:xmpp:jingle:apps:rtp:rtp-hdrext:0');

// this.caps.addFeature('urn:ietf:rfc:5576'); // a=ssrc

// Enable Lipsync ?
if (browser.isChromiumBased() && this.options.enableLipSync === true) {
logger.info('Lip-sync enabled !');
this.caps.addFeature('http://jitsi.org/meet/lipsync');
}

if (this.connection.rayo) {
this.caps.addFeature('urn:xmpp:rayo:client:1');
}
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
},
"browser": "dist/umd/lib-jitsi-meet.min.js",
"module": "dist/esm/JitsiMeetJS.js",
"types": "types/index.d.ts",
"files": [
"dist",
"types"
Expand Down

0 comments on commit 9f6be94

Please sign in to comment.