Spatial Video Capturing on iPhone 15 Pro

Hi all,

I tried the "isSpatialVideoCaptureEnabled" with AVCaptureMovieFileOutput mentioned in WWDC24: Build compelling spatial photo and video experiences, and it works.

But there are some issues and questions:

  1. Below codes, the change.newValue always nil so the code seems not work.
let observation = videoDevice.observe(\.spatialCaptureDiscomfortReasons) { (device, change) in
    guard let newValue = change.newValue else { return }
    if newValue.contains(.subjectTooClose) {
        // Guide user to move back
    }
    if newValue.contains(.notEnoughLight) {
        // Guide user to find a brighter environment
    }
}
  1. AVCaptureMovieFileOutput is support spatial video capturing.

May I ask if AVCaptureVideoDataOutput will also support spatial video capturing?

I think the function for observe spatialCaptureDiscomfortReasons is not ready currently that it's in beta. Maybe wait for ios 18 public release version.

Spatial Video Capturing on iPhone 15 Pro
 
 
Q