Players
Players
Players control how your videos are presented (for example the colour of the buttons). Our default settings are fine for most users however you may like to customise how your content looks.
You can manage players by making the following requests:
Request | Description |
---|---|
GET /players | Return the details of all of the players in your account |
GET /players/:id | Return the details of a single player |
PATCH /players/:id | Update a player |
DELETE /players/:id | Delete a player |
POST /players | Create a player |
GET /players
Return the details of all of the players in your account.
Example request
curl \-H "Authorization: Bearer YOUR-API-KEY" \"https://api.vidbeo.com/v2/players"
Example response
{ "success": true, "result": [ { "id": "abcde12345abcde12345a", "name": "Example player", "analytics": "", "autoplay": false, "muted": false, "playsinline": true, "preload": true, "show_name": false, "show_duration": false, "controls": [], "colour": "", "quality": "", "track": "", "created_by": "abcde12345abcde12345a", "created_time": "2021-01-01T12:00:00.000Z", "updated_by": "abcde12345abcde12345a", "updated_time": "2021-01-01T12:00:00.000Z" }, ... ], "links": {}, "errors": []}
Optional parameters
Name | Type | Default | Information |
---|---|---|---|
limit | String | 25 | Maximum number to return |
cursor | String | "" | Used to get the next page of results: if applicable we return this as part of the links.next URL |
GET /players/:id
Return the details of a single player.
Example request
curl \-H "Authorization: Bearer YOUR-API-KEY" \"https://api.vidbeo.com/v2/players/abcde12345abcde12345a"
Example response
{ "success": true, "result": { "id": "abcde12345abcde12345a", "name": "Example player", "analytics": "", "autoplay": false, "muted": false, "playsinline": true, "preload": true, "show_name": false, "show_duration": false, "controls": [], "colour": "", "quality": "", "track": "", "created_by": "abcde12345abcde1234a", "created_time": "2021-02-01T00:00:00.000Z", "updated_by": "abcde12345abcde12345a", "updated_time": "2021-02-01T00:00:00.000Z" }, "links": null, "errors": []}
Response format
Key | Type | Description |
---|---|---|
id | String | The unique identifier given to this player |
name | String | The name given to this player |
analytics | String | What events should be reported? Default is all, however you can specify "none" |
autoplay | Boolean | Should the player try to play on-load (many browsers block this, though setting muted as true can help)? |
muted | Boolean | Should the video be muted on-load (usually needed to make autoplay work) |
playsinline | Boolean | On mobile devices, should the video play inline (as opposed to immediately going fullscreen) |
preload | Boolean | Should we buffer a small amount of video on-load to improve performance? |
show_name | Boolean | Should the video's name (title) be shown on-load? |
show_duration | Boolean | Should the video's duration be shown on-load? |
controls | Array | What controls should be shown. The default is []. Either ['none'], or a combinaton: e.g ['play','fullscreen'] |
colour | String | A colour, as hex e.g "#ff0000". The default is "" which uses the player's default colour/none |
quality | String | The quality on-load. The default is to choose based on the connection speed but you can force using: "highest" or "lowest" |
track | String | If captions/subtitles are available for a video, the language of one to show immediately on-load e.g "en" |
created_by | String | The ID of the user who created it (if known) |
created_time | String | The date and time it was created |
updated_by | String | The ID of the user who last modified it (if known) |
updated_time | String | The date and time it was last modified |
PATCH /players/:id
Update a player.
The body of the request should contain one, or more, attributes that you would like to update for the player. Please be very careful when making changes to existing items to avoid losing data, particularly if a particular player has sub-players.
Example request
curl \-g \-H "Authorization: Bearer YOUR-API-KEY" \-H "Content-Type: application/json" \-X PATCH \-d '{"name":"New name"}' \"https://api.vidbeo.com/v2/players/abcde12345abcde12345a"
Example response
{ "success": true, "result": { "id": "abcde12345abcde12345a", "name": "New name", "analytics": "", "autoplay": false, "muted": false, "playsinline": true, "preload": true, "show_name": false, "show_duration": false, "controls": [], "colour": "", "quality": "", "track": "", "created_by": "abcde12345abcde1234a", "created_time": "2021-02-01T00:00:00.000Z", "updated_by": "abcde12345abcde12345a", "updated_time": "2021-02-01T00:00:00.000Z" }, "links": null, "errors": []}
DELETE /players/:id
Delete a player.
Example request
curl \-H "Authorization: Bearer YOUR-API-KEY" \-X DELETE \"https://api.vidbeo.com/v2/players/abcde12345abcde12345a"
Example response
{ "success": true, "result": {}, "links": null, "errors": []}
POST /players
Create a player.
Example request
curl \-g \-H "Authorization: Bearer YOUR-API-KEY" \-H "Content-Type: application/json" \-X POST \-d '{"name": "Example"}' \"https://api.vidbeo.com/v2/players"
Example response
{ "success": true, "result": { "id": "abcde12345abcde12345a", "name": "Example", "analytics": "", "autoplay": false, "muted": false, "playsinline": true, "preload": true, "show_name": false, "show_duration": false, "controls": [], "colour": "", "quality": "", "track": "", "created_by": "abcde12345abcde1234a", "created_time": "2021-02-01T00:00:00.000Z", "updated_by": "abcde12345abcde12345a", "updated_time": "2021-02-01T00:00:00.000Z" }, "links": null, "errors": []}
Required parameters
You need to provide a name
.
Key | Type | Description |
---|---|---|
name | String | The name of the player (1-50 characters) |