Player Management API Sample: Create a Player

Product(s)
Video Cloud
Role(s)
API Developer
Task(s)
Create & Configure Players
Topic(s)
Code Samples
API(s)
Player Management API

In this example, you enter your account username, ID and password. As well, you enter a URL to media and the media type. On click of the button, a player will be created and selected information about the player displayed.

Disclaimer

App architecture

The high-level application logic for this app is as follows:

  1. Gather user data necessary to create a player
  2. Build the JSON data structure to pass to the API for player creation
  3. On button click, perform AJAX call to create player
  4. On AJAX call success perform the following:
    • Inject JSON response data into HTML page
    • Call function to publish player
  5. Perform AJAX call to publish player
  6. On AJAX call success perform the following:
    • Inject JSON response data into HTML
    • Dynamically build HTML that displays selected player information and inject that into HTML page

Player info input

Username:

Account ID:

Password:

Player Name:

Media URL:

Media Type:

Create Player

JSON response

Below is the JSON data returned by the player creation:


 

Below is the JSON data returned by the player publish:


 

Processed response

Below is simple HTML output of some of the player information: