How to play 3D videos in immersive mode?

Hey everyone. I am able to play 3d videos using AVPlayer, but I'm wondering how we can play it in immersive mode like hitting the immersive mode button in the stock photos app for spatial videos.

I looked into the DestinationVideo sample app's code for creating an immersive scene, but it seems like this app is just setting a static image texture for the skybox.

Replies

Yes. And the videos themselves are played in a boring mini-window. It's pretty lame.

Hello,

how did you achieved to play 3D video using AVPlayer? Is there a big difference to playing 2D video in the simulator?

Thanks a lot.

Any find a solution?

As far as I know, there is no built-in method to playback half equirectangular (180º) or full equirectangular (360º) content. Many have looked (including me). Perhaps this is an upcoming feature of AVPlayer.

In the meantime, it looks like you have to do what all other immersive players have done: create a RealityKit scene, add a hemisphere (180º) or full sphere (360º), and setup the AVPlayer to project to that surface. I don't know if this is the final/recommended way to do it, but it works well.

I could use AVPlayer to player a spatial video in immersive mode, but it dose't look like the effect in the official app Photos. This video has a clear edge in my app but fuzzy in Photos. Who knows why and how to make it the same with Photos.

  • How can you play a spatial video in immersive mode? What should I use iOS framework? RealityKit or just AVFoundation?

Add a Comment