Instance Method

connection(with:)

Returns the first connection in the connections array with an input port of a specified media type.

Declaration

func connection(with mediaType: AVMediaType) -> AVCaptureConnection?

Parameters

mediaType

A media type constant (such as video or audio).

Return Value

The first capture connection in the connections array that has an AVCaptureInput.Port with media type mediaType, or nil if no connection with the specified media type is found.

See Also

Accessing Connections

var connections: [AVCaptureConnection]

The capture output object’s connections.

enum AVCaptureOutput.DataDroppedReason

Information about why capture data was not delivered.