Skip to content

Commit

Permalink
update.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed Dec 12, 2023
1 parent e1be6af commit bf292a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 2 additions & 0 deletions lib/src/options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,12 @@ class RoomOptions {

class BackupVideoCodec {
BackupVideoCodec({
this.enabled = true,
this.codec = defaultVideoCodec,
this.encoding,
this.simulcast = true,
});
bool enabled;
String codec;
// optional, when unset, it'll be computed based on dimensions and codec
VideoEncoding? encoding;
Expand Down
7 changes: 1 addition & 6 deletions lib/src/participant/local.dart
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,6 @@ class LocalParticipant extends Participant<LocalTrackPublication> {
room.engine.roomOptions = room.roomOptions.copyWith(dynacast: true);
}

if (publishOptions.backupVideoCodec == null) {
publishOptions = publishOptions.copyWith(
backupVideoCodec: BackupVideoCodec(),
);
}
if (publishOptions.scalabilityMode == null) {
publishOptions = publishOptions.copyWith(
scalabilityMode: 'L3T3_KEY',
Expand Down Expand Up @@ -210,7 +205,7 @@ class LocalParticipant extends Participant<LocalTrackPublication> {
),
];

if (publishOptions.backupVideoCodec != null &&
if (publishOptions.backupVideoCodec?.enabled == true &&
publishOptions.backupVideoCodec!.codec != publishOptions.videoCodec) {
simulcastCodecs.add(lk_rtc.SimulcastCodec(
codec: publishOptions.backupVideoCodec!.codec.toLowerCase(),
Expand Down

0 comments on commit bf292a1

Please sign in to comment.