How do I use my Channel Embed?

The embed code is a block of HTML which is placed into the page-source and by doing so creates an object (a channel). Your full personalised embed code will be provided to you by our team and you will not need to make any adjustments except perhaps altering the width and height to suit your own site.

The following is the basic outline for the Akademia channel embed code:

//embed this script in header of your page
<script type='text/javascript' src='//platform.asset.tv/embed.js'></script>

<script>
    var channel = new Channel({
        channelId: 1234,
        secureCode: 'abcd1234',
        media: [{
            containerId: 'my-channel',
            template: 'default'
        }]
    });
</script>


<!-- Place div where you would like player to appear -->
<div id='channel'></div>

Embed options

channelId

This is the ID for the channel you will be embedding, this will be provided by our team.

secureCode

This is the unique identifier for your Akademia player allowing control of the content available in the player and to record MI (management information) specific to that player.

region

This will be set when the code is supplied to you and will either be 'UK','US' or 'IN' depending on your location.

containerId

This can be set to anything you wish providing you update the div id at the end of the above code to match it. You may wish to alter this if other objects on the page have already used 'channel' for it's ID.

template

The template to use, this will be provided to you by our team.

size - Width/Height (optional)

width and height allows you to override the player dimensions set out by the site module. It's useful when CSS has overridden heights and widths. Specifying only a width will result in a responsive calculation of the height using a 16:9 aspect ratio. Unlike the Player, a height is always recommended to achieve responsiveness.  

Embedding

First, you need to place the embed script that was supplied to you within the <head></head> tag of your webpage.

Then, you need to create a div with an "id" within your <body></body> tags at the location you would like this video to appear. The script will reference the div ID name. e.g  <div id="my-channel"></div>. Next you need to set the containerID in the script we placed in the <head> tag to the same as the div id. For example, we set <div id="my-channel"></div> - therefore we need to set containerID = 'my-channel';.

The following is an example embed code. Please note, if you do not follow the format shown below your media may not display properly.

<html>

<head>
    <script type='text/javascript' src='http://platform.asset.tv/embed.js'></script>

    <script>
        var channel = new Channel({
            channelId: 1234,
            secureCode: 'abcd1234',
            region: 'UK',
            media: [{
                containerId: 'my-channel',
                template: 'default'
            }]
        });
    </script>
</head>

<body>

    <div id='my-channel'></div>

</body>

</html>