# open Source: https://www.nianticspatial.com/docs/api/kotlin/com.nianticspatial.nsdk.playback.PlaybackCacheSession.open/ open --- ## Declaration suspend fun open(scanId: String, onProgress: (Double) -> Unit): PlaybackDataset #### Summary 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. #### Throws PlaybackOpenException -- if the open fails. com.nianticspatial.nsdk.NsdkInvalidArgumentStatusException -- if scanId is malformed. com.nianticspatial.nsdk.NsdkInvalidOperationStatusException -- if this session is already opening scanId. ### Parameters | Name | Type | Summary | | --- | --- | --- | | scanId | String | The portal scan ID. | | onProgress | (Double) -> Unit | Called on the calling coroutine with download progress in [0, 1]. | ---