# PlaybackDataset Source: https://www.nianticspatial.com/docs/api/swift/NSDK.class-PlaybackDataset/ PlaybackDataset --- ## Declaration class PlaybackDataset ## Summary A dataset loaded from a capture JSON file containing frame metadata. This class uses on-demand loading for frame images and depth data. Only the currently requested frame is loaded into memory, reducing memory pressure for large datasets. --- ## Properties | Name | Type | Summary | | --- | --- | --- | | let captureRoot | CaptureRoot | The fully decoded `capture.json` for this dataset (capture-level metadata plusper-frame metadata, including each frame's recorded GPS `location`). Exposed socallers can read the recording's metadata -- e.g. its location -- without running playback. | | let compassTimestampBase | ClockBase | Clock this dataset's compass `headingTimestamp` values are on. Uses the explicit`compassTimestampBase` field when present, otherwise classifies by the first non-zeroheading timestamp's magnitude (zero timestamps mean "not captured" and are skipped).Resolved once at load, like the other SDKs. | --- ## Methods | Name | Type | Summary | | --- | --- | --- | | hasDepth | Bool | Checks if the dataset has depth data from a LiDAR source. | --- ## Nested Types ### Structs | Name | Type | Summary | | --- | --- | --- | | CaptureMetadata | CaptureMetadata | Metadata structure for capture information. All fields optional so varying capture exports decode without keyNotFound. | | CaptureRoot | CaptureRoot | Root structure for the capture JSON file. Required fields per capture.json spec; optional fields may be omitted. | | FrameMetadata | FrameMetadata | Frame metadata structure matching the JSON format. Required fields per capture.json spec; optional fields may be omitted. | | LocationMetadata | LocationMetadata | Location metadata structure. All fields are optional so various capture formats (2D-only GPS, no compass, minimal logs) decode without keyNotFound. | --- ### Enums | Name | Type | Summary | | --- | --- | --- | | PlaybackDatasetError | PlaybackDatasetError | Errors that can occur when retrieving frame data. | ---