diff --git a/lib/src/options.dart b/lib/src/options.dart index cadc0da3b..f554c4855 100644 --- a/lib/src/options.dart +++ b/lib/src/options.dart @@ -201,8 +201,6 @@ class VideoPublishOptions { final String? scalabilityMode; - final bool enableBackupCodec; - final BackupVideoCodec? backupVideoCodec; const VideoPublishOptions({ @@ -212,7 +210,6 @@ class VideoPublishOptions { this.videoSimulcastLayers = const [], this.screenShareSimulcastLayers = const [], this.name, - this.enableBackupCodec = true, this.backupVideoCodec, this.scalabilityMode, }); @@ -223,7 +220,6 @@ class VideoPublishOptions { List? videoSimulcastLayers, List? screenShareSimulcastLayers, String? videoCodec, - bool? enableBackupCodec, BackupVideoCodec? backupVideoCodec, String? scalabilityMode, }) => @@ -234,7 +230,6 @@ class VideoPublishOptions { screenShareSimulcastLayers: screenShareSimulcastLayers ?? this.screenShareSimulcastLayers, videoCodec: videoCodec ?? this.videoCodec, - enableBackupCodec: enableBackupCodec ?? this.enableBackupCodec, backupVideoCodec: backupVideoCodec ?? this.backupVideoCodec, scalabilityMode: scalabilityMode ?? this.scalabilityMode, ); diff --git a/lib/src/participant/local.dart b/lib/src/participant/local.dart index 732f5cd30..546dffe9d 100644 --- a/lib/src/participant/local.dart +++ b/lib/src/participant/local.dart @@ -210,12 +210,7 @@ class LocalParticipant extends Participant { ), ]; - if (publishOptions.enableBackupCodec == true && - publishOptions.backupVideoCodec == null) { - publishOptions.copyWith(backupVideoCodec: BackupVideoCodec()); - } - - if (publishOptions.enableBackupCodec == true && + if (publishOptions.backupVideoCodec != null && publishOptions.backupVideoCodec!.codec != publishOptions.videoCodec) { simulcastCodecs.add(lk_rtc.SimulcastCodec( codec: publishOptions.backupVideoCodec!.codec.toLowerCase(),