# Playlists

Playlists are the minimal playing unit in Castmill. For any content that you want to display, you need to use a playlist. A playlist can be as simple as just one media item, or as complex as a layout with several sections with many items per section.

{% hint style="info" %}
Remember that playlists needs to be programmed in a Calendar so that the player knows when to play them.
{% endhint %}

![](/files/-M_Uq-MGVXwdrxGAr7eQ)

You create new playlists by clickin on the "New Playlist" button. A dialog will popup and you will be allowed to choose the layout for your playlist. You can read more about layouts [here](/content/playlists/layouts.md).

![](/files/-M_Uq7WeII6xOb7lZ2GA)

For a simple layout such as landscape or portrait, the playlist will have just 1 section. So you can just drag and drop your medias from the Object selection component and rearrange them as you need.

#### Duration

When a media object is added to a Playlist, it gets a duration that depends on the kind of object it is. If it is a video it will be the video's duration, if it is an image or a widget it will have 30 seconds duration by default. However you can easily change the duration of the item by clicking on the duration and sliding the time:

![](/files/-M_VPYvzJiUAbyJRVZaw)

#### Rearrange items

Once the items are in the playlist you can still rearrange them in a different order by just dragging and dropping the items inside the playlist:

![](/files/-M_VR9YDcwiTGMcaruiB)

#### Preview

You can always preview the playlist by using the playlist controls which are similar to a video player. If you want to move the time to a given playlist item just click on the item and the player will move the time to the start of that given item.

####


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.castmill.com/content/playlists.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
