OpenBroadcaster Documentation
controllers / playlists.php

Playlists

Controller

The playlists controller manages all playlists on the server, including dynamic selections.

public  delete ( )

Delete a playlist. Requires the usual 'user_can_edit()' permissions.

Parameters
id An array of playlist IDs. Can be a single ID.
API Route DELETE /api/v2/playlists
public  get ( )

Get a single playlist. Only get the advanced permissions if the user has the 'playlists_advanced_permissions' permission.

Parameters
id
Returns playlist
API Route GET /api/v2/playlists/(:id:)
public  save ( )

Edit a playlist. Requires 'manage_playlists' or 'create_own_playlists' permission when creating new playlists, and the usual permissions from 'user_can_edit()' for editing.

Parameters
id ID of the playlist. Optional, not provided when creating a new playlist.
name
description
status Visibility: private, visible, or public.
type Standard, advanced, or liveassist.
items
liveassist_button_items
Returns id
API Route POST /api/v2/playlists
public  search ( )

Playlist search.

Parameters
q Query
l Limit
o Offset
sort_by
sort_dir
my Ownership. Set to filter for playlists owned by user.
Returns [num_results, playlists]
API Route GET /api/v2/playlists
private  user_can_edit ( playlist )

Checks if the current user can edit playlists. Private method used by many other playlist management methods in this controller.

The rules are as follows: If the user has the 'manage_playlists' permission, return TRUE. If the player owns the playlist AND the user has the 'create_own_playlists' permission, return TRUE. If the user is in the permissions array for this playlist, return TRUE. If the user is in a group that is in the group permissions array for this playlist, return TRUE. Otherwise, return FALSE.

Parameters
playlist
Returns can_edit
API Route GET /api/v2/playlists/editable
public  validate_dynamic_properties ( )

Validate dynamic selection and provide running estimate.

Parameters
search_query
num_items
num_items_all Boolean set to TRUE to use all items. Overrides num_items.
image_duration Duration static images are displayed in seconds.
Returns [duration]
API Route GET /api/v2/playlists/validate