<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SensitiveContentAnalysis",
  "identifier" : "/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Sensitive Content Analysis"
    ],
    "preciseIdentifier" : "c:objc(cs)SCVideoStreamAnalyzer"
  },
  "title" : "SCVideoStreamAnalyzer"
}
-->

# SCVideoStreamAnalyzer

An object that monitors a stream of video by analyzing frames for sensitive content.

```
class SCVideoStreamAnalyzer
```

## Overview

Use this class to detect sensitive content in a video stream, such as on a conference call that your app implements. The class detects sensitive content in the video stream from either the device’s camera or the remote devices signed into the call, depending on how you configure the analyzer.

Create an instance of this class for each video stream in the call.

To begin analyzing the stream, pass it to either [`beginAnalysis(of:)`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/beginAnalysis(of:)-78qm) (<doc://com.apple.documentation/documentation/AVFoundation/AVCaptureDeviceInput>) or [`beginAnalysis(of:)`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/beginAnalysis(of:)-9ehkx) (<doc://com.apple.documentation/documentation/VideoToolbox/VTDecompressionSession>), depending on your video playback implementation.

> Important:
> This class works only when the Communication Safety parental control in Screen Time is enabled, or when the Sensitive Content Warnings setting is turned on. The initializers of this class throw an error if both settings are off.

### React to sensitive content

When the framework detects sensitive content in the stream, it calls [`analysisChangedHandler`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/analysisChangedHandler) immediately with an [`SCSensitivityAnalysis`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalysis) object that includes information about the detection.

You implement the [`analysisChangedHandler`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/analysisChangedHandler) callback to inspect the detection results, which includes confirmation that content is sensitive as well as guidance on next steps your app can take. The framework offers your app suggestions in the handler, which include:

- Alerting the person to the presence of sensitive content ([`shouldIndicateSensitivity`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalysis/shouldIndicateSensitivity))
- Interrupting video playback ([`shouldInterruptVideo`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalysis/shouldInterruptVideo))
- Muting audio ([`shouldMuteAudio`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalysis/shouldMuteAudio))

To stop analyzing the stream, call [`endAnalysis()`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/endAnalysis()). If your app implements a custom stream decoder, you can analyze individual frames by passing pixel buffers to [`analyze(_:)`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/analyze(_:)).

In the event of an error during analysis, the handler receives an error object that details what went wrong. For more information, see: [`SCVideoStreamAnalysisChangeHandler`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalysisChangeHandler).

### Add the app entitlement

To use this class, the system requires the <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.sensitivecontentanalysis.client> entitlement in your app’s code signature. Calls to the framework fail to return positive results without it. You can add this entitlement to your app by enabling the Sensitive Content Analysis capability in Xcode; see <doc://com.apple.documentation/documentation/Xcode/adding-capabilities-to-your-app>.

For more information, see [Detecting sensitive content in media and providing intervention options](/documentation/SensitiveContentAnalysis/detecting-nudity-in-media-and-providing-intervention-options).

## Topics

### Creating a video stream analyzer

[`-  initWithParticipantUUID:streamDirection:error:`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/init(participantUUID:streamDirection:))

Creates a video stream analyzer for the given call participant and stream option.

[`StreamDirection`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/StreamDirection)

Options for the different types of analyzed video streams.

### Analyzing a video stream

[`-  analyzePixelBuffer:`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/analyze(_:))

Analyzes individual video-stream frames for sensitive content.

[`-  beginAnalysisOfCaptureDeviceInput:error:`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/beginAnalysis(of:)-78qm)

Analyzes video frames for the given capture device input.

[`-  beginAnalysisOfDecompressionSession:error:`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/beginAnalysis(of:)-9ehkx)

Analyzes video frames for the given decompression session.

[`analysisChanges`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/analysisChanges)

A stream your app uses to receive video-stream analysis results.

[`-  endAnalysis`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/endAnalysis())

Stops stream analysis.

### Responding to sensitive content

[`analysis`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/analysis)

The results of the first detected sensitive video frame.

[`analysisChangedHandler`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/analysisChangedHandler)

A handler that your app provides to react to sensitive content detection.

[`SCVideoStreamAnalysisChangeHandler`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalysisChangeHandler)

A handler your app provides to receive video-stream analysis results.

[`-  continueStream`](/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer/continueStream())

Indicates that your app is ready to resume video stream analysis.

## Relationships

### Conforms To

[`CVarArg`](/documentation/Swift/CVarArg)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)