RecorderConfiguration constructor
- required DataSource dataSource,
- String logsDir = '',
- @Deprecated('Use hardwareSpecifications instead.') String deviceModel = '',
- Map<
HardwareSpecification, String> ? hardwareSpecifications, - List<
DataType> recordedTypes = const <DataType>[], - int minDurationSeconds = 30,
- Resolution videoQuality = Resolution.unknown,
- int chunkDurationSeconds = 600,
- bool continuousRecording = true,
- bool enableAudio = false,
- int maxDiskSpaceUsed = 0,
- int keepMinSeconds = 0,
- bool deleteOlderThanKeepMin = false,
- 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;
}
}