controllers / players.php
Players
Controller
Manages players that play the content managed on the server.
public
delete
(
)
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.
id |
DELETE
/api/v2/players/(:id:)
public
get
(
)
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.
id |
player_data
GET
/api/v2/players/(:id:)
public
monitor_search
(
)
public
monitor_search
(
)
Search the player monitor, which logs what a player has played so far. Requires the 'view_player_monitor' permission.
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. |
[results, total_rows, csv_results]
GET
/api/v2/players/monitor
public
now_playing
(
)
public
now_playing
(
)
Return data about what's now playing on a specific player.
id |
[show_name, show_time_left, media_data]
GET
/api/v2/players/playing/(:id:)
public
save
(
)
public
save
(
)
Edit a player. Requires 'manage_players' permission.
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_alert |
player_id
POST
/api/v2/players
public
search
(
)
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.
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. |
players_array
GET
/api/v2/players
public
station_id_avg_duration
(
)
public
station_id_avg_duration
(
)
Estimate the average duration of station IDs. Not tied to a particular player.
average
GET
/api/v2/players/avg-duration