In this article, we explain how to embed a Media Clip using JavaScript or an iFrame. We also offer advanced embedding options that you can learn more about here. To begin, open a Media Clip from Media Library > Media Clips and then select the Embed tab.
1.0 | Javascript
Select a playout that the player should use on the webpage. This can be the default or a more customised playout. Select JavaScript from the dropdown menu on the right and copy the embed code that is generated.
<script type=”text/javascript” src=”//demo.bbvms.com/p/default/c/2734714.js” async=”true”></script>
The yellow is the name of the publication
The blue is the name of the playout used
The green is the media clip number
2.0 | iFrame
To embed using iframe, select a playout on the left and select iFrame from the dropdown menu on the right. Copy the embed code that is generated.
Please note that using an iframe may is suboptimal for 360 video and fullscreen capabilities. We therefore recommend using Javascript.
Example:
<iframe onload="this.src += '#!referrer='+encodeURIComponent(location.href)+'&realReferrer='+encodeURIComponent(document.referrer)" src="//demo.bbvms.com/p/default/c/2734714.html?inheritDimensions=true" width="720" height="400" frameborder="0" webkitallowfullscreen mozallowFullscreen oallowFullscreen msallowFullscreen allowfullscreen > </iframe>
3.0 | AMP
To embed your media clip on an AMP page, select a playout in the left column and select the AMP option in the dropdown menu on the right. Copy the embed code that is generated.
Example:
<amp-iframe sandbox="allow-scripts allow-same-origin" layout="responsive" src="https://demo.bbvms.com/p/default/c/2734714.html?inheritDimensions=true" width="720" height="405" frameborder="0" allowfullscreen resizable referrerpolicy="unsafe-url" > <div overflow tabindex="0" role="button" aria-label="Expand player"> Expand player </div> </amp-iframe>