Skip to main content
←API Reference ←com.nianticspatial.nsdk.helpers

createPlaybackDataSource


Declaration​

fun createPlaybackDataSource( frameProvider: () -> PlaybackFrame?, orientationProvider: () -> Orientation = { Orientation.PORTRAIT } ): NsdkSessionDataSource

Summary​

Creates a playback data source that converts dataset bitmaps to YUV on a background thread.


The returned object implements DefaultLifecycleObserver — add it to your lifecycle
for cleanup on destroy.

Parameters​

NameTypeSummary
frameProvider() -> PlaybackFrame?
Returns the latest [PlaybackFrame].
orientationProvider() -> Orientation
Returns the current device screen orientation.