Skip to main content
API Reference SwiftyNsdk

PlaybackSession

↳ inherits from ARKit.ARSession
A session that plays back frame metadata and images from a loaded dataset....

Declaration

class PlaybackSession

Summary

A session that plays back frame metadata and images from a loaded dataset. Playback runs on a background queue and continuously loops through frames at the framerate specified in the dataset. The session notifies its delegate of each frame update.


Constructors

init(dataset: PlaybackDataset)

Summary

Initializes a new playback session with an existing dataset.
- Parameter dataset: The playback dataset to use


Properties

NameTypeSummary
var playbackDelegate ( PlaybackSessionDelegate)?
Delegate that receives frame updates during playback
var playbackRenderer ( PlaybackRenderer)?
-

Methods

NameTypeSummary
hasDepthBool
Checks if the playback dataset has depth data from a LiDAR source.
- Returns: true if depthSource exists and equals "lidar", false otherwise
override pausevoid
Pauses playback.
The playback loop will exit on the next iteration after this is called.
The current frame index is preserved, so calling run() again will resume
from the same position.
override runvoid
Starts playback of the dataset.
Playback runs asynchronously on a background queue. Call pause() to stop playback.

Relationships

conforms to: Swift.Sendable

conforms to: ObjectiveC.NSObjectProtocol

conforms to: Swift.Equatable
conforms to: Swift.Hashable
conforms to: Swift.CVarArg
conforms to: Swift.CustomStringConvertible
conforms to: Swift.CustomDebugStringConvertible
conforms to: Swift.SendableMetatype