Table of Contents

Application Programming Interface (API)

Benjamin Norton Updated by Benjamin Norton

Video Player Public API

Summary

The following public API’s/routes are available for use by other users and services, without authentication. 

API List

Purpose

HTTP Method(s)

Route

Response (Success/Fail)

Video Player IFRAME

GET, OPTIONS

/public/player/iframe/{id}

HTML/HTML

Video Player Embed JavaScript

GET, OPTIONS

/public/player/embed/{id}

JavaScript/HTML

Video Player Thumbnails

GET, OPTIONS

/public/player/thumbnails/{id}

JSON/JSON

URL Construction

The root address is: 

https://player.pitchhub.com/en

 

An example, using the thumbnail API is, in generalized form: 

https://player.pitchhub.com/en/public/player/thumbnails/{id}

 

An example, using the thumbnail API with a specific ID: 

https://player.pitchhub.com/en/public/player/thumbnails/2da754b668b50840e5d76f3a37f488a2

API details

Video Player IFRAME

Video player designed to be used inside of an IFRAME, so there are no context controls.

Request

Relative Route

/public/player/iframe/{id} 

Route Parameters

ID

Required

Description

id

Yes

Video Menu token or Video token, also referred to as "id" in the PitchHub Video Export screen.

Response

Response

Valid (200)

Example:

<!DOCTYPE html>

<html lang="en">

<body>

    <div id="menu"></div>

    <script src="https://player-dev.pitchhub.com/en/public/player/embed/8ee2afe9a240a968191d0ca0b37a4f02"></script>

</body>

</html>

Not Found (404)

Example:

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

</head>

<body>

</body>

</html>

Video Player Embedded

Video player designed to be imported in a <script> tag, as JavaScript code.

Request

Relative Route

/public/player/embed/{id}

Route Parameters

ID

Required

Description

id

Yes

Video Menu token or Video token, also referred to as "id" in the PitchHub Video Export screen.

Response

Valid (200)

Example:

var defaultScriptElement = document.currentScript;

var constants = {

Asset_Type_Javascript: 'js',

Asset_type_CSS: 'css',

Not Found (404)

Example:

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

</head> 

<body>

</body> 

</html>

Video Player Thumbnails

Return a JSON object with an array of available thumbnails.

The number of thumbnails in the array will vary depending upon the full size dimensions.  The pixel width and height of each thumbnail is listed, along with the full URL to the thumbnail. 

In the future:

  • Thumbnails can originate from other services (AWS S3/CloudFront, Mux.com, etc.)
  • Thumbnails might have signed URL’s that represent an extremely long amount of time. 

Request

Relative Route

/public/player/thumbnails/{id}

Route Parameters

ID

Required

Description

id

Yes

Video Menu token or Video token, also referred to as "id" in the PitchHub Video Export screen.

Response

Valid (200)

Example:

https://player.pitchhub.com/en/public/player/thumbnails/2da754b668b50840e5d76f3a37f488a2

Result

[

    {

        "width": 100,

        "height": 75,

        "url": "https://i.vimeocdn.com/video/866866446_100x75.jpg?r=pad"

    },

    {

        "width": 200,

        "height": 150,

        "url": "https://i.vimeocdn.com/video/866866446_200x150.jpg?r=pad"

    },

    {

        "width": 295,

        "height": 166,

        "url": "https://i.vimeocdn.com/video/866866446_295x166.jpg?r=pad"

    },

    {

        "width": 640,

        "height": 360,

        "url": "https://i.vimeocdn.com/video/866866446_640x360.jpg?r=pad"

    },

    {

        "width": 940,

        "height": 540,

        "url": "https://i.vimeocdn.com/video/866866446_940x540.jpg?r=pad"

    },

    {

        "width": 1280,

        "height": 720,

        "url": "https://i.vimeocdn.com/video/866866446_1280x720.jpg?r=pad"

    },

    {

        "width": 1920,

        "height": 1080,

        "url": "https://i.vimeocdn.com/video/866866446_1920x1080.jpg?r=pad"

    }

]

Not Found (404)

Example:

{

"error_code": "general.record_not_found",

"error": "Record not found"

}

 

 

How did we do?

Embedding a YouTube Playlist into your Website

Adding a PitchHub Video or "Video Menu" to a web site

Contact