Skip to content

Commit

Permalink
remove enableBackupCodec for VideoPublishOptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed Dec 12, 2023
1 parent 7114399 commit e5915cf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
5 changes: 0 additions & 5 deletions lib/src/options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ class VideoPublishOptions {

final String? scalabilityMode;

final bool enableBackupCodec;

final BackupVideoCodec? backupVideoCodec;

const VideoPublishOptions({
Expand All @@ -212,7 +210,6 @@ class VideoPublishOptions {
this.videoSimulcastLayers = const [],
this.screenShareSimulcastLayers = const [],
this.name,
this.enableBackupCodec = true,
this.backupVideoCodec,
this.scalabilityMode,
});
Expand All @@ -223,7 +220,6 @@ class VideoPublishOptions {
List<VideoParameters>? videoSimulcastLayers,
List<VideoParameters>? screenShareSimulcastLayers,
String? videoCodec,
bool? enableBackupCodec,
BackupVideoCodec? backupVideoCodec,
String? scalabilityMode,
}) =>
Expand All @@ -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,
);
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 @@ -210,12 +210,7 @@ class LocalParticipant extends Participant<LocalTrackPublication> {
),
];

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(),
Expand Down

0 comments on commit e5915cf

Please sign in to comment.