Instance Method

addOutput(_:)

Adds a given output to the session.

Declaration

func addOutput(_ output: AVCaptureOutput)

Parameters

output

An output to add to the session.

Discussion

You can only add an output to a session using this method if canAddOutput(_:) returns true. This method throws an exception when invoked and canAddOutput(_:) returns false.

You can invoke this method while the session is running.

See Also

Managing Inputs and Outputs

var inputs: [AVCaptureInput]

The capture session’s inputs.

func canAddInput(AVCaptureInput) -> Bool

Returns a Boolean value that indicates whether a given input can be added to the session.

func addInput(AVCaptureInput)

Adds a given input to the session.

func removeInput(AVCaptureInput)

Removes a given input.

var outputs: [AVCaptureOutput]

The capture session’s outputs.

func canAddOutput(AVCaptureOutput) -> Bool

Returns a Boolean value that indicates whether a given output can be added to the session.

func removeOutput(AVCaptureOutput)

Removes a given output.