---
title: sourceDeviceType
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avcaptureinput/port/sourcedevicetype
---

# sourceDeviceType

The device type of the source camera that provides data to the port.

## Declaration

```swift
var sourceDeviceType: AVCaptureDevice.DeviceType? { get }
```

## Discussion

Discussion All ports contained in an input’s ports property have the same source device type, which each equal to the deviceType property of the input’s device. When working with virtual devices such as the builtInDualCamera in an AVCaptureMultiCamSession, it’s possible to stream media from the virtual device’s constituent device streams by discovering and connecting hidden ports. In the case of the builtInDualCamera, its constituent devices are the wide-angle and telephoto cameras. By calling ports(for:sourceDeviceType:sourceDevicePosition:):, you may discover ports originating from one or more of the virtual device’s constituent devices and then make connections using those ports. Constituent device ports are never present in their owning virtual device input’s ports array.

## See Also

### Inspecting an input port

- [isEnabled](avfoundation/avcaptureinput/port/isenabled.md)
- [mediaType](avfoundation/avcaptureinput/port/mediatype.md)
- [formatDescription](avfoundation/avcaptureinput/port/formatdescription.md)
- [sourceDevicePosition](avfoundation/avcaptureinput/port/sourcedeviceposition.md)
- [clock](avfoundation/avcaptureinput/port/clock.md)
