Where is the source code to stream video on iPhone?
Asked on 2024-07-27
1 search
The source code to stream video on iPhone can be found in the AV Foundation framework. Specifically, you can refer to the AVCam sample code project available on the Apple Developer website. This project demonstrates how to use the camera capture APIs to record video, which can be extended to support spatial video recording.
For more detailed information on recording spatial video, you can check out the session Build compelling spatial photo and video experiences from WWDC 2024. This session provides a step-by-step guide on how to set up an AV capture session, configure the capture device, and enable spatial video recording.
Here is a brief overview of the steps involved:
- Create an AV capture session.
- Set up the capture device to use the built-in dual wide camera.
- Pick a supported video format that supports spatial video.
- Enable spatial video recording on the output.
For more details, you can refer to the chapter "Tour of the new APIs" in the session Build compelling spatial photo and video experiences.

Discover media performance metrics in AVFoundation
Discover how you can monitor, analyze, and improve user experience with the new media performance APIs. Explore how to monitor AVPlayer performance for HLS assets using different AVMetricEvents, and learn how to use these metrics to understand and triage player performance issues.

Build compelling spatial photo and video experiences
Learn how to adopt spatial photos and videos in your apps. Explore the different types of stereoscopic media and find out how to capture spatial videos in your iOS app on iPhone 15 Pro. Discover the various ways to detect and present spatial media, including the new QuickLook Preview Application API in visionOS. And take a deep dive into the metadata and stereo concepts that make a photo or video spatial.

Capture HDR content with ScreenCaptureKit
Learn how to capture high dynamic colors using ScreenCaptureKit, and explore new features like HDR support, microphone capture, and straight-to-file recording.
