<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVKit",
  "identifier" : "/documentation/AVKit/VideoPlayer/init(player:videoOverlay:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AVKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:14_AVKit_SwiftUI11VideoPlayerV6player12videoOverlayACyxGSo8AVPlayerCSg_xyXEtcfc"
  },
  "title" : "init(player:videoOverlay:)"
}
-->

# init(player:videoOverlay:)

Creates a video-player user interface for the player object.

```
@MainActor @preconcurrency init(player: AVPlayer?, @ViewBuilder videoOverlay: () -> VideoOverlay)
```

## Parameters

`player`

The player that plays the audiovisual content.

`videoOverlay`

A closure that returns a `VideoOverlay` view to present over the player’s video content. This view is fully interactive, but is placed below the system-provided playback controls, and only receives unhandled events.

---

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)