<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVKit",
  "identifier" : "/documentation/AVKit/AVPictureInPictureController/ContentSource-swift.class",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVKit"
    ],
    "preciseIdentifier" : "c:objc(cs)AVPictureInPictureControllerContentSource"
  },
  "title" : "AVPictureInPictureController.ContentSource"
}
-->

# AVPictureInPictureController.ContentSource

An object that represents the source of the content to present in Picture in Picture.

```
class ContentSource
```

## Overview

The system supports displaying content from an <doc://com.apple.documentation/documentation/AVFoundation/AVPlayerLayer> or <doc://com.apple.documentation/documentation/AVFoundation/AVSampleBufferDisplayLayer> in a Picture in Picture window. Use an instance of this class to describe the source of your app’s content.

## Topics

### Creating a Content Source

[`init(playerLayer:)`](/documentation/AVKit/AVPictureInPictureController/ContentSource-swift.class/init(playerLayer:))

Creates a content source with a player layer.

[`init(sampleBufferDisplayLayer:playbackDelegate:)`](/documentation/AVKit/AVPictureInPictureController/ContentSource-swift.class/init(sampleBufferDisplayLayer:playbackDelegate:))

Creates a content source with a sample buffer display layer.

[`init(activeVideoCallSourceView:contentViewController:)`](/documentation/AVKit/AVPictureInPictureController/ContentSource-swift.class/init(activeVideoCallSourceView:contentViewController:))

Creates a content source with an active video call.

### Accessing the Presentation Layer

[`playerLayer`](/documentation/AVKit/AVPictureInPictureController/ContentSource-swift.class/playerLayer)

The presenting player layer.

[`sampleBufferDisplayLayer`](/documentation/AVKit/AVPictureInPictureController/ContentSource-swift.class/sampleBufferDisplayLayer)

The presenting sample buffer display layer.

### Accessing the Active Call Presentation

[`activeVideoCallSourceView`](/documentation/AVKit/AVPictureInPictureController/ContentSource-swift.class/activeVideoCallSourceView)

The view that contains the video content of the call.

[`activeVideoCallContentViewController`](/documentation/AVKit/AVPictureInPictureController/ContentSource-swift.class/activeVideoCallContentViewController)

The view controller that presents the video call content.

[`AVPictureInPictureVideoCallViewController`](/documentation/AVKit/AVPictureInPictureVideoCallViewController)

A view controller that presents content from a video call in Picture in Picture.

### Configuring the Delegate

[`sampleBufferPlaybackDelegate`](/documentation/AVKit/AVPictureInPictureController/ContentSource-swift.class/sampleBufferPlaybackDelegate)

A delegate object that responds to sample buffer playback events.

[`AVPictureInPictureSampleBufferPlaybackDelegate`](/documentation/AVKit/AVPictureInPictureSampleBufferPlaybackDelegate)

A protocol for controlling playback from a sample buffer display layer in Picture in Picture.

### Invalidating State

[`invalidatePlaybackState()`](/documentation/AVKit/AVPictureInPictureController/invalidatePlaybackState())

Invalidates the controller’s current playback state and fetches the updated state from the sample buffer playback delegate object.



---

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)