Branding API

The Branding API can be used to create, read, update and delete branding templates used when delivering videos to your end-users.

MetaCDN allows you to customise nearly every aspect of video delivery, allowing you to change the look and feel of the video player to integrate it seamlessly into your own website.

Create Branding template

HTTP Operation: POST
URL: POST https://secure.metacdn.com/api/users/{username}/branding
Auth: HTTP digest authentication (User)
"Content-Type" header: application/json
Expected HTTP response: HTTP/1.1 201 Created
Expected Format (mandatory, optional):
{
    "templateName": "Name o template",
    "description": "I am a template",
    "useHttpStreaming": true/false,
    "allowBitrateSelect": true/false,
    "useChromecast": true/false,
    "useThreeSixty": true/false,
    "clip": {
        "autoPlay": true/false,
        "autoBuffering": true/false,
        "scaling": "fit/half/orig/scale"
    },
    "contextMenu": [{
        "name": "ACMI Media Player 1.0.0"
    },{
        "name": "Go to Example.com",
        "location": "http:/www.example.com"
    }],
    "logo": {
        "url": "http://www.example.com/img/logo/logo.png",
        "fullscreenOnly": false/true,
        "displayTime": 5,
        "position": "TOP_LEFT/TOP_RIGHT/BOTTOM_LEFT/BOTTOM_RIGHT",
        "opacity": 0.5,
        "linkUrl": "http://www.example.com"
    },
    "canvas": {
        "backgroundColor": "33,33,33,1",
        "backgroundGradient": "none/low/medium/high"
    },
    "sharing": {
        "facebook": false/true,
        "twitter": false/true,
        "email": false/true,
        "embed": false/true,
        "buttons": {
            "color": "32,43,45,1",
            "overColor": "121,185,67,1"
        }
    },
    "controls": {
        "backgroundColor": "18,18,18,1",
        "backgroundGradient": "none/low/medium/high",
        "buttonColor": "229,230,232,1",
        "buttonOverColor": "121,185,67,1",
        "bufferGradient": "none/low/medium/high",
        "bufferColor": "0,145,170,1",
        "progressColor": "230,51,30,1",
        "progressGradient": "none/low/medium/high",
        "sliderColor": "121,185,67,1",
        "sliderGradient": "none/low/medium/high",
        "tooltipTextColor": "255,255,255,1",
        "tooltipColor": "121,185,67,1",
        "timeColor": "255,255,255,1",
        "timeBgColor": "18,18,18,1",
        "durationColor": "230,51,30,1"
    },
    "play": {
        "url": "http://www.example.com/assets/play.png",
        "width": 135,
        "height": 38,
        "opacity": 0.5
    }
}
Notes:
Example Call #1:
POST /api/users/mcdnuser/branding HTTP/1.1
Content-Type: application/json {
    "templateName": "APITemplate",
    "description": "A Fine Template, Suitable For Testing",
    "useHttpStreaming": false,
    "useChromecast": false,
    "useThreeSixty": false,
    "allowBitrateSelect": false,
    "clip": {
        "autoPlay": true,
        "autoBuffering": true,
        "scaling": "scale"
    },
    "contextMenu": [{
        "name": "MetaCDN Media Player 1.0.0"
    },{
        "name": "Go to MetaCDN.com",
        "location": "www.metacdn.com"
    }],
    "logo": {
        "url": "http://www.metacdn.com/img/logo/logo_bk.png",
        "fullscreenOnly": false,
        "displayTime": 5,
        "position": "TOP_LEFT",
        "opacity": 0.5,
        "linkUrl": "http://www.metacdn.com"
    },
    "canvas": {
        "backgroundColor": "33,33,33,1",
        "backgroundGradient": "medium"
    },
    "sharing": {
        "facebook": true,
        "twitter": true,
        "email": true,
        "embed": true,
        "buttons": {
            "color": "32,43,45,1",
            "overColor": "121,185,67,1"
        }
    },
    "controls": {
        "backgroundColor": "18,18,18,1",
        "backgroundGradient": "low",
        "buttonColor": "229,230,232,1",
        "buttonOverColor": "121,185,67,1",
        "bufferGradient": "none",
        "bufferColor": "0,145,170,1",
        "progressColor": "230,51,30,1",
        "progressGradient": "high",
        "sliderColor": "121,185,67,1",
        "sliderGradient": "medium",
        "tooltipTextColor": "255,255,255,1",
        "tooltipColor": "121,185,67,1",
        "timeColor": "255,255,255,1",
        "timeBgColor": "18,18,18,1",
        "durationColor": "230,51,30,1"
    },
    "play": {
        "url": "http://www.metacdn.com/img/icon/play.png",
        "width": 135,
        "height": 38,
        "opacity": 0.5
    }
}
Expected Response #1:
HTTP/1.1 201 Created
Content-Type: text/plain; charset=UTF-8
Date: Wed, 13 Oct 2010 03:03:05 GMT
Accept-Ranges: bytes
Server: Restlet-Framework/2.0.0
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
Content-Length: 22
Connection: close
Media branding created

Get Branding template

HTTP Operation: GET
URL: GET https://secure.metacdn.com/api/users/{username}/branding/{templateName}
Auth: HTTP digest authentication (User)
"Accept" header: application/json
Expected HTTP response: HTTP/1.1 200 OK
Expected Format (mandatory, optional):
GET /api/users/{username}/branding/{templateName} HTTP/1.1
Accept: application/json
Example Call #1:
GET /api/users/mcdnuser/branding/APITemplate HTTP/1.1
Accept: application/json
Expected Response #1:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Date: Fri, 21 May 2010 02:15:03 GMT
Accept-Ranges: bytes
Server: Restlet-Framework/2.8
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
Content-Length: 2239
Connection: close {
    "canvas": {
        "backgroundColor": "33,33,33,1",
        "backgroundGradient": "medium"
    },
    "clip": {
        "autoBuffering": "true",
        "autoPlay": "true",
        "scaling": "scale"
    },
    "contextMenu": [{
        "location": "",
        "name": "MetaCDN Media Player 1.0.0"
    }, {
        "location": "www.metacdn.com",
        "name": "Go to MetaCDN.com"
    }],
    "useHttpStreaming":false,
    "useChromecast":false,
    "useThreeSixty":false,
    "allowBitrateSelect":false,
    "controls": {
        "backgroundColor": "18,18,18,1",
        "backgroundGradient": "low",
        "bufferColor": "0,145,170,1",
        "bufferGradient": "none",
        "buttonColor": "229,230,232,1",
        "buttonOverColor": "121,185,67,1",
        "durationColor": "230,51,30,1",
        "progressColor": "230,51,30,1",
        "progressGradient": "high",
        "sliderColor": "121,185,67,1",
        "sliderGradient": "medium",
        "timeBgColor": "18,18,18,1",
        "timeColor": "255,255,255,1",
        "tooltipColor": "121,185,67,1",
        "tooltipTextColor": "255,255,255,1"
    },
    "description": "A Fine Template, Suitable For Testing",
    "logo": {
        "Url": "http://www.metacdn.com/img/logo/logo_bk.png",
        "displayTime": 5,
        "fullscreenOnly": "false",
        "linkUrl": "http://www.metacdn.com",
        "opacity": 0.5,
        "position": "TOP_LEFT"
    },
    "play": {
        "height": 38,
        "opacity": 0.5,
        "url": "http://www.metacdn.com/img/icon/play.png",
        "width": 135
    },
    "sharing": {
        "buttons": {
            "color": "32,43,45,1",
            "overColor": "121,185,67,1"
        },
        "email": true,
        "embed": true,
        "facebook": true,
        "twitter": true
    },
    "templateName": "APITemplate"
}
Example Call #2:
GET /api/users/mcdnuser/branding HTTP/1.1
Accept: application/json
Expected Response #2:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Date: Tue, 04 Jan 2011 03:25:36 GMT
Accept-Ranges: bytes
Server: Restlet-Framework/2.0.4
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
Content-Length: 97
Connection: close [{
    "description": "A Fine Template, Suitable For Testing",
    "templateName": "APITemplate"
}]
HTTP Operation:GET
URL: GET https://secure.metacdn.com/api/users/{username}/branding/{templateName}
Auth: HTTP digest authentication (User)
"Accept" header: text/plain, text/html
Expected HTTP response: HTTP/1.1 200 OK
Expected Format (mandatory, optional):
GET /api/users/{username}/branding/{templateName} HTTP /1.1 Accept: text/plain, text/html

Example Call #1:
GET /api/users/mcdnuser/branding/APITemplate HTTP /1.1 Accept: text/plain, text/html
Expected Response #1:
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Accept-Ranges: bytes
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
Date: Wed, 05 May 2010 01:35:17 GMT
Server: Google Frontend
Cache-Control: private, x-gzip-ok=""
Transfer-Encoding: chunked
<html>
<head>
<title>APITemplate</title>
.
.
.
</html>
Notes:

Update Branding template

HTTP Operation:PUT
URL: PUT https://secure.metacdn.com/api/users/{username}/branding/{templateName}
Auth: HTTP digest authentication (User)
"Content-Type" header: application/json
Expected HTTP response: HTTP/1.1 202 Accepted
Expected Format (mandatory, optional):
PUT /api/users/{username}/branding/{templateName} HTTP/1.1
Content-Type: application/json {
    "description": "I am an updated template",
    "useHttpStreaming": true,
    "useChomecast": false,
    "useThreeSixty": false,
    "allowBitrateSelect": true,
    "clip": {
        "autoPlay": true/false,
        "autoBuffering": true/false,
        "scaling": "fit/half/orig/scale"
    },
    "contextMenu": [{
        "name": "ACMI Media Player 1.0.0"
    },{
        "name": "Go to Example.com",
        "location": "http:/www.example.com"
    }],
    "logo": {
        "url": "http://www.example.com/img/logo/logo.png",
        "fullscreenOnly": false/true,
        "displayTime": 5,
        "position": "TOP_LEFT/TOP_RIGHT/BOTTOM_LEFT/BOTTOM_RIGHT",
        "opacity": 0.5,
        "linkUrl": "http://www.example.com"
    },
    "canvas": {
        "backgroundColor": "33,33,33,1",
        "backgroundGradient": "none/low/medium/high"
    },
    "sharing": {
        "facebook": false/true,
        "twitter": false/true,
        "email": false/true,
        "embed": false/true,
        "buttons": {
            "color": "32,43,45,1",
            "overColor": "121,185,67,1"
        }
    },
    "controls": {
        "backgroundColor": "18,18,18,1",
        "backgroundGradient": "none/low/medium/high",
        "buttonColor": "229,230,232,1",
        "buttonOverColor": "121,185,67,1",
        "bufferGradient": "none/low/medium/high",
        "bufferColor": "0,145,170,1",
        "progressColor": "230,51,30,1",
        "progressGradient": "none/low/medium/high",
        "sliderColor": "121,185,67,1",
        "sliderGradient": "none/low/medium/high",
        "tooltipTextColor": "255,255,255,1",
        "tooltipColor": "121,185,67,1",
        "timeColor": "255,255,255,1",
        "timeBgColor": "18,18,18,1",
        "durationColor": "230,51,30,1"
    },
    "play": {
        "url": "http://www.example.com/icon/play.png",
        "width": 135,
        "height": 38,
        "opacity": 0.5
    }
}
Example Call #1:
PUT /api/users/demo/branding/MetaCDN HTTP/1.1
Content-Type: application/json {
    "useHttpStreaming": true,
    "useChromecast": false,
    "useThreeSixty": false,
    "allowBitrateSelect": true,
    "description": "An updated description",
    "clip": {
        "autoPlay": false,
        "autoBuffering": false,
        "scaling": "orig"
    },
    "contextMenu": [{
        "name": "MetaCDN Media Player 1.0.0"
    },{
        "name": "Go to MetaCDN.com",
        "location": "www.metacdn.com"
    }],
    "logo": {
        "url": "http://www.metacdn.com/img/logo/logo_bk.png",
        "fullscreenOnly": false,
        "displayTime": 5,
        "position": "TOP_LEFT",
        "opacity": 0.5,
        "linkUrl": "http://www.metacdn.com"
    },
    "canvas": {
        "backgroundColor": "33,33,33,1",
        "backgroundGradient": "medium"
    },
    "sharing": {
        "facebook": true,
        "twitter": true,
        "email": true,
        "embed": true,
        "buttons": {
            "color": "32,43,45,1",
            "overColor": "121,185,67,1"
        }
    },
    "controls": {
        "backgroundColor": "18,18,18,1",
        "backgroundGradient": "low",
        "buttonColor": "229,230,232,1",
        "buttonOverColor": "121,185,67,1",
        "bufferGradient": "none",
        "bufferColor": "0,145,170,1",
        "progressColor": "230,51,30,1",
        "progressGradient": "high",
        "sliderColor": "121,185,67,1",
        "sliderGradient": "medium",
        "tooltipTextColor": "255,255,255,1",
        "tooltipColor": "121,185,67,1",
        "timeColor": "255,255,255,1",
        "timeBgColor": "18,18,18,1",
        "durationColor": "230,51,30,1"
    },
    "play": {
        "url": "http://www.metacdn.com/img/icon/play.png",
        "width": 135,
        "height": 38,
        "opacity": 0.5
    }
}
Expected Response #1:
HTTP/1.1 202 Accepted
Content-Type: text/plain; charset=UTF-8
Date: Fri, 21 May 2010 02:20:22 GMT
Accept-Ranges: bytes
Server: Restlet-Framework/2.0.8
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
Content-Length: 26
Connection: close
Media branding is updating

Delete Branding template

HTTP Operation:DELETE
URL: DELETE https://secure.metacdn.com/api/users/{username}/branding/{templateName}
Auth: HTTP digest authentication (User)
Expected HTTP response: HTTP/1.1 202 Accepted
Expected Format (mandatory, optional):
DELETE /api/users/{username}/branding/{templateName} HTTP/1.1
Example Call #1:
DELETE /api/users/mcdnuser/branding/APITemplate HTTP/1.1
Expected Response #1:
HTTP/1.1 202 Accepted
Content-Type: text/plain; charset=UTF-8
Date: Fri, 21 May 2010 02:22:30 GMT
Accept-Ranges: bytes
Server: Restlet-Framework/2.0.8
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
Content-Length: 22
Connection: close
Media branding removed