<!--
{
  "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/AVPictureInPictureSampleBufferPlaybackDelegate/pictureInPictureControllerTimeRangeForPlayback(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVKit"
    ],
    "preciseIdentifier" : "c:objc(pl)AVPictureInPictureSampleBufferPlaybackDelegate(im)pictureInPictureControllerTimeRangeForPlayback:"
  },
  "title" : "pictureInPictureControllerTimeRangeForPlayback(_:)"
}
-->

# pictureInPictureControllerTimeRangeForPlayback(_:)

Asks the delegate for the current playable time range.

```
func pictureInPictureControllerTimeRangeForPlayback(_ pictureInPictureController: AVPictureInPictureController) -> CMTimeRange
```

## Parameters

`pictureInPictureController`

The Picture in Picture controller.

## Return Value

A <doc://com.apple.documentation/documentation/CoreMedia/CMTimeRange> value that defines the content’s time range.

## Discussion

Use the following guidelines when specifying a time range value:

- For live content, return a time range with a duration of <doc://com.apple.documentation/documentation/CoreMedia/CMTime/positiveInfinity>.
- For nonlive content, return a time range that contains the current time of the sample buffer display layer’s timebase.
- When there’s no content to play, return <doc://com.apple.documentation/documentation/CoreMedia/CMTimeRange/invalid>.

The system calls this method whenever you call the [`invalidatePlaybackState()`](/documentation/AVKit/AVPictureInPictureController/invalidatePlaybackState()) method, and at other times as it requires.

---

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)