Creating a great video playback experience in your app
Media Experience
- Builds on same APIs as other AVFoundation apps on iOS and iPadOS, AVKit builds to create a experience on each platform
- AVFoundation can render performantly in RealityKit
- You must use the matching SDK for xrOS or VisionOS
- Use AVKit and AVFoundation
- Adding the item after creating the play may improve performance
- Use a UIViewControllerPresentatble and then attach it to your WindowView
- Screen and audio are anchored to the screen so while you move around they stay consistent. The basics of the controls will be consistent. The video player controls will appear if you look a the screen and touch it. They will disappear in time, or you can look and touch again.
Advance Features
- Thumbnail scrubbing allows for scene-less scrubbing. If a trick play track is available it can be used.
- You can use interstitials UI to programmatically to identify adds or other key points in the scrubber
- Contextual actions allow you to add buttons
- Custom Info View Controllers allow you to show meta data and / or related content
- Immersive spaces – you can add in other 3D Assets, your viewing screen will automatically anchor and position itself, moving the controls closer to the viewer
- Provide feedback to talk about custom UI controls. Apple is working hard to update this new player
Other use cases
- Inline media can be done in a window. This just an AVViewControlPlayer happens automatically if it doesn’t cover the whole window. It won’t be able to be 3D because of the other content in the windows
- For splash screens, etc. use RealityKit Video players component.
- This will be an Aspect ratio correct mesh with captions and better performance.
- If you want video as an effect – you may want your own geometry use RealityKit VideoMaterial
Conclusion
- Take a look at this table to help decide which type of player you need:
- Check out DestinationVideo sample project