addConnection(_:)
Adds a connection to the capture session.
Declaration
func addConnection(_ connection: AVCaptureConnection)Parameters
- connection:
The capture connection to add to the session.
Discussion
You can only add a capture connection to a session using this method if canAddConnection(_:) returns true.
When using addInput(_:) or addOutput(_:), the session automatically forms connections between all compatible inputs and outputs. Manually adding connections is only necessary when adding an input or output with no connections.