Player Themes

Download Spec

List all player themes

get /players

Retrieve a list of all the player themes you created, as well as details about each one.

HTTP basic apiKey

sortBy

string

createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format.

Enum
  • name
  • createdAt
  • updatedAt
Example
"createdAt"

sortOrder

string

Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones.

Enum
  • asc
  • desc
Example
"asc"

currentPage

int

Choose the number of search results to return per page. Minimum value: 1

Default
1
Example
2

pageSize

int

Results per page. Allowed values 1-100, default is 25.

Default
25
Example
30

Request

// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/PlayerThemesApi.md#list

package main

import (
    "context"
    "fmt"
    "os"
    apivideosdk "github.com/apivideo/api.video-go-client"
)

func main() {
    client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
    // if you rather like to use the sandbox environment:
    // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
    req := apivideosdk.PlayerThemesApiListRequest{}
    
    req.SortBy("createdAt") // string | createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format.
    req.SortOrder("asc") // string | Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones.
    req.CurrentPage(int32(2)) // int32 | Choose the number of search results to return per page. Minimum value: 1 (default to 1)
    req.PageSize(int32(30)) // int32 | Results per page. Allowed values 1-100, default is 25. (default to 25)

    res, err := client.PlayerThemes.List(req)
    

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PlayerThemes.List``: %v\
", err)
    }
    // response from `List`: PlayerThemesListResponse
    fmt.Fprintf(os.Stdout, "Response from `PlayerThemes.List`: %v\
", res)
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/PlayerThemesApi.md#list

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const sortBy = 'createdAt'; // createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format.
const sortOrder = 'asc'; // Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones.
const currentPage = 2; // Choose the number of search results to return per page. Minimum value: 1
const pageSize = 30; // Results per page. Allowed values 1-100, default is 25.

// PlayerThemesListResponse
const playerThemes = await client.playerThemes.list({ sortBy, sortOrder, currentPage, pageSize }); 
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/PlayerThemesApi.md#list

import apivideo
from apivideo.api import player_themes_api
from apivideo.model.bad_request import BadRequest
from apivideo.model.player_themes_list_response import PlayerThemesListResponse
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = player_themes_api.PlayerThemesApi(api_client)
    sort_by = "createdAt" # str | createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format. (optional)
    sort_order = "asc" # str | Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. (optional)
    current_page = 2 # int | Choose the number of search results to return per page. Minimum value: 1 (optional) if omitted the server will use the default value of 1
    page_size = 30 # int | Results per page. Allowed values 1-100, default is 25. (optional) if omitted the server will use the default value of 25

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # List all players
        api_response = api_instance.list(sort_by=sort_by, sort_order=sort_order, current_page=current_page, page_size=page_size)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling PlayerThemesApi->list: %s\n" % e)
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/PlayerThemesApi.md#list

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.PlayerThemesApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    PlayerThemesApi apiInstance = client.playerThemes();
    
    String sortBy = "createdAt"; // createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format.
    String sortOrder = "asc"; // Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones.
    Integer currentPage = 1; // Choose the number of search results to return per page. Minimum value: 1
    Integer pageSize = 25; // Results per page. Allowed values 1-100, default is 25.

    try {
      Page<PlayerTheme> result = apiInstance.list()
            .sortBy(sortBy)
            .sortOrder(sortOrder)
            .currentPage(currentPage)
            .pageSize(pageSize)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling PlayerThemesApi#list");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/PlayerThemesApi.md#list

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class listExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var sortBy = createdAt;  // string | createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format. (optional) 
            var sortOrder = asc;  // string | Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. (optional) 
            var currentPage = 2;  // int? | Choose the number of search results to return per page. Minimum value: 1 (optional)  (default to 1)
            var pageSize = 30;  // int? | Results per page. Allowed values 1-100, default is 25. (optional)  (default to 25)
            var apiPlayerThemesInstance = apiInstance.PlayerThemes();
            try
            {
                // List all players
                PlayerThemesListResponse result = apiPlayerThemesInstance.list(sortBy, sortOrder, currentPage, pageSize);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PlayerThemesApi.list: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
<?php
// First install the api client: "composer require api-video/php-api-client"
// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/PlayerThemesApi.md#list

require __DIR__ . '/vendor/autoload.php';

$playerThemes = $client->playerThemes()->list(array(
    'sortBy' => 'createdAt', // createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format.
    'sortOrder' => 'asc', // ->setAllowed(asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones.)
    'currentPage' => 2, // Choose the number of search results to return per page. Minimum ->setvalue(1)
    'pageSize' => 30 // Results per page. Allowed values 1-100, default is 25.
)); 
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/PlayerThemesAPI.md#list

Response

Examples Schema

Success

{
  "data": [
    {
      "backgroundBottom": "rgba(94, 95, 89, 1)",
      "backgroundText": "rgba(255, 255, 255, .95)",
      "backgroundTop": "rgba(72, 4, 45, 1)",
      "createdAt": "2020-01-13T10:09:17+00:00",
      "enableApi": false,
      "enableControls": false,
      "forceAutoplay": false,
      "forceLoop": false,
      "hideTitle": false,
      "link": "rgba(255, 0, 0, .95)",
      "linkActive": "rgba(255, 0, 0, .75)",
      "linkHover": "rgba(255, 255, 255, .75)",
      "playerId": "pl4fgtjy4tjyKDK545DRdfg",
      "text": "rgba(255, 255, 255, .95)",
      "trackBackground": "rgba(0, 0, 0, 0)",
      "trackPlayed": "rgba(255, 255, 255, .95)",
      "trackUnplayed": "rgba(255, 255, 255, .1)",
      "updatedAt": "2020-01-13T10:09:17+00:00"
    },
    {
      "backgroundBottom": "rgba(94, 95, 89, 1)",
      "backgroundText": "rgba(255, 255, 255, .95)",
      "backgroundTop": "rgba(72, 4, 45, 1)",
      "createdAt": "2020-01-13T10:09:17+00:00",
      "enableApi": true,
      "enableControls": true,
      "forceAutoplay": true,
      "forceLoop": false,
      "hideTitle": false,
      "link": "rgba(255, 0, 0, .95)",
      "linkActive": "rgba(255, 0, 0, .75)",
      "linkHover": "rgba(255, 255, 255, .75)",
      "playerId": "pl54fgtjy4tjyKDK45DRdfg",
      "text": "rgba(255, 255, 255, .95)",
      "trackBackground": "rgba(0, 0, 0, 0)",
      "trackPlayed": "rgba(255, 255, 255, .95)",
      "trackUnplayed": "rgba(255, 255, 255, .1)",
      "updatedAt": "2020-01-13T10:09:17+00:00"
    }
  ],
  "pagination": {
    "currentPage": 1,
    "currentPageItems": 4,
    "itemsTotal": 4,
    "links": [
      {
        "rel": "self",
        "uri": "https://ws.api.video/players?currentPage=1"
      },
      {
        "rel": "first",
        "uri": "https://ws.api.video/players?currentPage=1"
      },
      {
        "rel": "last",
        "uri": "https://ws.api.video/players?currentPage=1"
      }
    ],
    "pageSize": 25,
    "pagesTotal": 1
  }
}

Bad Request

{
  "name": "page",
  "problems": [
    {
      "name": "page",
      "range": {
        "min": 1
      },
      "title": "This parameter is out of the allowed range of values."
    },
    {
      "name": "pageSize",
      "range": {
        "max": 100,
        "min": 10
      },
      "title": "This parameter is out of the allowed range of values."
    }
  ],
  "range": {
    "min": 1
  },
  "status": 400,
  "title": "This parameter is out of the allowed range of values."
}

data

array[object (PlayerTheme)]

required

PlayerTheme

object (PlayerTheme)

assets

object (assets)

link

string

The path to the file containing your logo.

Example
"path/to/my/logo/mylogo.jpg"

logo

string

The name of the file containing the logo you want to use.

Example
"mylogo.jpg"

backgroundBottom

string

RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)

backgroundText

string

RGBA color for title text. Default: rgba(255, 255, 255, 1)

backgroundTop

string

RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)

createdAt

string

date-time

When the player was created, presented in ISO-8601 format.

Example
"2020-01-31T10:17:47+00:00"

enableApi

boolean

enable/disable player SDK access. Default: true

enableControls

boolean

enable/disable player controls. Default: true

forceAutoplay

boolean

enable/disable player autoplay. Default: false

forceLoop

boolean

enable/disable looping. Default: false

hideTitle

boolean

enable/disable title. Default: false

link

string

RGBA color for all controls. Default: rgba(255, 255, 255, 1)

linkActive

string

RGBA color for the play button when hovered.

linkHover

string

RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)

name

string

The name of the player theme

playerId

string

required

Example
"pl45KFKdlddgk654dspkze"

text

string

RGBA color for timer text. Default: rgba(255, 255, 255, 1)

trackBackground

string

RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)

trackPlayed

string

RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)

trackUnplayed

string

RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)

updatedAt

string

date-time

When the player was last updated, presented in ISO-8601 format.

Example
"2020-01-31T10:18:47+00:00"

pagination

object (pagination)

required

Example
{ "currentPage": 3, "currentPageItems": 20, "itemsTotal": 123, "links": { "first": { "rel": "first", "uri": "/videos/search?currentPage=1&pageSize=20" }, "last": { "rel": "last", "uri": "/videos/search?currentPage=6&pageSize=20" }, "next": { "rel": "next", "uri": "/videos/search?currentPage=4&pageSize=20" }, "previous": { "rel": "previous", "uri": "/videos/search?currentPage=2&pageSize=20" } }, "pageSize": 20, "pagesTotal": 7 }

currentPage

int

The current page index.

currentPageItems

int

The number of items on the current page.

itemsTotal

int

Total number of items that exist.

links

array[object (PaginationLink)]

required

PaginationLink

object (PaginationLink)

rel

string

uri

string

uri

pageSize

int

Maximum number of item per page.

pagesTotal

int

Number of items listed in the current page.

name

string

The name of the parameter that caused the error.

problems

array[object (BadRequest)]

Returns any additional problems in the request in an array of objects.

BadRequest

object (BadRequest)

name

string

The name of the parameter that caused the error.

status

int

The HTTP status code.

title

string

A description of the error that occurred.

type

string

A link to the error documentation.

status

int

The HTTP status code.

title

string

A description of the error that occurred.

type

string

A link to the error documentation.

Create a player

post /players

Create a player for your video, and customise it.

HTTP basic apiKey

backgroundBottom

string

RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)

backgroundText

string

RGBA color for title text. Default: rgba(255, 255, 255, 1)

backgroundTop

string

RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)

enableApi

boolean

enable/disable player SDK access. Default: true

Default
true

enableControls

boolean

enable/disable player controls. Default: true

Default
true

forceAutoplay

boolean

enable/disable player autoplay. Default: false

Default
false

forceLoop

boolean

enable/disable looping. Default: false

Default
false

hideTitle

boolean

enable/disable title. Default: false

Default
false

link

string

RGBA color for all controls. Default: rgba(255, 255, 255, 1)

linkActive

string

RGBA color for the play button when hovered.

linkHover

string

RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)

name

string

Add a name for your player theme here.

Max Length
100

text

string

RGBA color for timer text. Default: rgba(255, 255, 255, 1)

trackBackground

string

RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)

trackPlayed

string

RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)

trackUnplayed

string

RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)

Request

{
  "assets": {
    "link": "https://api.video",
    "logo": "https://cdn.api.video/player/pl14Db6oMJRH6SRVoOwORacK/logo.png"
  },
  "backgroundBottom": "rgba(94, 95, 89, 1)",
  "backgroundText": "rgba(255, 255, 255, .95)",
  "backgroundTop": "rgba(72, 4, 45, 1)",
  "enableApi": true,
  "enableControls": true,
  "forceAutoplay": false,
  "forceLoop": false,
  "hideTitle": false,
  "language": "en",
  "link": "rgba(255, 0, 0, .95)",
  "linkActive": "rgba(255, 0, 0, .75)",
  "linkHover": "rgba(255, 255, 255, .75)",
  "name": "My nice theme",
  "shapeAspect": "flat",
  "shapeBackgroundBottom": "rgba(50, 50, 50, .8)",
  "shapeBackgroundTop": "rgba(50, 50, 50, .7)",
  "shapeMargin": 10,
  "shapeRadius": 3,
  "text": "rgba(255, 255, 255, .95)",
  "trackBackground": "rgba(0, 0, 0, 0)",
  "trackPlayed": "rgba(255, 255, 255, .95)",
  "trackUnplayed": "rgba(255, 255, 255, .1)"
}
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/PlayerThemesApi.md#create

package main

import (
    "context"
    "fmt"
    "os"
    apivideosdk "github.com/apivideo/api.video-go-client"
)

func main() {
    client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
    // if you rather like to use the sandbox environment:
    // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
        
    playerThemeCreationPayload := *apivideosdk.NewPlayerThemeCreationPayload() // PlayerThemeCreationPayload | 

    
    res, err := client.PlayerThemes.Create(playerThemeCreationPayload)

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PlayerThemes.Create``: %v\
", err)
    }
    // response from `Create`: PlayerTheme
    fmt.Fprintf(os.Stdout, "Response from `PlayerThemes.Create`: %v\
", res)
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/PlayerThemesApi.md#create

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const playerThemeCreationPayload = {
  text: "rgba(255, 255, 255, 1)", // RGBA color for timer text. Default: rgba(255, 255, 255, 1)
  link: "rgba(255, 255, 255, 1)", // RGBA color for all controls. Default: rgba(255, 255, 255, 1)
  linkHover: "rgba(255, 255, 255, 1)", // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)
  trackPlayed: "rgba(255, 255, 255, 1)", // RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)
  trackUnplayed: "rgba(255, 255, 255, 1)", // RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)
  trackBackground: "rgba(255, 255, 255, 1)", // RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)
  backgroundTop: "rgba(255, 255, 255, 1)", // RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)
  backgroundBottom: "rgba(255, 255, 255, 1)", // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)
  backgroundText: "rgba(255, 255, 255, 1)", // RGBA color for title text. Default: rgba(255, 255, 255, 1)
  enableApi: true, // enable/disable player SDK access. Default: true
  enableControls: true, // enable/disable player controls. Default: true
  forceAutoplay: true, // enable/disable player autoplay. Default: false
  hideTitle: true, // enable/disable title. Default: false
  forceLoop: true, // enable/disable looping. Default: false
}; 
 
const playerTheme = await client.playerThemes.create(playerThemeCreationPayload); 
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/PlayerThemesApi.md#create

import apivideo
from apivideo.api import player_themes_api
from apivideo.model.player_theme_creation_payload import PlayerThemeCreationPayload
from apivideo.model.player_theme import PlayerTheme
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = player_themes_api.PlayerThemesApi(api_client)
    player_theme_creation_payload = PlayerThemeCreationPayload(
        text="text_example",
        link="link_example",
        link_hover="link_hover_example",
        track_played="track_played_example",
        track_unplayed="track_unplayed_example",
        track_background="track_background_example",
        background_top="background_top_example",
        background_bottom="background_bottom_example",
        background_text="background_text_example",
        enable_api=True,
        enable_controls=True,
        force_autoplay=False,
        hide_title=False,
        force_loop=False,
    ) # PlayerThemeCreationPayload | 

    # example passing only required values which don't have defaults set
    try:
        # Create a player
        api_response = api_instance.create(player_theme_creation_payload)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling PlayerThemesApi->create: %s\
" % e)
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/PlayerThemesApi.md#create

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.PlayerThemesApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    PlayerThemesApi apiInstance = client.playerThemes();
    
    PlayerThemeCreationPayload playerThemeCreationPayload = new PlayerThemeCreationPayload(); // 
    playerThemeCreationPayload.setText(""null""); // RGBA color for timer text. Default: rgba(255, 255, 255, 1)
    playerThemeCreationPayload.setLink(""null""); // RGBA color for all controls. Default: rgba(255, 255, 255, 1)
    playerThemeCreationPayload.setLinkHover(""null""); // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)
    playerThemeCreationPayload.setTrackPlayed(""null""); // RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)
    playerThemeCreationPayload.setTrackUnplayed(""null""); // RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)
    playerThemeCreationPayload.setTrackBackground(""null""); // RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)
    playerThemeCreationPayload.setBackgroundTop(""null""); // RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)
    playerThemeCreationPayload.setBackgroundBottom(""null""); // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)
    playerThemeCreationPayload.setBackgroundText(""null""); // RGBA color for title text. Default: rgba(255, 255, 255, 1)
    playerThemeCreationPayload.setEnableApi(); // enable/disable player SDK access. Default: true
    playerThemeCreationPayload.setEnableControls(); // enable/disable player controls. Default: true
    playerThemeCreationPayload.setForceAutoplay(); // enable/disable player autoplay. Default: false
    playerThemeCreationPayload.setHideTitle(); // enable/disable title. Default: false
    playerThemeCreationPayload.setForceLoop(); // enable/disable looping. Default: false


    try {
      PlayerTheme result = apiInstance.create(playerThemeCreationPayload);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling PlayerThemesApi#create");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/PlayerThemesApi.md#create

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class createExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var playerThemeCreationPayload = new PlayerThemeCreationPayload(); // PlayerThemeCreationPayload | 
            var apiPlayerThemesInstance = apiInstance.PlayerThemes();
            try
            {
                // Create a player
                PlayerTheme result = apiPlayerThemesInstance.create(playerThemeCreationPayload);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PlayerThemesApi.create: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
<?php
// First install the api client: "composer require api-video/php-api-client"
// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/PlayerThemesApi.md#create

require __DIR__ . '/vendor/autoload.php';

$playerThemeCreationPayload = (new \ApiVideo\Client\Model\PlayerThemeCreationPayload())
    ->setText("rgba(255, 255, 255, 1)") // RGBA color for timer text. Default: rgba(255, 255, 255, 1))
    ->setLink("rgba(255, 255, 255, 1)") // RGBA color for all controls. Default: rgba(255, 255, 255, 1))
    ->setLinkHover("rgba(255, 255, 255, 1)") // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1))
    ->setTrackPlayed("rgba(255, 255, 255, 1)") // RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95))
    ->setTrackUnplayed("rgba(255, 255, 255, 1)") // RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35))
    ->setTrackBackground("rgba(255, 255, 255, 1)") // RGBA color playback bar: background. Default: rgba(255, 255, 255, .2))
    ->setBackgroundTop("rgba(255, 255, 255, 1)") // RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7))
    ->setBackgroundBottom("rgba(255, 255, 255, 1)") // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7))
    ->setBackgroundText("rgba(255, 255, 255, 1)") // RGBA color for title text. Default: rgba(255, 255, 255, 1))
    ->setEnableApi(true) // enable/disable player SDK access. Default: true)
    ->setEnableControls(true) // enable/disable player controls. Default: true)
    ->setForceAutoplay(true) // enable/disable player autoplay. Default: false)
    ->setHideTitle(true) // enable/disable title. Default: false)
    ->setForceLoop(true); // enable/disable looping. Default: false)

$playerTheme = $client->playerThemes()->create($playerThemeCreationPayload); 
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/PlayerThemesAPI.md#create

ApiVideoClient.apiKey = "YOUR_API_KEY"

let videoCreationPayload = PlayerThemeCreationPayload(
  text = "rgba(255, 0, 0, 1)", // RGBA color for timer text. Default: rgba(255, 255, 255, 1)
  link = "rgba(0, 0, 255, 1)", // RGBA color for all controls. Default: rgba(255, 255, 255, 1)
  linkHover = "rgba(0, 255, 255, 1)", // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)
  trackPlayed = "rgba(255, 0, 255, 1)", // RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)
  trackUnplayed = "rgba(255, 255, 255, 1)", // RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)
  trackBackground = "rgba(255, 255, 255, 1)", // RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)
  backgroundTop = "rgba(0, 255, 255, 1)", // RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)
  backgroundBottom = "rgba(255, 255, 255, 1)", // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)
  backgroundText = "rgba(255, 255, 255, 1)", // RGBA color for title text. Default: rgba(255, 255, 255, 1)
  enableApi = true, // enable/disable player SDK access. Default: true
  enableControls = true, // enable/disable player controls. Default: true
  forceAutoplay = true, // enable/disable player autoplay. Default: false
  hideTitle = true, // enable/disable title. Default: false
  forceLoop = true // enable/disable looping. Default: false
)


PlayerThemesAPI.create(playerThemeCreationPayload: playerThemeCreationPayload) { (response, error) in
    
}

Response

Examples Schema

Created

{
  "backgroundBottom": "rgba(94, 95, 89, 1)",
  "backgroundText": "rgba(255, 255, 255, .95)",
  "backgroundTop": "rgba(72, 4, 45, 1)",
  "createdAt": "2020-01-13T10:09:17+00:00",
  "enableApi": false,
  "enableControls": false,
  "forceAutoplay": false,
  "forceLoop": false,
  "hideTitle": false,
  "link": "rgba(255, 0, 0, .95)",
  "linkActive": "rgba(255, 0, 0, .75)",
  "linkHover": "rgba(255, 255, 255, .75)",
  "playerId": "pl45d5vFFGrfdsdsd156dGhh",
  "text": "rgba(255, 255, 255, .95)",
  "trackBackground": "rgba(0, 0, 0, 0)",
  "trackPlayed": "rgba(255, 255, 255, .95)",
  "trackUnplayed": "rgba(255, 255, 255, .1)",
  "updatedAt": "2020-01-13T10:09:17+00:00"
}

assets

object (assets)

link

string

The path to the file containing your logo.

Example
"path/to/my/logo/mylogo.jpg"

logo

string

The name of the file containing the logo you want to use.

Example
"mylogo.jpg"

backgroundBottom

string

RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)

backgroundText

string

RGBA color for title text. Default: rgba(255, 255, 255, 1)

backgroundTop

string

RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)

createdAt

string

date-time

When the player was created, presented in ISO-8601 format.

Example
"2020-01-31T10:17:47+00:00"

enableApi

boolean

enable/disable player SDK access. Default: true

enableControls

boolean

enable/disable player controls. Default: true

forceAutoplay

boolean

enable/disable player autoplay. Default: false

forceLoop

boolean

enable/disable looping. Default: false

hideTitle

boolean

enable/disable title. Default: false

link

string

RGBA color for all controls. Default: rgba(255, 255, 255, 1)

linkActive

string

RGBA color for the play button when hovered.

linkHover

string

RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)

name

string

The name of the player theme

playerId

string

required

Example
"pl45KFKdlddgk654dspkze"

text

string

RGBA color for timer text. Default: rgba(255, 255, 255, 1)

trackBackground

string

RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)

trackPlayed

string

RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)

trackUnplayed

string

RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)

updatedAt

string

date-time

When the player was last updated, presented in ISO-8601 format.

Example
"2020-01-31T10:18:47+00:00"

Retrieve a player

get /players/{playerId}

Retreive a player theme by player id.

HTTP basic apiKey

playerId

string

required

The unique identifier for the player you want to retrieve.

Example
"pl45d5vFFGrfdsdsd156dGhh"

Request

// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/PlayerThemesApi.md#get

package main

import (
    "context"
    "fmt"
    "os"
    apivideosdk "github.com/apivideo/api.video-go-client"
)

func main() {
    client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
    // if you rather like to use the sandbox environment:
    // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
        
    playerId := "pl45d5vFFGrfdsdsd156dGhh" // string | The unique identifier for the player you want to retrieve. 

    
    res, err := client.PlayerThemes.Get(playerId)

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PlayerThemes.Get``: %v\
", err)
    }
    // response from `Get`: PlayerTheme
    fmt.Fprintf(os.Stdout, "Response from `PlayerThemes.Get`: %v\
", res)
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/PlayerThemesApi.md#get

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player you want to retrieve. 
const playerTheme = await client.playerThemes.get(playerId); 
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/PlayerThemesApi.md#get

import apivideo
from apivideo.api import player_themes_api
from apivideo.model.not_found import NotFound
from apivideo.model.player_theme import PlayerTheme
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = player_themes_api.PlayerThemesApi(api_client)
    player_id = "pl45d5vFFGrfdsdsd156dGhh" # str | The unique identifier for the player you want to retrieve. 

    # example passing only required values which don't have defaults set
    try:
        # Show a player
        api_response = api_instance.get(player_id)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling PlayerThemesApi->get: %s\
" % e)
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/PlayerThemesApi.md#get

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.PlayerThemesApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    PlayerThemesApi apiInstance = client.playerThemes();
    
    String playerId = "pl45d5vFFGrfdsdsd156dGhh"; // The unique identifier for the player you want to retrieve. 

    try {
      PlayerTheme result = apiInstance.get(playerId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling PlayerThemesApi#get");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/PlayerThemesApi.md#get

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class getExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var playerId = pl45d5vFFGrfdsdsd156dGhh;  // string | The unique identifier for the player you want to retrieve. 
            var apiPlayerThemesInstance = apiInstance.PlayerThemes();
            try
            {
                // Show a player
                PlayerTheme result = apiPlayerThemesInstance.get(playerId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PlayerThemesApi.get: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
<?php
// First install the api client: "composer require api-video/php-api-client"
// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/PlayerThemesApi.md#get

require __DIR__ . '/vendor/autoload.php';

$playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player you want to retrieve. 
$playerTheme = $client->playerThemes()->get($playerId);  
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/PlayerThemesAPI.md#get

Response

Examples Schema

Success

{
  "backgroundBottom": "rgba(94, 95, 89, 1)",
  "backgroundText": "rgba(255, 255, 255, .95)",
  "backgroundTop": "rgba(72, 4, 45, 1)",
  "createdAt": "2020-01-13T10:09:17+00:00",
  "enableApi": false,
  "enableControls": false,
  "forceAutoplay": false,
  "forceLoop": false,
  "hideTitle": false,
  "link": "rgba(255, 0, 0, .95)",
  "linkActive": "rgba(255, 0, 0, .75)",
  "linkHover": "rgba(255, 255, 255, .75)",
  "playerId": "pl45d5vFFGrfdsdsd156dGhh",
  "text": "rgba(255, 255, 255, .95)",
  "trackBackground": "rgba(0, 0, 0, 0)",
  "trackPlayed": "rgba(255, 255, 255, .95)",
  "trackUnplayed": "rgba(255, 255, 255, .1)",
  "updatedAt": "2020-01-13T11:12:14+00:00"
}

Not Found

{
  "name": "playerId",
  "status": 404,
  "title": "The requested resource was not found.",
  "type": "https://docs.api.video/docs/resourcenot_found"
}

assets

object (assets)

link

string

The path to the file containing your logo.

Example
"path/to/my/logo/mylogo.jpg"

logo

string

The name of the file containing the logo you want to use.

Example
"mylogo.jpg"

backgroundBottom

string

RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)

backgroundText

string

RGBA color for title text. Default: rgba(255, 255, 255, 1)

backgroundTop

string

RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)

createdAt

string

date-time

When the player was created, presented in ISO-8601 format.

Example
"2020-01-31T10:17:47+00:00"

enableApi

boolean

enable/disable player SDK access. Default: true

enableControls

boolean

enable/disable player controls. Default: true

forceAutoplay

boolean

enable/disable player autoplay. Default: false

forceLoop

boolean

enable/disable looping. Default: false

hideTitle

boolean

enable/disable title. Default: false

link

string

RGBA color for all controls. Default: rgba(255, 255, 255, 1)

linkActive

string

RGBA color for the play button when hovered.

linkHover

string

RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)

name

string

The name of the player theme

playerId

string

required

Example
"pl45KFKdlddgk654dspkze"

text

string

RGBA color for timer text. Default: rgba(255, 255, 255, 1)

trackBackground

string

RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)

trackPlayed

string

RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)

trackUnplayed

string

RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)

updatedAt

string

date-time

When the player was last updated, presented in ISO-8601 format.

Example
"2020-01-31T10:18:47+00:00"

name

string

status

int

title

string

type

string

Delete a player

delete /players/{playerId}

Delete a player if you no longer need it. You can delete any player that you have the player ID for.

HTTP basic apiKey

playerId

string

required

The unique identifier for the player you want to delete.

Example
"pl45d5vFFGrfdsdsd156dGhh"

Request

// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/PlayerThemesApi.md#delete

package main

import (
    "context"
    "fmt"
    "os"
    apivideosdk "github.com/apivideo/api.video-go-client"
)

func main() {
    client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
    // if you rather like to use the sandbox environment:
    // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
        
    playerId := "pl45d5vFFGrfdsdsd156dGhh" // string | The unique identifier for the player you want to delete.

    
    err := client.PlayerThemes.Delete(playerId)

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PlayerThemes.Delete``: %v\
", err)
    }
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/PlayerThemesApi.md#delete

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player you want to delete.
await client.playerThemes.delete(playerId); 
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/PlayerThemesApi.md#delete

import apivideo
from apivideo.api import player_themes_api
from apivideo.model.not_found import NotFound
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = player_themes_api.PlayerThemesApi(api_client)
    player_id = "pl45d5vFFGrfdsdsd156dGhh" # str | The unique identifier for the player you want to delete.

    # example passing only required values which don't have defaults set
    try:
        # Delete a player
        api_instance.delete(player_id)
    except apivideo.ApiException as e:
        print("Exception when calling PlayerThemesApi->delete: %s\n" % e)
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/PlayerThemesApi.md#delete

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.PlayerThemesApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    PlayerThemesApi apiInstance = client.playerThemes();
    
    String playerId = "pl45d5vFFGrfdsdsd156dGhh"; // The unique identifier for the player you want to delete.

    try {
      apiInstance.delete(playerId);
    } catch (ApiException e) {
      System.err.println("Exception when calling PlayerThemesApi#delete");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/PlayerThemesApi.md#delete

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class deleteExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var playerId = pl45d5vFFGrfdsdsd156dGhh;  // string | The unique identifier for the player you want to delete.
            var apiPlayerThemesInstance = apiInstance.PlayerThemes();
            try
            {
                // Delete a player
                apiPlayerThemesInstance.delete(playerId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PlayerThemesApi.delete: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
<?php
// First install the api client: "composer require api-video/php-api-client"
// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/PlayerThemesApi.md#delete

require __DIR__ . '/vendor/autoload.php';

$playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player you want to delete.
$client->playerThemes()->delete($playerId);  
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/PlayerThemesAPI.md#delete

Response

Examples Schema

No Content

Empty response

Not Found

{
  "name": "playerId",
  "status": 404,
  "title": "The requested resource was not found.",
  "type": "https://docs.api.video/docs/resourcenot_found"
}

No schema

name

string

status

int

title

string

type

string

Update a player

patch /players/{playerId}

Use a player ID to update specific details for a player. NOTE: It may take up to 10 min before the new player configuration is available from our CDN.

HTTP basic apiKey

playerId

string

required

The unique identifier for the player.

Example
"pl45d5vFFGrfdsdsd156dGhh"

backgroundBottom

string

RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)

backgroundText

string

RGBA color for title text. Default: rgba(255, 255, 255, 1)

backgroundTop

string

RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)

enableApi

boolean

enable/disable player SDK access. Default: true

enableControls

boolean

enable/disable player controls. Default: true

forceAutoplay

boolean

enable/disable player autoplay. Default: false

forceLoop

boolean

enable/disable looping. Default: false

hideTitle

boolean

enable/disable title. Default: false

link

string

RGBA color for all controls. Default: rgba(255, 255, 255, 1)

linkActive

string

RGBA color for the play button when hovered.

linkHover

string

RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)

name

string

Add a name for your player theme here.

Max Length
100

text

string

RGBA color for timer text. Default: rgba(255, 255, 255, 1)

trackBackground

string

RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)

trackPlayed

string

RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)

trackUnplayed

string

RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)

Request

{
  "backgroundBottom": "string",
  "backgroundText": "string",
  "backgroundTop": "string",
  "enableApi": true,
  "enableControls": true,
  "forceAutoplay": true,
  "forceLoop": true,
  "hideTitle": true,
  "link": "string",
  "linkActive": "string",
  "linkHover": "string",
  "name": "string",
  "text": "string",
  "trackBackground": "string",
  "trackPlayed": "string",
  "trackUnplayed": "string"
}
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/PlayerThemesApi.md#update

package main

import (
    "context"
    "fmt"
    "os"
    apivideosdk "github.com/apivideo/api.video-go-client"
)

func main() {
    client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
    // if you rather like to use the sandbox environment:
    // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
        
    playerId := "pl45d5vFFGrfdsdsd156dGhh" // string | The unique identifier for the player.
    playerThemeUpdatePayload := *apivideosdk.NewPlayerThemeUpdatePayload() // PlayerThemeUpdatePayload | 

    
    res, err := client.PlayerThemes.Update(playerId, playerThemeUpdatePayload)

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PlayerThemes.Update``: %v\
", err)
    }
    // response from `Update`: PlayerTheme
    fmt.Fprintf(os.Stdout, "Response from `PlayerThemes.Update`: %v\
", res)
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/PlayerThemesApi.md#update

const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

const playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player.
const playerThemeUpdatePayload = {
  text: "rgba(255, 255, 255, 1)", // RGBA color for timer text. Default: rgba(255, 255, 255, 1)
  link: "rgba(255, 255, 255, 1)", // RGBA color for all controls. Default: rgba(255, 255, 255, 1)
  linkHover: "rgba(255, 255, 255, 1)", // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)
  trackPlayed: "rgba(255, 255, 255, 1)", // RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)
  trackUnplayed: "rgba(255, 255, 255, 1)", // RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)
  trackBackground: "rgba(255, 255, 255, 1)", // RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)
  backgroundTop: "rgba(255, 255, 255, 1)", // RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)
  backgroundBottom: "rgba(255, 255, 255, 1)", // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)
  backgroundText: "rgba(255, 255, 255, 1)", // RGBA color for title text. Default: rgba(255, 255, 255, 1)
  enableApi: true, // enable/disable player SDK access. Default: true
  enableControls: true, // enable/disable player controls. Default: true
  forceAutoplay: true, // enable/disable player autoplay. Default: false
  hideTitle: true, // enable/disable title. Default: false
  forceLoop: true, // enable/disable looping. Default: false
}; 

const playerTheme = await client.playerThemes.update(playerId, playerThemeUpdatePayload); 
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/PlayerThemesApi.md#update

import apivideo
from apivideo.api import player_themes_api
from apivideo.model.not_found import NotFound
from apivideo.model.player_theme import PlayerTheme
from apivideo.model.player_theme_update_payload import PlayerThemeUpdatePayload
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = player_themes_api.PlayerThemesApi(api_client)
    player_id = "pl45d5vFFGrfdsdsd156dGhh" # str | The unique identifier for the player.
    player_theme_update_payload = PlayerThemeUpdatePayload(
        text="text_example",
        link="link_example",
        link_hover="link_hover_example",
        track_played="track_played_example",
        track_unplayed="track_unplayed_example",
        track_background="track_background_example",
        background_top="background_top_example",
        background_bottom="background_bottom_example",
        background_text="background_text_example",
        enable_api=True,
        enable_controls=True,
        force_autoplay=True,
        hide_title=True,
        force_loop=True,
    ) # PlayerThemeUpdatePayload | 

    # example passing only required values which don't have defaults set
    try:
        # Update a player
        api_response = api_instance.update(player_id, player_theme_update_payload)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling PlayerThemesApi->update: %s\
" % e)
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/PlayerThemesApi.md#update

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.PlayerThemesApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    PlayerThemesApi apiInstance = client.playerThemes();
    
    String playerId = "pl45d5vFFGrfdsdsd156dGhh"; // The unique identifier for the player.
    PlayerThemeUpdatePayload playerThemeUpdatePayload = new PlayerThemeUpdatePayload(); // 
    playerThemeUpdatePayload.setText(""null""); // RGBA color for timer text. Default: rgba(255, 255, 255, 1)
    playerThemeUpdatePayload.setLink(""null""); // RGBA color for all controls. Default: rgba(255, 255, 255, 1)
    playerThemeUpdatePayload.setLinkHover(""null""); // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)
    playerThemeUpdatePayload.setTrackPlayed(""null""); // RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)
    playerThemeUpdatePayload.setTrackUnplayed(""null""); // RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)
    playerThemeUpdatePayload.setTrackBackground(""null""); // RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)
    playerThemeUpdatePayload.setBackgroundTop(""null""); // RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)
    playerThemeUpdatePayload.setBackgroundBottom(""null""); // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)
    playerThemeUpdatePayload.setBackgroundText(""null""); // RGBA color for title text. Default: rgba(255, 255, 255, 1)
    playerThemeUpdatePayload.setEnableApi(); // enable/disable player SDK access. Default: true
    playerThemeUpdatePayload.setEnableControls(); // enable/disable player controls. Default: true
    playerThemeUpdatePayload.setForceAutoplay(); // enable/disable player autoplay. Default: false
    playerThemeUpdatePayload.setHideTitle(); // enable/disable title. Default: false
    playerThemeUpdatePayload.setForceLoop(); // enable/disable looping. Default: false


    try {
      PlayerTheme result = apiInstance.update(playerId, playerThemeUpdatePayload);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling PlayerThemesApi#update");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/PlayerThemesApi.md#update

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class updateExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var playerId = pl45d5vFFGrfdsdsd156dGhh;  // string | The unique identifier for the player.
            var playerThemeUpdatePayload = new PlayerThemeUpdatePayload(); // PlayerThemeUpdatePayload | 
            var apiPlayerThemesInstance = apiInstance.PlayerThemes();
            try
            {
                // Update a player
                PlayerTheme result = apiPlayerThemesInstance.update(playerId, playerThemeUpdatePayload);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PlayerThemesApi.update: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
<?php
// First install the api client: "composer require api-video/php-api-client"
// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/PlayerThemesApi.md#update

require __DIR__ . '/vendor/autoload.php';


$playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player.
$playerThemeUpdatePayload = (new \ApiVideo\Client\Model\PlayerThemeUpdatePayload())
    ->setText("rgba(255, 255, 255, 1)") // RGBA color for timer text. Default: rgba(255, 255, 255, 1))
    ->setLink("rgba(255, 255, 255, 1)") // RGBA color for all controls. Default: rgba(255, 255, 255, 1))
    ->setLinkHover("rgba(255, 255, 255, 1)") // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1))
    ->setTrackPlayed("rgba(255, 255, 255, 1)") // RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95))
    ->setTrackUnplayed("rgba(255, 255, 255, 1)") // RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35))
    ->setTrackBackground("rgba(255, 255, 255, 1)") // RGBA color playback bar: background. Default: rgba(255, 255, 255, .2))
    ->setBackgroundTop("rgba(255, 255, 255, 1)") // RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7))
    ->setBackgroundBottom("rgba(255, 255, 255, 1)") // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7))
    ->setBackgroundText("rgba(255, 255, 255, 1)") // RGBA color for title text. Default: rgba(255, 255, 255, 1))
    ->setEnableApi(true) // enable/disable player SDK access. Default: true)
    ->setEnableControls(true) // enable/disable player controls. Default: true)
    ->setForceAutoplay(true) // enable/disable player autoplay. Default: false)
    ->setHideTitle(true) // enable/disable title. Default: false)
    ->setForceLoop(true); // enable/disable looping. Default: false)


$playerTheme = $client->playerThemes()->update($playerId, $playerThemeUpdatePayload); 
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/PlayerThemesAPI.md#update

Response

Examples Schema

Success

{
  "backgroundBottom": "rgba(94, 95, 89, 1)",
  "backgroundText": "rgba(255, 255, 255, .95)",
  "backgroundTop": "rgba(72, 4, 45, 1)",
  "createdAt": "2020-01-13T10:09:17+00:00",
  "enableApi": false,
  "enableControls": false,
  "forceAutoplay": false,
  "forceLoop": false,
  "hideTitle": false,
  "link": "rgba(255, 0, 0, .95)",
  "linkActive": "rgba(255, 0, 0, .75)",
  "linkHover": "rgba(255, 255, 255, .75)",
  "playerId": "pl45d5vFFGrfdsdsd156dGhh",
  "text": "rgba(255, 255, 255, .95)",
  "trackBackground": "rgba(0, 0, 0, 0)",
  "trackPlayed": "rgba(255, 255, 255, .95)",
  "trackUnplayed": "rgba(255, 255, 255, .1)",
  "updatedAt": "2020-01-13T11:12:14+00:00"
}

Not Found

{
  "name": "playerId",
  "status": 404,
  "title": "The requested resource was not found.",
  "type": "https://docs.api.video/docs/resourcenot_found"
}

assets

object (assets)

link

string

The path to the file containing your logo.

Example
"path/to/my/logo/mylogo.jpg"

logo

string

The name of the file containing the logo you want to use.

Example
"mylogo.jpg"

backgroundBottom

string

RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)

backgroundText

string

RGBA color for title text. Default: rgba(255, 255, 255, 1)

backgroundTop

string

RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)

createdAt

string

date-time

When the player was created, presented in ISO-8601 format.

Example
"2020-01-31T10:17:47+00:00"

enableApi

boolean

enable/disable player SDK access. Default: true

enableControls

boolean

enable/disable player controls. Default: true

forceAutoplay

boolean

enable/disable player autoplay. Default: false

forceLoop

boolean

enable/disable looping. Default: false

hideTitle

boolean

enable/disable title. Default: false

link

string

RGBA color for all controls. Default: rgba(255, 255, 255, 1)

linkActive

string

RGBA color for the play button when hovered.

linkHover

string

RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)

name

string

The name of the player theme

playerId

string

required

Example
"pl45KFKdlddgk654dspkze"

text

string

RGBA color for timer text. Default: rgba(255, 255, 255, 1)

trackBackground

string

RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)

trackPlayed

string

RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)

trackUnplayed

string

RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)

updatedAt

string

date-time

When the player was last updated, presented in ISO-8601 format.

Example
"2020-01-31T10:18:47+00:00"

name

string

status

int

title

string

type

string

Was this page helpful?