<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVKit",
  "identifier" : "/documentation/AVKit/AVPlayerViewController/videoGravity",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVKit"
    ],
    "preciseIdentifier" : "c:objc(cs)AVPlayerViewController(py)videoGravity"
  },
  "title" : "videoGravity"
}
-->

# videoGravity

A string that specifies how the video displays within the bounds of the view controller’s view.

```
var videoGravity: AVLayerVideoGravity { get set }
```

## Discussion

The player view controller supports the following video gravity values: <doc://com.apple.documentation/documentation/AVFoundation/AVLayerVideoGravity/resizeAspect>, <doc://com.apple.documentation/documentation/AVFoundation/AVLayerVideoGravity/resizeAspectFill>, and <doc://com.apple.documentation/documentation/AVFoundation/AVLayerVideoGravity/resize>.

The default value is <doc://com.apple.documentation/documentation/AVFoundation/AVLayerVideoGravity/resizeAspect>.

---

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)