mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(voice): honour the codec preference in fallback selection (#2390)
This commit is contained in:
1 parent
f1734704ef
commit
e73285060e
1 file changed
+7
-2
@@ -549,7 +549,11 @@ class ScreenShareCodecNegotiation {
|
|||||||
selector: (preference: CodecPreference) => VideoCodec,
|
selector: (preference: CodecPreference) => VideoCodec,
|
||||||
preference: CodecPreference,
|
preference: CodecPreference,
|
||||||
): VideoCodec {
|
): VideoCodec {
|
||||||
if (this.selectedCodec && this.canUseSelectedCodecForCurrentParticipants(this.selectedCodec)) {
|
if (
|
||||||
|
preference === 'auto' &&
|
||||||
|
this.selectedCodec &&
|
||||||
|
this.canUseSelectedCodecForCurrentParticipants(this.selectedCodec)
|
||||||
|
) {
|
||||||
return this.selectedCodec;
|
return this.selectedCodec;
|
||||||
}
|
}
|
||||||
if (this.localCodecs.length === 0) this.localCodecs = buildLocalCodecAdvertisements();
|
if (this.localCodecs.length === 0) this.localCodecs = buildLocalCodecAdvertisements();
|
||||||
@@ -560,7 +564,8 @@ class ScreenShareCodecNegotiation {
|
|||||||
unknownParticipants,
|
unknownParticipants,
|
||||||
getScreenShareCodecPreferenceOrder(preference),
|
getScreenShareCodecPreferenceOrder(preference),
|
||||||
);
|
);
|
||||||
return negotiated.codec ?? selector('auto');
|
if (getEncodeSet(this.localCodecs).has(negotiated.codec)) return negotiated.codec;
|
||||||
|
return selector(preference);
|
||||||
}
|
}
|
||||||
|
|
||||||
private getRemoteCodecInputs(room: Room | null = this.room): {
|
private getRemoteCodecInputs(room: Room | null = this.room): {
|
||||||
|
|||||||
Reference in new issue
Block a user