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 :
create
start
stop
, then lifecycle may proceed withdestroy
orstart
destroy
Important
This class is intended for debugging purposes only. Do NOT use session replay in production application.-
Delegate for
VisionManager
. Delegate is held as a weak reference.Declaration
Swift
public weak var delegate: VisionManagerDelegate? { get set }
-
Fabric method for creating a
VisionReplayManager
instance.It’s only allowed to have one living instance of
VisionManager
orVisionReplayManager
. To createVisionReplayManager
with a different configuration calldestroy
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
onVisionManager
.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 startedVisionReplayManager
reads recorded telemetry and video from a session folder supplied tocreate(recordPath:)
method. IfVisionReplayManager
was stopped, thenstart
will resume reading the session from the moment it was stopped. Callingstart
on already started or destroyed instance is considered a mistake.Important
Do NOT call this method more than once or afterdestroy
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 beforestart
or afterdestroy
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()