VisionReplayManager

public final class VisionReplayManager : BaseVisionManager

VisionReplayManager is a counterpart of VisionManager that uses recorded video and telemetry instead of realtime data. Use it to debug and test functions that use Vision in a development environment before testing in a vehicle. Use it in the same workflow as you use VisionManager after creating it with specific recorded session.

Lifecycle of VisionReplayManager :

  1. create
  2. start
  3. stop, then lifecycle may proceed with destroy or start
  4. destroy

Important

This class is intended for debugging purposes only. Do NOT use session replay in production application.
  • Fabric method for creating a VisionReplayManager instance.

    It’s only allowed to have one living instance of VisionManager or VisionReplayManager. To create VisionReplayManager with a different configuration call destroy on existing instance or release all references to it.

    Important

    Do NOT call this method more than once.

    Declaration

    Swift

    public static func create(recordPath: String) throws -> VisionReplayManager

    Parameters

    recordPath

    Path to a folder with recorded session. You typically record such sessions using startRecording / stopRecording on VisionManager.

    Return Value

    Instance of VisionReplayManager configured to use data from specified session.

  • Video source that provides frames from recorded video.

    Declaration

    Swift

    public var videoSource: VideoSource { get }
  • Duration of the session in seconds

    Declaration

    Swift

    public var duration: Float { get }
  • Current progress of the session in seconds

    Declaration

    Swift

    public var progress: Float { get set }
  • Start delivering events from VisionReplayManager. When started VisionReplayManager reads recorded telemetry and video from a session folder supplied to create(recordPath:) method. If VisionReplayManager was stopped, then start will resume reading the session from the moment it was stopped. Calling start on already started or destroyed instance is considered a mistake.

    Important

    Do NOT call this method more than once or after destroy is called.

    Declaration

    Swift

    public func start()
  • Stop delivering events from VisionReplayManager. VisionReplayManager stops reading telemetry and video of the session.

    Important

    Do NOT call this method more than once or before start or after destroy is called.

    Declaration

    Swift

    public func stop()
  • Clean up the state and resources of VisionReplayManager.

    Important

    Do NOT call this method more than once.

    Declaration

    Swift

    public func destroy()