Contents

loadSamplePresentationTime(forTrackTime:completionHandler:)

Loads a sample presentation time that maps to the specified track time.

Declaration

func loadSamplePresentationTime(forTrackTime trackTime: CMTime, completionHandler: @escaping  @Sendable (CMTime, (any Error)?) -> Void)
func loadSamplePresentationTime(forTrackTime trackTime: CMTime) async throws -> CMTime

Parameters

  • trackTime:

    The track time of the presentation time to load.

  • completionHandler:

    A callback that the system invokes after it finishes the loading request. It passes the completion handler the following parameters:

    time

    A Cmtime value, which is Invalid if the track time is out of range or if an error occurs.

    error

    An error object if the request fails; otherwise, nil.

See Also

Loading track segments