Home > @magiclane/maps-sdk > Recorder
Recorder class
Recorder for capturing sensor and multimedia logs.
Use a configured RecorderConfiguration to create a Recorder with Recorder.create(). The recorder manages recording lifecycle (start, stop, pause, resume), audio/video capture and user metadata. See recorder guides for background permissions and storage recommendations.
The recorded logs can be accessed and managed using RecorderBookmarks and their metadata through LogMetadata.
Sensor Data Source
Signature:
export declare class Recorder extends GemAutoreleaseObject Extends: GemAutoreleaseObject
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
Attach activity metadata to the current recording. Provide an ActivityRecord describing the activity (title, description, sport type, visibility, etc.). Call this before stopping the recording to ensure the metadata is saved with the log. The activity record does not influence the recording process itself but rather provides descriptive metadata for the saved log. | |||
|
|
string |
Path to the current log file. | |
|
|
number |
Disk space used per second, in bytes. | |
|
|
Recording performance metrics. Returns various runtime statistics for an active recording (average speed, distance, elevation gain, etc.). Available while the recorder is in RecorderStatus.recording. | ||
|
|
The current RecorderConfiguration in use by the recorder. Returns the active configuration reflecting the settings applied at creation or through . Useful for inspection or diagnostics. Changing the configuration while recording does not take effect. Use the method to apply a new configuration. | ||
|
|
RecorderStatus |
Current recorder status. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Register callbacks to monitor recorder progress and status changes. | ||
|
Add a textual annotation (text mark) to the current recording. Call before stopping the recording to include the annotation in the final log file. | ||
|
Save arbitrary binary user metadata into the current log. Attach a binary blob under the provided string key. Call before stopping the recording so the data is included in the saved log. | ||
|
|
Creates a configured Recorder instance. Use this static factory with a RecorderConfiguration to obtain a recorder instance. The factory only constructs the recorder; to begin capturing data call . If recording must work while the app is in the background, ensure the required platform permissions and background location settings are configured (see SDK guides). | |
|
Whether audio capture is currently active. | ||
|
Pauses an ongoing recording. Transitions the recorder to RecorderStatus.pausing and then to RecorderStatus.paused when successful. | ||
|
Remove a previously registered listener. | ||
|
Resumes a paused recording. Transitions the recorder to RecorderStatus.resuming and then to RecorderStatus.recording when the operation succeeds. | ||
|
Apply a new recorder configuration. If the recorder is currently recording it will be stopped, reconfigured and restarted. Callers should handle the returned result to know whether the update succeeded. | ||
|
Starts audio capture for the current recording. Resumes audio recording only if a recording is currently active and audio is enabled in the recorder configuration (RecorderConfiguration.enableAudio). | ||
|
Starts the recording session. Initiates the recorder and transitions status to RecorderStatus.starting and then to RecorderStatus.recording on success. Always | ||
|
Stops audio capture for the current recording. Suspends audio recording when a recording is active and audio was enabled in the recorder configuration. | ||
|
Stops the recording session. Stops the recorder and transitions the status to RecorderStatus.stopping. On success the status becomes RecorderStatus.stopped; if RecorderConfiguration.continuousRecording is enabled and a chunk boundary was reached the status becomes RecorderStatus.restarting. |