open
Declaration
suspend fun open(scanId: String, onProgress: (Double) -> Unit): PlaybackDataset
Summary
Throws
PlaybackOpenException— if the open fails.com.nianticspatial.nsdk.NsdkInvalidArgumentStatusException— ifscanIdis malformed.com.nianticspatial.nsdk.NsdkInvalidOperationStatusException— if this session is already openingscanId.
Parameters
| Name | Type | Summary |
|---|---|---|
| scanId | String | The portal scan ID. |
| onProgress | (Double) -> Unit | Called on the calling coroutine with download progress in [0, 1]. |
Opens a scan's recording, downloading it into the cache unless it is already there.
Create and authorize the NSDK session first. A cached scan needs no network. Only the first
chunk of a chunked recording plays. Cancelling the calling coroutine cancels the download.
The dataset does not loop.