AVCaptureConnection

extension AVCaptureConnection
  • Returns the capture connection for the desired media type, otherwise nil.

    Declaration

    Swift

    public class func connection(withMediaType mediaType: AVMediaType, fromConnections connections: [AVCaptureConnection]) -> AVCaptureConnection?

    Parameters

    mediaType

    Specified media type. (i.e. AVMediaTypeVideo, AVMediaTypeAudio, etc.)

    connections

    Array of AVCaptureConnection objects to search

    Return Value

    Capture connection for the desired media type, otherwise nil