Recording and storing video

In the previous section, you used AVFoundation to build a simple audio player app. You will now use AVFoundation again, except instead of playing video or audio, you will now record video and store it in the user's photo library. When using AVFoundation to record a video feed, you do so with an AVCaptureSession object. A capture session is responsible for taking the input from one or more AVCaptureDeviceInput objects, and writing it to an AVCaptureOutput subclass.

The following diagram shows the objects that are involved with recording media through an AVCaptureSession:

To get started on implementing the video recorder, ...

Get Mastering iOS 12 Programming - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.