Skip to content

Commit c22b83e

Browse files
authored
fix: respect codec overrides when computing the video layers (#1582)
Fixes an issue where `max_simulcast_layers` was not correctly respected when combined with `preferredCodec`.
1 parent 3d115dd commit c22b83e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/client/src/rtc/Publisher.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,8 @@ export class Publisher {
652652
settings?.screensharing.target_resolution?.bitrate;
653653

654654
const publishOpts = opts || this.publishOptsForTrack.get(trackType);
655-
const codecInUse = getOptimalVideoCodec(publishOpts?.preferredCodec);
655+
const codecInUse =
656+
opts?.forceCodec || getOptimalVideoCodec(opts?.preferredCodec);
656657
return trackType === TrackType.VIDEO
657658
? findOptimalVideoLayers(track, targetResolution, codecInUse, publishOpts)
658659
: trackType === TrackType.SCREEN_SHARE

0 commit comments

Comments
 (0)