The following is the basic outline for the embed code:

//embed this script in header of your page
<script type='text/javascript' id='site_embed' src='http://platform.asset.tv/embed.js'></script>
<script>
var player = new Player({
secureCode: '#########',
region: 'UK',
media: [{
containerId: 'player',
videoId: ######,
//autoplay: true
size: {
width: '852',
height: '480'
}
}]
});
</script>

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

Embed options:

  • videoID: This variable specifies which video should be played when the site loads - this will have been included with your embed code when supplied.
  • Size - Width/Height: 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.

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="player"></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="player"></div> - therefore we need to set containerID = 'player';.

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

<html>
   <head>
<script type='text/javascript' id='site_embed' src='http://platform.asset.tv/embed.js'></script>
<script>
var player = new Player({
secureCode: '###########',
region: 'UK',
media: [{
containerId: 'player',
videoId: ######,
//autoplay: true
size: {
width: '852',
height: '480'
}
}]
});
</script>
</head>
<body>
<div id='player'></div>
</body>
</html>

Embed multiple players options:

How do I embed multiple videos to a site?