---
title: "makeCaptureSessionWithError:"
framework: browserenginekit
role: symbol
role_heading: Instance Method
path: "browserenginekit/bemediaenvironment-n91a/makecapturesessionwitherror:"
---

# makeCaptureSessionWithError:

Creates a new capture session in this media environment.

## Declaration

```occ
- (AVCaptureSession *) makeCaptureSessionWithError:(NSError **) error;
```

## Discussion

Discussion The system only allows a capture session to start when its media environment is active (see activateWithError:).
