<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "BrowserEngineKit",
  "identifier" : "/documentation/BrowserEngineKit/BEMediaEnvironment-n91a/makeCaptureSessionWithError:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "BrowserEngineKit"
    ],
    "preciseIdentifier" : "c:objc(cs)BEMediaEnvironment(im)makeCaptureSessionWithError:"
  },
  "title" : "makeCaptureSessionWithError:"
}
-->

# makeCaptureSessionWithError:

Creates a new capture session in this media environment.

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

## Discussion

The system only allows a capture session to start when its media environment is active (see [`activateWithError:`](/documentation/BrowserEngineKit/BEMediaEnvironment-n91a/activateWithError:)).

---

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)