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:

RequestDescription
GET /playersReturn the details of all of the players in your account
GET /players/:idReturn the details of a single player
PATCH /players/:idUpdate a player
DELETE /players/:idDelete a player
POST /playersCreate 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

NameTypeDefaultInformation
limitString25Maximum number to return
cursorString""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

KeyTypeDescription
idStringThe unique identifier given to this player
nameStringThe name given to this player
analyticsStringWhat events should be reported? Default is all, however you can specify "none"
autoplayBooleanShould the player try to play on-load (many browsers block this, though setting muted as true can help)?
mutedBooleanShould the video be muted on-load (usually needed to make autoplay work)
playsinlineBooleanOn mobile devices, should the video play inline (as opposed to immediately going fullscreen)
preloadBooleanShould we buffer a small amount of video on-load to improve performance?
show_nameBooleanShould the video's name (title) be shown on-load?
show_durationBooleanShould the video's duration be shown on-load?
controlsArrayWhat controls should be shown. The default is []. Either ['none'], or a combinaton: e.g ['play','fullscreen']
colourStringA colour, as hex e.g "#ff0000". The default is "" which uses the player's default colour/none
qualityStringThe quality on-load. The default is to choose based on the connection speed but you can force using: "highest" or "lowest"
trackStringIf captions/subtitles are available for a video, the language of one to show immediately on-load e.g "en"
created_byStringThe ID of the user who created it (if known)
created_timeStringThe date and time it was created
updated_byStringThe ID of the user who last modified it (if known)
updated_timeStringThe 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.

KeyTypeDescription
nameStringThe name of the player (1-50 characters)