<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVKit",
  "identifier" : "/documentation/AVKit/AVViewport",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVKit"
    ],
    "preciseIdentifier" : "c:objc(cs)AVViewport"
  },
  "title" : "AVViewport"
}
-->

# AVViewport

An object that provides configuration options for how the player displays content in different viewing contexts.

```
class AVViewport
```

## Overview

Use this object to customize the visual presentation of your content, as the following example shows:

```swift
let portalViewport = AVPortalViewport()
portalViewport.aspectRatio = 2.39
playerViewController.viewport.portal = portalViewport
```

## Topics

### Configuring the portal viewport

[`var portal: AVPortalViewport?`](/documentation/AVKit/AVViewport/portal)

The viewport configuration to use when the player displays immersive content in a portal.

[`class AVPortalViewport`](/documentation/AVKit/AVPortalViewport)

An object that defines the visual parameters for content displayed within a portal frame.

## Relationships

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)