Contents

plan(_:segmentHandler:)

Adds a track plan with manual segment completion control.

Declaration

func plan(_ trackPlan: AVAssetTrackPlan, segmentHandler: @escaping  @Sendable (AVPlannedSegmentWritingRequest) async throws -> AVAssetWritingPlanner.SegmentResult)

Parameters

  • trackPlan:

    The track plan contains information about the track and boundaries of all the segments.

  • segmentHandler:

    Handler that returns a Segmentresult for manual control.

Discussion

This variant provides fine-grained control over segment completion, allowing you to return a AVAssetWritingPlanner.SegmentResult that explicitly controls how the segment completes.

Topics

See Also