---
title: videoGravity
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avplayerlayer/videogravity
---

# videoGravity

A value that specifies how the layer displays the player’s visual content within the layer’s bounds.

## Declaration

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

## Discussion

Discussion A player layer supports the following video gravity values: resizeAspect resizeAspectFill resize The default value is resizeAspect. This property is animatable.

## See Also

### Configuring the presentation

- [videoRect](avfoundation/avplayerlayer/videorect.md)
- [AVLayerVideoGravity](avfoundation/avlayervideogravity.md)
