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

PlaybackBackgroundView

↳ extends ImageView

Declaration​

class PlaybackBackgroundView

Summary​

A view that displays the current playback frame image as the background. Place this view behind your 3D/GL surface when in playback mode and call [setPlaybackFrame] whenever a new [PlaybackFrame] is delivered so the recorded camera image is shown. Orientation is corrected so that the image (which may be stored in sensor/landscape layout) is rotated to match the current device orientation using [ImageMath.displayTransform]. Use with [PlaybackSession] and a frame listener: when the session delivers a frame, build [FrameData] for NSDK and call [setPlaybackFrame] to update this view.


Functions​

NameTypeSummary
onSizeChangedvoid
-
setPlaybackFramevoid
Updates the background image from the given playback frame.
Call on the main thread when [PlaybackSession] delivers a new frame.
If [frame] is null or [frame.image] is null, the view is cleared.
Applies a display transform so the image orientation matches the current device orientation.
Uses frame metadata [screenOrientation] when present, with fallback to resolution-based inference.