connection(with:)
Returns the first connection with an input port of a specified media type.
Declaration
func connection(with mediaType: AVMediaType) -> AVCaptureConnection?Parameters
Return Value
The first capture connection that has the specified media type, or nil if no connection for the media type exists.