<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVKit",
  "identifier" : "/documentation/AVKit/AVPlayerView/videoGravity",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVKit"
    ],
    "preciseIdentifier" : "c:objc(cs)AVPlayerView(py)videoGravity"
  },
  "title" : "videoGravity"
}
-->

# videoGravity

A value that determines how the player view displays video content within its bounds.

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

## Discussion

The video gravity determines how the player view scales or stretches the video content within the player view’s bounds. The player view supports the following video gravity values:

- <doc://com.apple.documentation/documentation/AVFoundation/AVLayerVideoGravity/resizeAspect>
- <doc://com.apple.documentation/documentation/AVFoundation/AVLayerVideoGravity/resizeAspectFill>
- <doc://com.apple.documentation/documentation/AVFoundation/AVLayerVideoGravity/resize>

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

This property is animatable.

---

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)