Skip to main content

PROTOCOL

PlaybackSessionDelegate

public protocol PlaybackSessionDelegate

Delegate protocol for receiving frame updates during playback.

Methods​

session(_:didUpdate:image:)​

func session(_ session: PlaybackSession, didUpdate frame: PlaybackDataset.FrameMetadata, image: CGImage?)

Called each time a new frame is ready during playback.

This method is called on the playback queue, so any UI updates should be dispatched to the main queue.

  • Parameters:
    • session: The playback session that generated the update
    • frame: The metadata for the current frame
    • image: The CGImage for the current frame, or nil if unavailable

Parameters​

NameDescription
sessionThe playback session that generated the update
frameThe metadata for the current frame
imageThe CGImage for the current frame, or nil if unavailable