This topic explains how to opt out of automatic player updates, as well as setting a player to a specific version.
Note: This document uses curl statements to perform operations using the Player Management API. In the curl statements you will see values of $EMAIL, {account_id} and {player_id}. You must either create environment variables by those names and assign corresponding values, or supply the literal values for the variables.
Automatic player updates
By default Brightcove automatically updates all players on a regular basis so that they can take advantage of new features and fixes without any effort required from our customers. While Brightcove does not recommend opting out of updates in most cases, Brightcove realizes that from time to time some customers would prefer that your players remain completely untouched (for instance, you have done rigorous testing in preparation for a big event and you don’t want to risk anything changing).
Opting out of auto-updates
If you find the need to opt out of player updates for a period of time, the simplest way is by applying a PATCH to your player’s configuration. The following curl statement performs this task:
curl \
--header "Content-Type: application/json" \
--user $EMAIL \
--request PATCH \
--data '{
"player": {
"template": {
"locked": true
}
}
}' \
https://players.api.brightcove.com/v2/accounts/{{account_id}}/players/{{player_id}}/configuration
This adds the locked setting to your preview player. The PATCH initially affects only your preview player, so you need to publish your player. You could do this in Studio or using the following curl statement:
curl \
--header "Content-Type: application/json" \
--user $EMAIL \
--request POST \
https://players.api.brightcove.com/v2/accounts/{{account_id}}/players/{{player_id}}/publish
Opting back into auto-updates
When you are ready to opt back in to updates, you simply apply another update, setting locked
to false
and then republish the player. First you
change locked to false:
curl \
--header "Content-Type: application/json" \
--user $EMAIL \
--request PATCH \
--data '{
"player": {
"template": {
"locked": false
}
}
}' \
https://players.api.brightcove.com/v2/accounts//players//configuration
This will update your preview player to the current player template version if it is different from what you currently have. You should test with the preview player URL that is returned by this call to ensure that your player still functions as expected. Once satisfied you then publish the player to make the new player go live:
curl \
--header "Content-Type: application/json" \
--user $EMAIL \
--request POST \
https://players.api.brightcove.com/v2/accounts/{{account_id}}/players/{{player_id}}/publish
Switch to specific version
You may wish to switch your player to a specific version. You may be opting out of updates, but want to use some specific version that came after you opted out of updates. To do this: use the following curl statement, of course substituting the specific version of the player you want:
curl \
--header "Content-Type: application/json" \
--user $EMAIL \
--request PATCH \
--data '{
"player": {
"template": {
"version": "1.14.11"
}
}
}' \
https://players.api.brightcove.com/v2/accounts/{{account_id}}/players/{{player_id}}/configuration
Note that you can set the version and opt out of updates at the same time:
curl \
--header "Content-Type: application/json" \
--user $EMAIL \
--request PATCH \
--data '{
"player": {
"template": {
"version": "1.14.11",
"locked": true
}
}
}' \
https://players.api.brightcove.com/v2/accounts/{{account_id}}/players/{{player_id}}/configuration
As with any PATCH update, you must publish the player once you are satisfied with changes:
curl \
--header "Content-Type: application/json"cp
--user $EMAIL \
--request POST \
https://players.api.brightcove.com/v2/accounts/{{account_id}}/players/{{player_id}}/publish