<!--
{
  "availability" : [
    "tvOS: 12.0.0 - 18.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "TVMLKit",
  "identifier" : "/documentation/TVMLKit/TVPlaylist",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "TVMLKit"
    ],
    "preciseIdentifier" : "c:objc(cs)TVPlaylist"
  },
  "title" : "TVPlaylist"
}
-->

# TVPlaylist

A collection of media items associated with the Apple TV JavaScript player.

```
class TVPlaylist
```

## Overview

A `TVPlaylist` object contains read-only information about a playlist associated with the JavaScript player. You can use this information with your own custom <doc://com.apple.documentation/documentation/AVFoundation/AVPlayer> objects exposed through a [`TVPlayer`](/documentation/TVMLKit/TVPlayer) object. For example, you can retrieve album information from the JavaScript player and play the track through a `TVPlayer` object.

## Topics

### Retrieving Playlist Information

[`mediaItems`](/documentation/TVMLKit/TVPlaylist/mediaItems)

An array of media items contained in the playlist.

[`userInfo`](/documentation/TVMLKit/TVPlaylist/userInfo)

User-defined metadata, like a developer-specific identifier, for a playlist.

[`repeatMode`](/documentation/TVMLKit/TVPlaylist/repeatMode-swift.property)

A mode that determines how media items are replayed.

[`TVPlaylist.RepeatMode`](/documentation/TVMLKit/TVPlaylist/RepeatMode-swift.enum)

The modes that indicate how or whether media items can be replayed.

[`endAction`](/documentation/TVMLKit/TVPlaylist/endAction-swift.property)

An action that causes media playback to end.

[`TVPlaylist.EndAction`](/documentation/TVMLKit/TVPlaylist/EndAction-swift.enum)

The actions that cause media playback to end.



---

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)