Contents

AVPortalViewport

A viewport configuration used when displaying content in portals.

Declaration

class AVPortalViewport

Overview

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 = portalViewport

Topics

Configuring the aspect ratio

See Also

visionOS playback