<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/CameraView",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "HomeKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:16_HomeKit_SwiftUI10CameraViewV"
  },
  "title" : "CameraView"
}
-->

# CameraView

A SwiftUI view into which a video stream or an image snapshot is rendered.

```
@MainActor @preconcurrency struct CameraView
```

## Topics

### Creating a camera view

[`init(source:)`](/documentation/HomeKit/CameraView/init(source:))

Creates a new camera view using the given source.

[`HMCameraSource`](/documentation/HomeKit/HMCameraSource)

An abstract class for a camera’s data source.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)