---
title: "stopCapture(completionHandler:)"
framework: screencapturekit
role: symbol
role_heading: Instance Method
path: "screencapturekit/scstream/stopcapture(completionhandler:)"
---

# stopCapture(completionHandler:)

Stops the stream.

## Declaration

```swift
func stopCapture(completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)
```

```swift
func stopCapture() async throws
```

## Parameters

- `completionHandler`: A completion handler that provides an error if the stream fails to stop.

## See Also

### Starting and stopping a stream

- [startCapture(completionHandler:)](screencapturekit/scstream/startcapture(completionhandler:).md)
