Skip to main content
←API Reference ←NSDK ←PlaybackDataset

open

Opens the dataset directory at datasetPath, read through native playback.

Declaration​

static func open(datasetPath: String) -> PlaybackDataset?

Summary​

Opens the dataset directory at datasetPath, read through native playback.

Returns​

The dataset, or nil if it cannot be opened or parsed

Parameters​

NameTypeSummary
datasetPathString
-

Overload 1​

static func open(directory: String, bundle: Bundle = .main) -> PlaybackDataset?

Summary​

Opens the dataset in directory of bundle, read through native playback.

Returns​

The dataset, or nil if the directory is not in the bundle or cannot be opened

Parameters​

NameTypeSummary
directoryString
-
bundleBundle
-

Overload 2​

static func open(scanId: String, onProgress: ((Double) -> Void)? = nil) async throws -> PlaybackDataset

Summary​

Opens a scan's recording from the Niantic Spatial portal through the active
NSDKSession's playback cache; see NSDKPlaybackCacheSession.open(scanId:onProgress:).
Uses the most recently created session; create and authorize it first. Releasing it ends
the open with PlaybackOpenError.sessionEnded.

Throws​

  • PlaybackOpenError.noSession if no session is active, and otherwise what NSDKPlaybackCacheSession.open(scanId:onProgress:) throws.

Parameters​

NameTypeSummary
scanIdString
-
onProgress ((Double) -> Void)?
-