RecorderConfiguration constructor

RecorderConfiguration({
  1. required DataSource dataSource,
  2. String logsDir = '',
  3. @Deprecated('Use hardwareSpecifications instead.') String deviceModel = '',
  4. Map<HardwareSpecification, String>? hardwareSpecifications,
  5. List<DataType> recordedTypes = const <DataType>[],
  6. int minDurationSeconds = 30,
  7. Resolution videoQuality = Resolution.unknown,
  8. int chunkDurationSeconds = 600,
  9. bool continuousRecording = true,
  10. bool enableAudio = false,
  11. int maxDiskSpaceUsed = 0,
  12. int keepMinSeconds = 0,
  13. bool deleteOlderThanKeepMin = false,
  14. RecordingTransportMode transportMode = RecordingTransportMode.unknown,
})

Creates a RecorderConfiguration with the specified properties.

Parameters

  • IN dataSource The data source used for recording.
  • IN logsDir The directory used to keep the logs. Default is empty string.
  • IN deviceModel (Deprecated) The device model. Use hardwareSpecifications instead.
  • IN hardwareSpecifications The device hardware specifications. Default is empty map.
  • IN recordedTypes The types that are recorded. Default is empty list.
  • IN minDurationSeconds The minimum recording duration for it to be saved. Default is 30.
  • IN videoQuality The video quality of the recording. Default is Resolution.unknown.
  • IN chunkDurationSeconds The chunk duration time in seconds. Default is 600.
  • IN continuousRecording Whether the recording should continue automatically after reaching the chunk duration. Default is true.
  • IN enableAudio Flag indicating whether audio should be recorded. Default is false.
  • IN maxDiskSpaceUsed Maximum disk space that recordings can occupy. Default is 0 (ignore disk limit).
  • IN keepMinSeconds Minimum seconds of recordings to retain on disk. Default is 0 (keep all recordings).
  • IN deleteOlderThanKeepMin Flag to delete older logs exceeding the keepMinSeconds threshold. Default is false.
  • IN transportMode The transport mode used at the time the log was recorded. Default is RecordingTransportMode.unknown.

Implementation

RecorderConfiguration({
  required this.dataSource,
  this.logsDir = '',
  @Deprecated('Use hardwareSpecifications instead.') String deviceModel = '',
  Map<HardwareSpecification, String>? hardwareSpecifications,
  this.recordedTypes = const <DataType>[],
  this.minDurationSeconds = 30,
  this.videoQuality = Resolution.unknown,
  this.chunkDurationSeconds = 600,
  this.continuousRecording = true,
  this.enableAudio = false,
  this.maxDiskSpaceUsed = 0,
  this.keepMinSeconds = 0,
  this.deleteOlderThanKeepMin = false,
  this.transportMode = RecordingTransportMode.unknown,
}) {
  this.hardwareSpecifications =
      hardwareSpecifications ?? <HardwareSpecification, String>{};
  if (deviceModel.isNotEmpty) {
    this.hardwareSpecifications[HardwareSpecification.deviceModel] =
        deviceModel;
  }
}