---
title: "setCameraSource(_:)"
framework: watchkit
role: symbol
role_heading: Instance Method
path: "watchkit/wkinterfacehmcamera/setcamerasource(_:)"
---

# setCameraSource(_:)

Set the HomeKit camera source displayed by this interface object.

## Declaration

```swift
func setCameraSource(_ cameraSource: HMCameraSource?)
```

## Parameters

- `cameraSource`: A HomeKit camera source, representing a video stream or a single snapshot from an IP camera.

## Discussion

Discussion Pass nil to clear the camera source.
