Retrieve Player

This endpoint retrieves a single Player.

    http://<publish-url>/public/api/players/{playerId}
  
Table 1. Parameters
Parameter Parameter Type Data Type Mandatory Description
playerId path long Yes The ID of the player to be retrieved.
token query string Yes The account token of which the player belongs.

An example of a response for this call is shown below:

{
  "assetId": 0,
  "config": {
    "id": 0,
    "playerDefinition": {
      "array": true,
      "bigDecimal": true,
      "bigInteger": true,
      "binary": true,
      "boolean": true,
      "containerNode": true,
      "double": true,
      "float": true,
      "floatingPointNumber": true,
      "int": true,
      "integralNumber": true,
      "long": true,
      "missingNode": true,
      "nodeType": "ARRAY",
      "null": true,
      "number": true,
      "object": true,
      "pojo": true,
      "short": true,
      "textual": true,
      "valueNode": true
    },
    "playerInstance": {
      "array": true,
      "bigDecimal": true,
      "bigInteger": true,
      "binary": true,
      "boolean": true,
      "containerNode": true,
      "double": true,
      "float": true,
      "floatingPointNumber": true,
      "int": true,
      "integralNumber": true,
      "long": true,
      "missingNode": true,
      "nodeType": "ARRAY",
      "null": true,
      "number": true,
      "object": true,
      "pojo": true,
      "short": true,
      "textual": true,
      "valueNode": true
    },
    "playerOption": {
      "array": true,
      "bigDecimal": true,
      "bigInteger": true,
      "binary": true,
      "boolean": true,
      "containerNode": true,
      "double": true,
      "float": true,
      "floatingPointNumber": true,
      "int": true,
      "integralNumber": true,
      "long": true,
      "missingNode": true,
      "nodeType": "ARRAY",
      "null": true,
      "number": true,
      "object": true,
      "pojo": true,
      "short": true,
      "textual": true,
      "valueNode": true
    }
  },
  "embedCode": "string",
  "href": {
    "authority": "string",
    "content": {},
    "defaultPort": 0,
    "file": "string",
    "host": "string",
    "path": "string",
    "port": 0,
    "protocol": "string",
    "query": "string",
    "ref": "string",
    "userInfo": "string"
  },
  "id": 0,
  "sources": [
    {
      "assetId": 0,
      "id": 0,
      "media": {
        "authority": "string",
        "content": {},
        "defaultPort": 0,
        "file": "string",
        "host": "string",
        "path": "string",
        "port": 0,
        "protocol": "string",
        "query": "string",
        "ref": "string",
        "userInfo": "string"
      },
      "mimeType": "string"
    }
  ],
  "templateId": 0
}
                  
        

An example of an API call and the response:

http://10.13.1.85:18106/public/api/players/13640?token=w8qZG3GJSR&
{
  "embedCode": "<script type=\"text/javascript\" src=\"http://publishcdn.local.nativ.tv:19180/dev/flex-player/scripts/flexplayer-embed.js\"></script><div><img onLoad='embedMioPlayer(this, {src: \"http://localhost:18106//public/api/players/13640/embed?token=w8qZG3GJSR\",width: \"640\",height: \"391\"            });' src=\"http://publishcdn.local.nativ.tv:19180/dev/flex-player/images/pixel.png\"/></div>",
  "sources": [
    {
      "id": 1616,
      "assetId": 13637
    }
  ],
  "href": "http://localhost:18106//public/api/players/13640",
  "assetId": 13637,
  "id": 13640,
  "config": {
    "id": 13434,
    "playerDefinition": [
      {
        "id": 104840,
        "name": "autoplay",
        "displayName": "Auto Play",
        "description": "Should the player start playing by itself?",
        "type": "boolean",
        "searchable": false,
        "editable": true,
        "required": false,
        "formType": "select",
        "format": null,
        "formatDescription": null,
        "validation": null,
        "maxLength": -1,
        "expressionEnabled": false,
        "validationDescription": null,
        "validationHandler": null,
        "valueGeneratorType": null,
        "unitString": null,
        "commentable": false,
        "isVisible": true,
        "permissions": [],
        "commentPermissions": [],
        "preProcessors": [],
        "options": [
          {
            "id": 104841,
            "name": "Yes",
            "displayName": "Yes",
            "default": false,
            "value": "true"
          },
          {
            "id": 104842,
            "name": "No",
            "displayName": "No",
            "default": true,
            "value": "false"
          }
        ]
      },
      {
        "id": 104843,
        "name": "loop",
        "displayName": "Loop",
        "description": "Should playback continue in a loop?",
        "type": "boolean",
        "searchable": false,
        "editable": true,
        "required": false,
        "formType": "select",
        "format": null,
        "formatDescription": null,
        "validation": null,
        "maxLength": -1,
        "expressionEnabled": false,
        "validationDescription": null,
        "validationHandler": null,
        "valueGeneratorType": null,
        "unitString": null,
        "commentable": false,
        "isVisible": true,
        "permissions": [],
        "commentPermissions": [],
        "preProcessors": [],
        "options": [
          {
            "id": 104844,
            "name": "Yes",
            "displayName": "Yes",
            "default": false,
            "value": "true"
          },
          {
            "id": 104845,
            "name": "No",
            "displayName": "No",
            "default": true,
            "value": "false"
          }
        ]
      },
      {
        "id": 104846,
        "name": "controls",
        "displayName": "Controls",
        "description": "Should user controls be enabled?",
        "type": "boolean",
        "searchable": false,
        "editable": true,
        "required": false,
        "formType": "select",
        "format": null,
        "formatDescription": null,
        "validation": null,
        "maxLength": -1,
        "expressionEnabled": false,
        "validationDescription": null,
        "validationHandler": null,
        "valueGeneratorType": null,
        "unitString": null,
        "commentable": false,
        "isVisible": true,
        "permissions": [],
        "commentPermissions": [],
        "preProcessors": [],
        "options": [
          {
            "id": 104847,
            "name": "Yes",
            "displayName": "Yes",
            "default": true,
            "value": "true"
          },
          {
            "id": 104848,
            "name": "No",
            "displayName": "No",
            "default": false,
            "value": "false"
          }
        ]
      },
      {
        "id": 104849,
        "name": "timeEnabled",
        "displayName": "Display Time",
        "description": "Should current time and duration be displayed?",
        "type": "boolean",
        "searchable": false,
        "editable": true,
        "required": false,
        "formType": "select",
        "format": null,
        "formatDescription": null,
        "validation": null,
        "maxLength": -1,
        "expressionEnabled": false,
        "validationDescription": null,
        "validationHandler": null,
        "valueGeneratorType": null,
        "unitString": null,
        "commentable": false,
        "isVisible": true,
        "permissions": [],
        "commentPermissions": [],
        "preProcessors": [],
        "options": [
          {
            "id": 104850,
            "name": "Yes",
            "displayName": "Yes",
            "default": true,
            "value": "true"
          },
          {
            "id": 104851,
            "name": "No",
            "displayName": "No",
            "default": false,
            "value": "false"
          }
        ]
      },
      {
        "id": 104852,
        "name": "poster",
        "displayName": "Poster Image",
        "description": "Should an initial poster image be displayed?",
        "type": "boolean",
        "searchable": false,
        "editable": true,
        "required": false,
        "formType": "select",
        "format": null,
        "formatDescription": null,
        "validation": null,
        "maxLength": -1,
        "expressionEnabled": false,
        "validationDescription": null,
        "validationHandler": null,
        "valueGeneratorType": null,
        "unitString": null,
        "commentable": false,
        "isVisible": true,
        "permissions": [],
        "commentPermissions": [],
        "preProcessors": [],
        "options": [
          {
            "id": 104853,
            "name": "Yes",
            "displayName": "Yes",
            "default": true,
            "value": "true"
          },
          {
            "id": 104854,
            "name": "No",
            "displayName": "No",
            "default": false,
            "value": "false"
          }
        ]
      },
      {
        "id": 104855,
        "name": "posterPlayButtonEnabled",
        "displayName": "Central Play Button",
        "description": "Should an initial large central play button be displayed?",
        "type": "boolean",
        "searchable": false,
        "editable": true,
        "required": false,
        "formType": "select",
        "format": null,
        "formatDescription": null,
        "validation": null,
        "maxLength": -1,
        "expressionEnabled": false,
        "validationDescription": null,
        "validationHandler": null,
        "valueGeneratorType": null,
        "unitString": null,
        "commentable": false,
        "isVisible": true,
        "permissions": [],
        "commentPermissions": [],
        "preProcessors": [],
        "options": [
          {
            "id": 104856,
            "name": "Yes",
            "displayName": "Yes",
            "default": true,
            "value": "true"
          },
          {
            "id": 104857,
            "name": "No",
            "displayName": "No",
            "default": false,
            "value": "false"
          }
        ]
      },
      {
        "id": 104858,
        "name": "fullscreenEnabled",
        "displayName": "Allow Fullscreen",
        "description": "Should a button for fullscreen be provided?",
        "type": "boolean",
        "searchable": false,
        "editable": true,
        "required": false,
        "formType": "select",
        "format": null,
        "formatDescription": null,
        "validation": null,
        "maxLength": -1,
        "expressionEnabled": false,
        "validationDescription": null,
        "validationHandler": null,
        "valueGeneratorType": null,
        "unitString": null,
        "commentable": false,
        "isVisible": true,
        "permissions": [],
        "commentPermissions": [],
        "preProcessors": [],
        "options": [
          {
            "id": 104859,
            "name": "Yes",
            "displayName": "Yes",
            "default": true,
            "value": "true"
          },
          {
            "id": 104860,
            "name": "No",
            "displayName": "No",
            "default": false,
            "value": "false"
          }
        ]
      },
      {
        "id": 104861,
        "name": "backgroundColor",
        "displayName": "Background Colour",
        "description": "\n                            Background colour of player footprint - either a hex code e.g. '#000000' or 'transparent'",
        "type": "string",
        "searchable": false,
        "editable": true,
        "required": false,
        "formType": "text",
        "format": null,
        "formatDescription": null,
        "validation": null,
        "maxLength": -1,
        "expressionEnabled": false,
        "validationDescription": null,
        "validationHandler": null,
        "valueGeneratorType": null,
        "unitString": null,
        "commentable": false,
        "isVisible": true,
        "permissions": [],
        "commentPermissions": [],
        "preProcessors": [],
        "defaultValue": "transparent"
      },
      {
        "id": 104925,
        "name": "preload",
        "displayName": "Pre-Load",
        "description": "Should the Video be pre-loaded?",
        "type": "boolean",
        "multiplicity": "0..1",
        "searchable": false,
        "editable": true,
        "required": false,
        "formType": "select",
        "format": null,
        "formatDescription": null,
        "validation": null,
        "maxLength": -1,
        "expressionEnabled": false,
        "validationDescription": null,
        "validationHandler": null,
        "valueGeneratorType": null,
        "unitString": null,
        "commentable": false,
        "isVisible": true,
        "permissions": [],
        "commentPermissions": [],
        "preProcessors": [],
        "options": [
          {
            "id": 104926,
            "name": "Yes",
            "displayName": "Yes",
            "default": false,
            "value": "true"
          },
          {
            "id": 104927,
            "name": "No",
            "displayName": "No",
            "default": true,
            "value": "false"
          }
        ]
      },
      {
        "id": 104928,
        "name": "pcode",
        "displayName": "pCode",
        "description": "The pcode is your account identifier.",
        "type": "string",
        "multiplicity": "0..1",
        "searchable": false,
        "editable": true,
        "required": false,
        "formType": "text",
        "format": null,
        "formatDescription": null,
        "validation": null,
        "maxLength": -1,
        "expressionEnabled": false,
        "validationDescription": null,
        "validationHandler": null,
        "valueGeneratorType": null,
        "unitString": null,
        "commentable": false,
        "isVisible": true,
        "permissions": [],
        "commentPermissions": [],
        "preProcessors": []
      },
      {
        "id": 104929,
        "name": "playerBrandingId",
        "displayName": "Player Branding ID",
        "description": "The player branding ID is a reference to your player.",
        "type": "string",
        "multiplicity": "0..1",
        "searchable": false,
        "editable": true,
        "required": false,
        "formType": "text",
        "format": null,
        "formatDescription": null,
        "validation": null,
        "maxLength": -1,
        "expressionEnabled": false,
        "validationDescription": null,
        "validationHandler": null,
        "valueGeneratorType": null,
        "unitString": null,
        "commentable": false,
        "isVisible": true,
        "permissions": [],
        "commentPermissions": [],
        "preProcessors": []
      },
      {
        "id": 104930,
        "name": "encodingPriority",
        "displayName": "Encoding Priority",
        "description": "Should the player start playing by itself?",
        "type": "string",
        "multiplicity": "0..1",
        "searchable": false,
        "editable": true,
        "required": false,
        "formType": "text",
        "format": null,
        "formatDescription": null,
        "validation": null,
        "maxLength": -1,
        "expressionEnabled": false,
        "validationDescription": null,
        "validationHandler": null,
        "valueGeneratorType": null,
        "unitString": null,
        "commentable": false,
        "isVisible": true,
        "permissions": [],
        "commentPermissions": [],
        "preProcessors": []
      },
      {
        "id": 104931,
        "name": "initialTime",
        "displayName": "Initial Time",
        "description": "Initial to video be played.",
        "type": "string",
        "multiplicity": "0..1",
        "searchable": false,
        "editable": true,
        "required": false,
        "formType": "text",
        "format": null,
        "formatDescription": null,
        "validation": null,
        "maxLength": -1,
        "expressionEnabled": false,
        "validationDescription": null,
        "validationHandler": null,
        "valueGeneratorType": null,
        "unitString": null,
        "commentable": false,
        "isVisible": true,
        "permissions": [],
        "commentPermissions": [],
        "preProcessors": [],
        "defaultValue": "0"
      },
      {
        "id": 104932,
        "name": "initialVolume",
        "displayName": "Initial Volume",
        "description": "Initial Video volume",
        "type": "string",
        "multiplicity": "0..1",
        "searchable": false,
        "editable": true,
        "required": false,
        "formType": "text",
        "format": null,
        "formatDescription": null,
        "validation": null,
        "maxLength": -1,
        "expressionEnabled": false,
        "validationDescription": null,
        "validationHandler": null,
        "valueGeneratorType": null,
        "unitString": null,
        "commentable": false,
        "isVisible": true,
        "permissions": [],
        "commentPermissions": [],
        "preProcessors": [],
        "defaultValue": "0.5"
      },
      {
        "id": 104933,
        "name": "initialBitrate",
        "displayName": "Initial bitrate",
        "description": "Initial minimum bitrate level for a specific period of time",
        "type": "complex",
        "multiplicity": "0..1",
        "searchable": false,
        "editable": true,
        "required": false,
        "formType": null,
        "format": null,
        "formatDescription": null,
        "validation": null,
        "maxLength": -1,
        "expressionEnabled": false,
        "validationDescription": null,
        "validationHandler": null,
        "valueGeneratorType": null,
        "unitString": null,
        "commentable": false,
        "isVisible": true,
        "permissions": [],
        "commentPermissions": [],
        "preProcessors": [],
        "children": [
          {
            "id": 104934,
            "name": "level",
            "displayName": "Bitrate Level",
            "description": "Initial bitrate level",
            "type": "float",
            "searchable": false,
            "editable": true,
            "required": true,
            "formType": "text",
            "format": "#,##0.###",
            "formatDescription": "#,##0.###",
            "validation": null,
            "maxLength": -1,
            "expressionEnabled": false,
            "validationDescription": null,
            "validationHandler": null,
            "valueGeneratorType": null,
            "unitString": null,
            "commentable": false,
            "isVisible": true,
            "permissions": [],
            "commentPermissions": [],
            "preProcessors": [],
            "defaultValue": 1
          },
          {
            "id": 104935,
            "name": "duration",
            "displayName": "Duration",
            "description": "Duration in seconds to sustain the bitrate level",
            "type": "integer",
            "searchable": false,
            "editable": true,
            "required": true,
            "formType": "text",
            "format": "#",
            "formatDescription": "#",
            "validation": null,
            "maxLength": -1,
            "expressionEnabled": false,
            "validationDescription": null,
            "validationHandler": null,
            "valueGeneratorType": null,
            "unitString": null,
            "commentable": false,
            "isVisible": true,
            "permissions": [],
            "commentPermissions": [],
            "preProcessors": [],
            "defaultValue": 1
          }
        ]
      }
    ],
    "playerInstance": {
      "autoplay": false,
      "loop": false,
      "controls": true,
      "timeEnabled": true,
      "poster": true,
      "posterPlayButtonEnabled": true,
      "fullscreenEnabled": true,
      "backgroundColor": "transparent"
    },
    "playerOption": null
  },
  "templateId": 1477642711434
}

This endpoint returns the rendered Player code to be displayed in an iframe on the host web page

 
    http://<publish-url>/public/api/players/{playerId}/embed
  

Was this article helpful?