# CreatePlayQueueMediaContainer

`MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.



## Fields

| Field                                                                                                                                    | Type                                                                                                                                     | Required                                                                                                                                 | Description                                                                                                                              |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `identifier`                                                                                                                             | *Optional\<String>*                                                                                                                      | :heavy_minus_sign:                                                                                                                       | N/A                                                                                                                                      |
| `offset`                                                                                                                                 | *Optional\<Long>*                                                                                                                        | :heavy_minus_sign:                                                                                                                       | The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.<br/> |
| `size`                                                                                                                                   | *Optional\<Long>*                                                                                                                        | :heavy_minus_sign:                                                                                                                       | N/A                                                                                                                                      |
| `totalSize`                                                                                                                              | *Optional\<Long>*                                                                                                                        | :heavy_minus_sign:                                                                                                                       | The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.<br/>                                     |
| `playQueueID`                                                                                                                            | *Optional\<Long>*                                                                                                                        | :heavy_minus_sign:                                                                                                                       | The ID of the play queue, which is used in subsequent requests.                                                                          |
| `playQueueLastAddedItemID`                                                                                                               | *Optional\<String>*                                                                                                                      | :heavy_minus_sign:                                                                                                                       | Defines where the "Up Next" region starts                                                                                                |
| `playQueueSelectedItemID`                                                                                                                | *Optional\<Long>*                                                                                                                        | :heavy_minus_sign:                                                                                                                       | The queue item ID of the currently selected  item.                                                                                       |
| `playQueueSelectedItemOffset`                                                                                                            | *Optional\<Long>*                                                                                                                        | :heavy_minus_sign:                                                                                                                       | The offset of the selected item in the play queue, from the beginning of the queue.                                                      |
| `playQueueSelectedMetadataItemID`                                                                                                        | *Optional\<Long>*                                                                                                                        | :heavy_minus_sign:                                                                                                                       | The metadata item ID of the currently selected item (matches `ratingKey` attribute in metadata item if the media provider is a library). |
| `playQueueShuffled`                                                                                                                      | *Optional\<Boolean>*                                                                                                                     | :heavy_minus_sign:                                                                                                                       | Whether or not the queue is shuffled.                                                                                                    |
| `playQueueSourceURI`                                                                                                                     | *Optional\<String>*                                                                                                                      | :heavy_minus_sign:                                                                                                                       | The original URI used to create the play queue.                                                                                          |
| `playQueueTotalCount`                                                                                                                    | *Optional\<Long>*                                                                                                                        | :heavy_minus_sign:                                                                                                                       | The total number of items in the play queue.                                                                                             |
| `playQueueVersion`                                                                                                                       | *Optional\<Long>*                                                                                                                        | :heavy_minus_sign:                                                                                                                       | The version of the play queue. It increments every time a change is made to the play queue to assist clients in knowing when to refresh. |