AVPortalViewport
A viewport configuration used when displaying content in portals.
Declaration
class AVPortalViewportOverview
Defines the visual parameters for content displayed within a portal frame. Use this configuration to create cinematic viewing experiences with custom framing.
Portal viewports allow you to control how immersive content is framed and presented to users. You can specify the aspect ratio of the portal frame to achieve the desired visual effect.
When properties are not explicitly set, the system provides sensible defaults:
Aspect Ratio: Defaults to 16:9 (1.78) for standard widescreen content
let portalViewport = AVPortalViewport()
portalViewport.aspectRatio = 2.39
playerViewController.viewport.portal = portalViewportTopics
Configuring the aspect ratio
See Also
visionOS playback
Playing immersive media with AVKitCreating a multiview video playback experience in visionOSAdopting the system player interface in visionOSTrimming and exporting media in visionOSAVPlayerViewControllerAVPlayerViewControllerDelegateAVExperienceControllerAVMultiviewManagerAVGroupExperienceCoordinatorAVViewportThird-party casting support