How do I use my embed code?
The " embed code" is a block of HTML which is placed into the page-source and creates an object (player) in doing so.
- secureCode: This is the unique identifier for your Asset TV 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' or 'US' 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 'player' for it's ID.
- videoID: This variable specifies which video should be played when the site loads - this should be included with your embed code when supplied.
- autoplay (optional) : This lets the player know if it should start the content once loaded, or wait for the viewer to click to view. It can be toggled between 'true' (will play once loaded) or 'false' (await user interaction).
- skipTo (optional) : The skipTo property allows the content to begin at a specific point within the video. The value of skipTo defines the amount of seconds that is to be skipped. For example, skipTo: 120; would start the video 2 minutes in. This property can be overridden in the URL with ?skipTo=30 meaning you can provide links that take the viewer to exact moments in the video you wanted to highlight.
- 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.
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.
Embed multiple players options: