Skip to main content
←API Reference ←NianticSpatial.NSDK.AR.Subsystems.Playback ←PlaybackCacheClient

OpenAsync


Declaration​

public async Task<PlaybackDataset> OpenAsync(string scanId, IProgress<float> progress = null, CancellationToken cancellationToken = default)

Summary​

Opens the scan's recording, downloading it into the cache unless it is already there.
The caller closes the dataset.

Remarks​

Call from the main thread. A cached scan needs no network. Only the first chunk of a chunked
recording plays.

Throws​

  • PlaybackOpenException — The open failed, including with SessionEnded when XR deinitializes before it finishes.
  • OperationCanceledException — cancellationToken was cancelled.
  • InvalidOperationException — NSDK is not initialized, or the scan is already being opened.
  • ArgumentException — scanId is empty or not a valid scan ID.

Parameters​

NameTypeSummary
scanIdstring
The portal scan ID.
progressIProgress<float>
Receives download progress in [0, 1].
cancellationTokenCancellationToken
Cancels the download.