Home > @magiclane/maps-sdk > RecorderConfiguration > create
RecorderConfiguration.create() method
Creates a configured RecorderConfiguration.
Use this factory to prepare recorder settings before creating a Recorder instance. The constructor only builds the configuration; it does not start or modify any active recorder by itself.
Signature:
static create(options: {
dataSource: DataSource;
logsDir?: string;
hardwareSpecifications?: Map<HardwareSpecification, string>;
recordedTypes?: DataType[];
minDurationSeconds?: number;
videoQuality?: Resolution;
chunkDurationSeconds?: number;
continuousRecording?: boolean;
enableAudio?: boolean;
maxDiskSpaceUsed?: number;
keepMinSeconds?: number;
deleteOlderThanKeepMin?: boolean;
transportMode?: RecordingTransportMode;
}): RecorderConfiguration;Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
options |
{ dataSource: DataSource; logsDir?: string; hardwareSpecifications?: Map<HardwareSpecification, string>; recordedTypes?: DataType[]; minDurationSeconds?: number; videoQuality?: Resolution; chunkDurationSeconds?: number; continuousRecording?: boolean; enableAudio?: boolean; maxDiskSpaceUsed?: number; keepMinSeconds?: number; deleteOlderThanKeepMin?: boolean; transportMode?: RecordingTransportMode; } |
Configuration options |
options properties:
- dataSource: DataSource
The data source used for recording. Required.
- Optional logsDir?: string
Absolute path to the directory used to store recorded logs. Defaults to an empty string.
- Optional hardwareSpecifications?: Map
Optional map of device metadata keyed by HardwareSpecification.
- Optional recordedTypes?: DataType[]
List of DataType values to record. If a requested type is not produced by the dataSource, recording will not start. Defaults to an empty array.
- Optional minDurationSeconds?: number
Minimum duration (seconds) a recording must reach to be saved. Defaults to 30.
- Optional videoQuality?: Resolution
Video resolution used when DataType.camera is recorded. Defaults to Resolution.unknown.
- Optional chunkDurationSeconds?: number
Split recordings into chunks of this many seconds. 0 disables chunking. Defaults to 0.
- Optional continuousRecording?: boolean
If true, a new recording starts automatically when a chunk ends. Defaults to true.
- Optional enableAudio?: boolean
Enable audio tracks for recordings. Defaults to false.
- Optional maxDiskSpaceUsed?: number
Maximum disk space in bytes that recordings may occupy. 0 disables disk checks. Defaults to 0.
- Optional keepMinSeconds?: number
Minimum seconds of recordings to retain on disk. Defaults to 0.
- Optional deleteOlderThanKeepMin?: boolean
If true, older logs are deleted once keepMinSeconds is exceeded. Defaults to false.
- Optional transportMode?: RecordingTransportMode
Transport mode associated with recorded logs. Defaults to RecordingTransportMode.unknown.
Returns:
A configured RecorderConfiguration instance.