Instance Property

layerInstructions

An array of video composition layer instruction instances of that specify how video frames from source tracks should be layered and composed.

Declaration

var layerInstructions: [AVVideoCompositionLayerInstruction] { get }

Discussion

Tracks are layered in the composition according to the top-to-bottom order of the layerInstructions array; the track with trackID of the first instruction in the array will be layered on top, with the track with the trackID of the second instruction immediately underneath, and so on.

If the property value is nil, the output is a fill of the background color.

See Also

Getting Composition Instruction Properties

var backgroundColor: CGColor?

The background color of the composition.

var timeRange: CMTimeRange

The time range during which the instruction is effective.

var enablePostProcessing: Bool

A Boolean value that indicates whether post processing is required for the video composition instruction.

var passthroughTrackID: CMPersistentTrackID

The track identifier from an instruction source frame.

var requiredSourceTrackIDs: [NSValue]

An array of track identifiers required to compose frames for the instruction.