OpenBroadcaster Documentation
controllers / player.php

Player

Controller

Manages players that play the content managed on the server.

public  search ( )

Return a list of players filtered by user-provided info. By default, hide sensitive information unless the user has the 'manage_players' permission.

Parameters
filters Filter by arbitrary values in the players table.
orderby Order players by column in database.
orderdesc Order descending (set/TRUE) or ascending (unset).
limit Limit number of players returned, useful for paging.
offset Get only the player after offset, useful for paging.
Returns players_array
public  save ( )

Edit a player. Requires 'manage_players' permission.

Parameters
id
station_ids IDs of stations played by this player.
name
description
stream_url
password
ip_address
support_audio
support_video
support_images
support_linein
timezone
station_id_image_duration Duration static images are displayed in seconds.
default_playlist
parent_player_id Parent player ID. If set, it can use certain values of the parent player depending on which use_parent parameters are set.
use_parent_dynamic
use_parent_schedule
use_parent_ids If TRUE, 'station_ids' is emptied and 'station_id_image_duration' will be ignored.
use_parent_playlist If TRUE, 'default_playlist_id' will be set to FALSE.
use_parent_emergency
Returns player_id
public  delete ( )

Delete a player. Requires the 'manage_players' permission. Note that the method returns false when trying to delete a parent player, since this would result in invalid settings for child players.

Parameters
id
public  get ( )

Get data from a single player. Never returns the player password, and only returns the ip_address field if the user has the 'manage_players' permission.

Parameters
id
Returns player_data
public  station_id_avg_duration ( )

Estimate the average duration of station IDs. Not tied to a particular player.

Returns average
public  monitor_search ( )

Search the player monitor, which logs what a player has played so far. Requires the 'view_player_monitor' permission.

Parameters
player_id
date_start
date_end
filters Filter by arbitrary values in the players table.
orderby Order players by column in database.
orderdesc Order descending (set/TRUE) or ascending (unset).
limit Limit number of players returned, useful for paging.
offset Get only the player after offset, useful for paging.
Returns [results, total_rows, csv_results]
public  now_playing ( )

Return data about what's now playing on a specific player.

Parameters
id
Returns [show_name, show_time_left, media_data]